Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
76,093 characters · 28 sections · 8 citation commands
A Model and Estimation of the Bitcoin Transaction Fee
\pagenumbering{roman}
\noindentKeywords: Bitcoin; transaction fees; mechanism design; fee market; machine learning; blockchain.\\ \noindentJEL: D44, D47, C45, C52, L86.\\ \noindentACM CCS: Applied computing $\rightarrow$ Electronic commerce; Theory of computation $\rightarrow$ Algorithmic mechanism design; Computing methodologies $\rightarrow$ Machine learning; Security and privacy $\rightarrow$ Distributed systems security; Mathematics of computing $\rightarrow$ Regression analysis.\\ \noindentMSC 2020: 91B26; 62J05; 62G08; 91B24; 68M20.
\pagenumbering{arabic} \onehalfspacing
Bitcoin is built on a proof-of-work protocol that requires miners to assemble transactions into blocks and compete to solve a puzzle in a lottery where the winner appends its block to the chain and earns a block reward. The block reward is the mining revenue which provides incentive for a miner to invest in hashrate (puzzle guesses per unit time) to solve the puzzle. Hashrate consumes electricity, which has a private cost to the miner. The block reward serves two functions. One function is to ensure the liveness of the blockchain - i.e. that miners append transactions to each block and that a new block is added approximately every 10 minutes - by ensuring that computers are engaged in mining at all times. The other function is to enhance network security by erecting a threshold expected cost that an attacker, who builds a fork chain, must exceed to make its fork the consensus chain. The equilibrium condition for Bitcoin mining implies that hashrate increases and decreases with the value (usually expressed in USD) of the block reward Figure (ref) displays the empirical relationship between the block reward (in USD) and energy consumption over time. The monotonicity of the relationship validates the prediction of the theoretical model.
The block reward has two parts: an algorithmic subsidy and voluntary transaction fees. The subsidy is programmed to fall through periodic halvings, so a larger share of miner revenue will eventually have to come from fees. A transactor’s motivation to pay a fee is to secure a priority position in the transaction queue; a higher fee induces the miner to append the transaction to its block ahead of a lower fee transaction, thereby shortening the expected confirmation time. A useful model of the fee market will recover two distinct objects: the mapping from priority into delay, and the user-side willingness to pay for a shorter wait.
We study that problem with a novel transaction-level mempool data-set collected from a self-run Bitcoin Core node operated by the Medai Lab Digital Currency Initiative. The data record transaction entry into and exit from the mempool, block inclusion, replace-by-fee events, child-pays-for-parent relationships, and high-frequency snapshots of congestion. Those data enable us to reconstruct the queueing environment each transaction faced when its fee was chosen, which is the crucial object missing from standard blockchain-only data. Our empirical strategy follows the economics closely. In the first stage, we estimate expected confirmation delay as a flexible function of fee-rate priority and network conditions, impose the economically sensible restriction that higher priority cannot raise expected delay, and recover the local slope of the delay schedule. In the second stage, we relate fees to that estimated slope and to transaction characteristics in a log-fee equation with epoch fixed effects. We also examine a re-spend-based impatience proxy in supplementary specifications, but the baseline estimates do not depend on it.
The main findings are straightforward. Congestion is the dominant determinant of confirmation delay, and the delay schedule -- i.e. expected delay between size-ranked fees -- becomes steeper when the mempool is congested Fees move with that technology in the direction implied by the model: when a marginal increase in priority buys a larger reduction in delay, users pay more for it. Several institutional details matter as well. RBF-tagged transactions pay large premia, CPFP packages are priced differently from stand-alone transactions, and fees rise with blockspace utilization, mempool depth, and the time since the previous block. The model is most informative within epochs, where it explains a substantial share of cross-sectional fee variation; epoch-to-epoch shifts in the overall fee level are harder to account for and are largely absorbed by fixed effects.
One surprising result is that the number of blocks to re-spend UTXO's is not informative. M\"oser and B\"ohme Bohme2015 found this measure to be correlated with the presence of a transaction fee on pre-2015 Bitcoin data. Intuitively, a fast turnaround by a receiver of UTXO's should be a motive to pay a fee to ensure the transaction is processed quickly. We expected to find this correlation to hold in our data, but it does not.
This paper sits between several literatures. Huberman2021 provide the closest theoretical starting point by modeling blockchain fees as payments for priority in a queue. Easley2019 study fee payment using lower-frequency reduced-form data, while lehar2020miner use transaction-level data to study miner market power. Our contribution is to take a structural priority-pricing framework to transaction-level mempool data.
The mempool data spans only a little more than nine weeks, so long-run extrapolation requires caution, particularly because the sample comes from a period of relatively stable network operation, there is limited variation in the explanatory variables of our model. We validate this by comparing the variance of key on-chain variables in our sample to the prior three years. Our remedy is to continue running the DCI Bitcoin node to lengthen our sample over time.
The remainder of the paper proceeds as follows. Section (ref) describes Bitcoin fee formation and the mempool. Section (ref) develops the model. Section (ref) describes the data. Section (ref) presents the empirical strategy. Section (ref) reports the results. Section (ref) concludes.
This section summarizes the institutional features of Bitcoin that govern fee formation. We clarify what economic object a transaction fee represents, how miners select transactions into blocks, and why confirmation delay is a function of transaction priority and network congestion. These mechanics motivate the sparse model in Section (ref) and the empirical design in Section (ref).
A Bitcoin payment is implemented by a transaction that spends existing unspent outputs (UTXOs) and creates new outputs.\footnote{An output specifies a spending condition (a script) and an amount. Outputs that have not been spent are UTXOs.} Transactions are broadcast to the peer-to-peer network and, if valid, are stored by nodes as unconfirmed transactions.
Miners assemble valid unconfirmed transactions into a candidate block and compete to solve a proof-of-work puzzle. The first miner to find a valid solution propagates its block; other nodes accept it if it satisfies consensus rules. The winning miner earns the block reward, which has two components: (i) an algorithmically determined subsidy (paid in a special “coinbase” transaction) and (ii) the sum of transaction fees from the transactions included in the block.
Blockspace is scarce. Bitcoin constrains block capacity using a weight-based rule, so transactions differ in the amount of capacity they consume. This institutional detail makes fee comparisons across transactions naturally scale by size: a miner deciding which transactions to include ranks profitability by comparing revenue per unit of blockspace rather than revenue per transaction.\footnote{Strategic behavir by miners can, in certain circumstances, cause them to choose a lower profit transaction lehar2020miner.}
A transaction fee is voluntary and is determined by the sender. Mechanically, it equals the difference between the total value of inputs and the total value of outputs.\footnote{The fee is not an explicit field in the transaction format. A miner can infer it from inputs and outputs.} Because transactions differ in how much blockspace they consume, the relevant price for priority is the fee per unit of size. We therefore work with the fee rate
\[ r \equiv \frac{b}{\mathrm{Weight}},\]
where $b$ is the fee and $\mathrm{Weight}$ is the transaction's blockspace footprint. In practice, both wallets and miners quote fee rates (often in satoshis per unit of weight) rather than fee levels.\footnote{See Section (ref) for the technical definition of weight.}
The economic interpretation is immediate: blockspace is the scarce resource, and the fee rate is the marginal willingness to pay for that resource. Holding the fee rate fixed, a larger transaction pays a higher fee because it uses more blockspace. This scaling is the reason transaction weight enters multiplicatively in the model in Section (ref) and as a control in the estimation in Section (ref).
Nodes maintain a mempool: a local inventory of valid, unconfirmed transactions. The mempool is not a centralized object; it is replicated across nodes and can differ slightly across them because of propagation delays and node-specific policies. Nevertheless, for liquid periods with broad connectivity, miners and users face a common environment in which pending transactions compete for inclusion in future blocks.
From the standpoint of fee formation, the mempool behaves like a priority queue with random service times. The service opportunities are block arrivals, which occur stochastically, and the service capacity of each block is limited by the block weight constraint. When congestion is low, most valid transactions are confirmed quickly and the marginal value of priority is small. When congestion is high, expected delay is sensitive to priority and small fee-rate differences can meaningfully affect confirmation outcomes.
These mechanics motivate two empirical objects that appear throughout the paper. First, a transaction's priority can be represented by its fee-rate rank (or percentile) among pending or newly arriving transactions in a short interval. Second, confirmation delay can be summarized by an expected delay function that depends on both priority and the contemporaneous state of congestion (backlog) and capacity utilization.
Given a set of unconfirmed transactions, a miner chooses which transactions to include subject to the block weight limit. Under competitive mining and absent strategic withholding, the dominant selection rule is fee-based: miners prefer transactions that deliver higher expected fee revenue per unit of blockspace. In the baseline case of our theoretical model (Section (ref) each transaction is independent with identical size (in terms of weight, not fee). This implies sorting by fee rate and filling block capacity from the top of the list. Two practical features complicate the one-transaction-at-a-time description but preserve the fee-rate logic at the relevant margin.
First, transactions can depend on one another. A child transaction that spends an unconfirmed parent output is not valid for inclusion unless the parent is included. As a result, miners evaluate packages of related transactions using an effective fee rate based on combined fees and combined weight.
Second, senders can adjust fees after broadcast using widely used fee-bumping mechanisms. Replace-by-fee (RBF) allows a sender to replace an unconfirmed transaction with a higher-fee version. Child-pays-for-parent (CPFP) allows a sender or receiver to attach a high fee to a child transaction, inducing miners to include both parent and child because the package fee rate is attractive. These mechanisms sharpen the economic interpretation of observed fees: a fee is a choice variable used to purchase priority in a congested queue, potentially updated in response to realized waiting.
These considerations motivate the additional indicators used in the empirical specification in Section (ref). In particular, $\mathrm{RBF}$ and $\mathrm{CPFP}$ capture fee-bumping and package-selection behavior that affects the mapping between an individual transaction's posted fee rate and its effective priority.
The institutional details above imply three restrictions that guide the remainder of the paper.
This section adapts the fee-setting framework in Huberman et.al. Huberman2021 to derive a parsimonious, estimable relationship between transaction fees, congestion, and impatience (equivalently, delay cost). The economic object of interest is the fee a transactor attaches to a transaction to obtain priority in the mempool and reduce confirmation delay.
Time is continuous. Transactions arrive to the mempool and are confirmed when included in a block. Blocks arrive as a Poisson process with rate $\mu$. Each block has a fixed capacity. In Huberman et.al. Huberman2021 the capacity is a fixed number of transactions and all transactions are the same size, so priority can be indexed by the fee $b$. In the Bitcoin protocol, block capacity is a weight constraint and transactions differ in weight; miners therefore prioritize by fee rate. Throughout we index priority by the fee rate $r_{it} \equiv b_{it}/\mathrm{Weight}_{it}$, where $i$ indexes the transactor and $t$ indexed time.\footnote{The transaction fee is part of the bargain between counterparties, who share the surplus. it is paid by the sender, whom we refer to as the “transactor”.}
A transactor $i$ has a willingness-to-pay $R_{it}$ to use Bitcoin relative to its best alternative, and a per-block delay cost $c_{it}$. If the transaction is confirmed after expected delay $W_{it}$ (in blocks) and pays fee $b_{it}$, expected surplus is
The willingness-to-pay term aggregates all non-delay attributes of the payment system (including, in particular, the value of settlement finality and perceived reliability) relative to the outside option. Conditional on choosing Bitcoin, transactor $i$ chooses a fee rate $r_{it}\ge 0$ (equivalently, a fee $b_{it}=r_{it}\mathrm{Weight}_{it}$) to maximize (ref).\footnote{Subject to $u_{it} \geq 0$.}
A key implication of the Huberman et.al. Huberman2021 model is that, under competitive mining and free entry, miners adopt the myopic revenue-maximizing selection rule: each mined block includes the highest-paying pending transactions up to capacity. In their equal-size benchmark, this rule is “highest fees”; in our setting it is “highest fee rates.” Let $G_t(\cdot)$ denote the cross-sectional distribution of fee rates among relevant mempool transactions in epoch $t$. Define the priority percentile
where $\mathrm{rank}_t(\cdot)$ ranks fee rates in ascending order so that higher $p_{it}$ means higher priority, and $N_{t}$ is the number of transactions in the mempool at time $t$. Under the priority rule, expected delay is decreasing in priority. We therefore write expected delay as a function of priority and the contemporaneous state of the mempool,
where $s_t$ summarizes congestion and capacity conditions (e.g., backlog, blockspace utilization, and other predetermined state variables).
The equilibrium has two properties that are central for our empirical strategy.
First, fees implement an efficient priority allocation: higher delay-cost transactors obtain higher priority and shorter expected delays.
Second, the equilibrium payments coincide with the Vickery-Groves-Clarke (“VCG”) payments for selling priority of service, so each transactor pays the expected delay externality imposed on lower-priority transactions.
An immediate implication is that, provided willingness-to-pay is sufficiently high so that participation constraints do not bind, equilibrium fees are independent of $R_{it}$: changes in outside options shift surplus but do not shift the priority-pricing schedule. This motivates our focus on fee choice conditional on observing that the transaction is submitted and confirmed.
For estimation, the VCG interpretation yields a convenient reduced-form decomposition.\footnote{See Appendix (ref) for a proof and an explanation of why VCG is an appropriate characterization of the Bitcoin transaction fee market.} Locally, raising priority by a small amount reduces expected delay by approximately $\mathcal{W}_p(p_{it}, s_t)\,dp$. Since the transactors value a reduction in delay, we write $D(p_{it},s_t) = - \mathcal{W}_p = - \partial \mathcal{W}(p_{it}, s_t)/\partial p < 0$, where $ \mathcal{W}_{p}$ denotes the marginal reduction in expected confirmation delay generated by an increase in priority, i.e. the marginal reduction in confirmation delay achieved by moving up one priority percentile, and $D(p_{it},s_t)$ is the absolute value of the local slope of the delay function. The marginal willingness to pay for priority is therefore proportional to the transactor’s delay cost $c_{it}$ times the reduction in confirmation time achieved by increasing priority by one position, $D(p_{it},s_t)$. This motivates the approximation
where $\kappa_t$ is a normalization constant that depends on the priority index and capacity constraint. Log linearization gives
Equation (ref) is the bridge to our empirical design: we require (i) a flexible estimate of the delay technology and its local slope in the prevailing state, and (ii) a flexible mapping from observables to the latent delay cost $c_{it}$. Section (ref) implements this logic using a two-stage estimator.
Our empirical analysis relies on high--frequency mempool data collected from a self--run Bitcoin Core (version 30.0.0) node operating on Ubuntu 24.04.3 LTS. The node runs with \verb|txindex=1|, RPC enabled and ZMQ enabled so that most valid transactions broadcasted to the peer--to-peer network are observed.
A separate Rust program, mempool--monitor \footnote{https://github.com/arminsabouri/Mempool-Monitor/}, subscribes to the node's ZMQ \verb|rawtx| feed and receives a byte stream for each new transaction. After decoding the raw transaction and pruning witness data, the monitor writes the raw transaction, the time of entry and exit and other metadata to a SQLite database.
In parallel, the monitor records the state of the node's mempool every $25$ seconds. These snapshots capture the total mempool size (bytes), the number of pending transactions, and the current block height and hash. The monitor also records Replace--By-Fee (RBF) events: if a transaction that was previously seen is replaced with a higher--fee version, the new transaction is marked as an RBF and linked to the transaction it replaces. The Mempool--monitor additionally identifies child--pays-for--parent (CPFP) relationships by tracking chains of unconfirmed transactions; this information allows fee rates to be aggregated at the package level when parents and children are mined together. We track the time to re-spend the output as the number blocks between confirmation of the subject transaction and confirmation of transactions that use the output. Finally, we post-process and normalize the data before training. \footnote{https://github.com/mit-dci/bitcoin-fee-estimation}
Data collection began on 3 August 2025 \ at 06:27:44 (UTC$-04$) and ended on 9 October 2025 \ at 20:08:49 (UTC$-04$). Our raw data can be found on Kaggle. \footnote{https://www.kaggle.com/datasets/kristianpraizner/mempool-space-data/data}
Figure 2 is a chart of the fee distribution of in our data, sorted by fee order. Upon visual inspection it has a convex shape that tends to increase in the order (from left to right). This motivates our choice of a log form of the VCG equation (Equation (ref)) as the basis of our estimating equation.
This section estimates the fee-setting relationships implied by the model in Section (ref), specifically Equation (ref). The theoretical framework is intentionally sparse: it treats expected confirmation delay as a function of transaction priority and the mempool state, and it relates equilibrium fees to users' delay costs and to the local slope of the delay schedule. In the data, however, transaction fees also vary systematically with observables such as transaction weight, wallet and transaction type, and high-frequency network conditions. Our empirical strategy therefore augments the model with these controls while preserving its core decomposition between (i) delay technology and (ii) user preferences.
We proceed in two stages. In the first stage, we estimate expected confirmation delay as a flexible function of priority and network state using a random forest, and we recover an observation-level estimate of the local slope of this delay schedule. In the second stage, we estimate a log fee equation that flexibly maps an impatience proxy into fees using a cubic B-spline with four knots (degree $3$), while controlling for the estimated local slope and additional fee shifters. We implemented with Python code from the scikit-learn library. \footnote{ scikit-learn implementation. The first stage uses \path{sklearn.ensemble.RandomForestRegressor}. The second stage uses a spline-basis expansion via \path{sklearn.preprocessing.SplineTransformer} with \path{degree=3} and \path{n_knots=4}, followed by OLS via \path{sklearn.linear_model.LinearRegression}, typically combined as a pipeline using \path{sklearn.pipeline.make_pipeline}. The scikit-learn documentation pages for these classes include a [source] link that points to the corresponding source code in the scikit-learn repository.}
We index transactions by $i$ and discrete time intervals by $t$. A time interval is an epoch (30 minutes in the baseline), chosen to balance two considerations: it is short enough that the state of the mempool is approximately stable within an interval and long enough to deliver sufficient within-epoch variation in priority.
Let $b_{it}$ denote the transaction fee paid by transaction $i$ (in USD) and let $\mathrm{Weight}_{it}$ denote its transaction weight. Define the fee-rate
Let $W_{it}$ denote the realized confirmation delay, measured as the number of blocks between mempool entry and inclusion. Let $\hat\rho_t$ denote a measure of congestion in epoch $t$ (e.g., the amount of mempool backlog in weight units) and let $\mathrm{Blockspace}_t$ denote available block capacity during the epoch. Let $\mathrm{Type}_{it}$ denote transaction-type indicators (including exchange-flow tags and NFT tags), and let $\mathrm{Wallet}_{it}$ denote wallet indicators when attribution is available.
Transactor impatience is not observed directly. Following the measurement strategy in Section (ref), we use re-spend timing to proxy impatience. Let $d_{it}$ be the average number of blocks until the first $n$ output re-spends associated with transaction $i$, truncated at $X$ blocks as described above. Define the impatience proxy
\paragraph{Variables.} We partition the variables into “transaction variables” $X_{it}$, and “state variables” $S_{t}$, where $i$ indicates a transaction and $t$ is a (time interval) epoch.
$X_{it} = \text{\Large}\{\mathrm{Blockspace}_t,\log \mathrm{Weight}_{it}, \mathrm{RBF}_{it},\mathrm{CPFP}_{it},\mathrm{Type}_{it},\mathrm{TOA}_{it}\text{\Large}\}$
$S_{t} = \text{\Large}\{\widehat\rho_t, \mathrm{Blockspace}_t\text{\Large}\}$
The concatenated bundle is denoted $Z_{it} \equiv \text{\Large}(X_{it}, S_{t}\text{\Large})$.
Our empirical objective is to estimate the decomposition implied by the priority-pricing model: observed fees reflect both (i) a delay technology mapping priority and network state into expected confirmation delay and (ii) heterogeneous preferences over delay. This objective motivates a two-stage design that treats the delay technology as a nuisance function estimated flexibly, while keeping the fee equation structured enough to support interpretation and counterfactual analysis.
\paragraph{First stage: flexible delay technology.} The delay technology is generated by a fee-prioritized queue with stochastic block arrivals, time-varying capacity, and heterogeneous transaction packages. Rather than impose a global parametric form, we estimate the conditional mean delay function using a Random Forest trained on an 80/20 random split of the data. The fitted model is then used to generate predicted delays for all observations, including those in the training set. Because the second stage includes epoch fixed effects that absorb aggregate time variation, and because the delay gradient---not the level of predicted delay---is the generated regressor of interest, the bias from in-sample prediction is attenuated in practice. We return to temporal stability and out-of-sample performance in Section (ref).
\paragraph{Shape restriction: monotonicity in priority.} Queuing structure implies that, holding network state fixed, higher priority should not increase expected delay. Flexible learners need not respect this restriction. We therefore enforce monotonicity in the priority dimension when constructing the delay gradient that enters the second stage. For each epoch, we hold non-priority features at their epoch median, evaluate the fitted Random Forest over a fine priority grid, and apply isotonic regression to obtain a monotone decreasing schedule. Finite differences of this smooth schedule yield the local slope $\hat{W}'_{it}$ at each transaction's observed priority. This epoch-median approach isolates the causal effect of priority from variation in congestion features within the epoch, and avoids amplifying first-stage noise through per-observation partial derivatives.
\paragraph{Second stage: the fee equation.} Transaction fees exhibit a large mass near the relay minimum and a steep right tail. In principle, a hurdle specification---separating the decision to pay a nontrivial fee from the amount paid---could capture both margins. In practice, fee payment is near-universal: fewer than $0.01\%$ of confirmed transactions fall below the effective minimum fee rate, reflecting the consensus rule that miners select by fee rate. We therefore estimate only the intensive margin, modeling $\log(\text{fee rate})$ conditional on positive fees via OLS with epoch fixed effects. The near-degenerate extensive margin contributes negligibly and is not separately modeled.
\paragraph{State-based controls and counterfactual analysis.} Counterfactual exercises require a representation of the common fee environment that can be manipulated under alternative network conditions. Fully saturated epoch fixed effects absorb common shocks in-sample but do not map directly to counterfactual states. We therefore augment epoch effects with predetermined state variables capturing congestion, capacity, and block-arrival conditions---specifically, blockspace utilization, log time since the last block, and log mempool size. This preserves the role of high-frequency common shocks while explicitly estimating how observables shift the fee environment, which is the component we vary in counterfactual scenarios.
Priority is summarized by a transaction’s position in the fee-rate ordering among transactions that enter the relevant ranking set in epoch $t$. Let $N_t$ denote the number of transactions in this set. Because fee-rates are discretized (e.g., in sat/vB) and package behavior can generate identical fee-rates, ties are common. Since ties correspond to multiple distinct transactions competing for inclusion, we construct a tie-aware percentile rank that preserves the full transaction count.
\paragraph{Tie-aware fee-rate percentile.} Let $r_{it}$ denote the fee-rate of transaction $i$ in epoch $t$. Define the fee-rate percentile
so that $p_{it}\in(0,1)$ and all transactions with identical fee-rates receive the same percentile. This definition corresponds to the empirical cdf evaluated at the midpoint of the mass of ties and avoids boundary values that complicate finite differences.
\paragraph{Delay technology.} We model confirmation delay as a flexible function of priority and predetermined system state:
The function $g(\cdot)$ is estimated using a random forest regressor, which accommodates sharp nonlinearities and interactions characteristic of fee-prioritized queues with stochastic block arrivals and time-varying capacity.
\paragraph{Cross-fitting.} Because the second stage uses generated regressors, we construct first-stage predictions out of sample using epoch-level cross-fitting. We partition the sample into $K$ folds at the epoch level, estimate the forest on $K-1$ folds, and predict delay in the held-out fold. Let $\widehat g^{(-k)}(\cdot)$ denote the fitted model excluding fold $k$. For observations $(i,t)$ in fold $k$, define the out-of-sample predicted delay
\paragraph{Monotonicity in priority.} Queueing structure implies that, holding state fixed, higher priority should not increase expected delay. Since standard random forests do not impose shape restrictions, we enforce monotonicity by post-processing out-of-sample forest predictions along the priority dimension.
Fix an observation $(i,t)$ and let $z_{it}$ collect the non-priority covariates in (ref). Evaluate the fitted forest on a fine grid of percentiles $\mathcal{P}=\{p^{(1)},\ldots,p^{(M)}\}\subset(0,1)$: \[ \widehat m^{(-k)}_{it}(p^{(m)})\equiv \widehat g^{(-k)}(p^{(m)},Z_{it}),\qquad m=1,\ldots,M. \] We compute the closest weakly decreasing sequence to $\{\widehat m^{(-k)}_{it}(p^{(m)})\}_{m=1}^M$ in squared error loss via isotonic regression. Let $\widetilde m^{(-k)}_{it}(p^{(m)})$ denote the fitted monotone sequence, and define the monotone first-stage predictor $\widetilde g^{(-k)}(p,z_{it})$ as the linear interpolation of the grid points
\[\{(p^{(m)},\widetilde m^{(-k)}_{it}(p^{(m)}))\}_{m=1}^M.\]
We replace (ref) by the monotone prediction
\[\widetilde W_{it}\equiv \widetilde g^{(-k)}(p_{it},Z_{it}).\]
\paragraph{Local slope of the delay schedule.} The fee condition in Section 3 depends on how expected delay changes locally with priority. We approximate the local slope using a symmetric finite difference computed from the monotone prediction function:
Here $\underline p>0$ is a small trimming constant to avoid boundary artifacts and $\Delta>0$ is a bandwidth parameter. In the baseline we set $\underline p=0.01$ and $\Delta=0.01$ and verify robustness to alternative choices.
\paragraph{Robustness check: alternative monotone first-stage learner.} To verify that the second-stage results are not driven by the particular learner used in the first stage, we repeat the first stage using a monotone gradient-boosted tree model that imposes a weakly decreasing constraint in $p_{it}$ by construction while allowing flexible interactions with $\widehat\rho_t$ and $\mathrm{Blockspace}_t$. Using the resulting out-of-sample slope estimates $\widehat W'^{\,\mathrm{MGB}}_{it}$, we re-estimate the second stage and show that the estimated impatience mapping and counterfactual implications are stable across first-stage specifications.
Observed fees exhibit a large mass near zero and a steep right tail. To accommodate this distributional feature while preserving the model-implied decomposition, we estimate a hurdle specification that separates (i) the extensive margin decision to pay a nontrivial fee from (ii) the fee level conditional on paying a nontrivial fee.
\paragraph{State-based controls and the common fee environment.} Let $S_t$ collect predetermined, high-frequency measures of network state, such as congestion and capacity. We represent the common fee environment as
\[\eta_t = S_t'\theta + \xi_t,\]
where $\xi_t$ captures residual epoch variation orthogonal to $S_t$ and is normalized by $\mathbb{E}[\xi_t]=0$. This representation preserves the role of epoch-level common shocks while identifying an explicit component, $S_t'\theta$, that can be manipulated in counterfactual exercises by varying $S_t$.
We estimate a log-fee equation:
The coefficient $\alpha_1$ captures the sensitivity of fees to the local steepness of the delay schedule, as implied by the priority-pricing condition in Section 3.
\paragraph{Monotone spline for the impatience mapping.} Economic structure implies that greater impatience should not reduce either (i) the propensity to pay a fee or (ii) the fee level among fee-paying transactions. We therefore estimate $h(\cdot)$ and $s(\cdot)$ under monotonicity restrictions using an I-spline basis. Let $\{\kappa_1,\ldots,\kappa_J\}$ denote knots placed at predetermined impatience points (baseline: quantiles of $\iota_{it}$ in the fee-relevant region with additional mass in the upper tail). Let $\{I_1(\iota),\ldots,I_L(\iota)\}$ denote the associated I-spline basis functions, which are weakly increasing in $\iota$. We parameterize
The nonnegativity constraints imply that both $h(\cdot)$ and $s(\cdot)$ are weakly increasing.
\paragraph{Estimation.}
We estimate equation (ref) by constrained least squares with the monotonicity constraints in (ref). Standard errors are computed allowing for sampling variability in the generated regressor $\log \widetilde W'_{it}$ by using cross-fitting folds and clustering at the epoch level.
\paragraph{Counterfactual aggregation.} For a counterfactual state $S_t^{cf}$, the hurdle model delivers two components: the predicted selection probability
\[\widehat \pi^{cf}_{it}\equiv \Pr(H_{it}=1\mid \iota_{it},\widetilde W'_{it},X_{it},S_t^{cf},\xi_t=0),\]
and the predicted conditional mean fee among fee-paying transactions. If (ref) is used to predict $m^{cf}_{it}\equiv \mathbb{E}[b_{it}\mid b_{it}>\epsilon,\cdot]$, we compute
\[\widehat m^{cf}_{it}=\exp\!\left(\widehat \mu^{cf}_{it}\right)\cdot \widehat \psi,\qquad\widehat\mu^{cf}_{it}=\widehat \alpha_0+\widehat s(\iota_{it})+\widehat \alpha_1 \log \widetilde W'_{it}+X_{it}'\widehat \beta+(S_t^{cf})'\widehat\theta,\]
where $\widehat \psi$ is a smearing factor estimated from the second-stage residuals. The implied unconditional expected fee is then
\[\mathbb{E}[b_{it}\mid \cdot]\approx\widehat \pi^{cf}_{it}\cdot \widehat m^{cf}_{it}+(1-\widehat \pi^{cf}_{it})\cdot \mathbb{E}[b_{it}\mid b_{it}\le\epsilon], \]
where the final term is economically negligible under the baseline choice of $\epsilon$ and is set to the sample mean below $\epsilon$ unless otherwise stated.
Identification follows the maintained assumption that individual transactions are atomistic relative to the mempool: each transactor takes the prevailing mapping from priority to delay as given at the time of fee choice. Under this assumption, $\widehat W_{it}$ summarize the relevant technological constraint faced by transaction $i$ in epoch $t$. The spline component $s(\iota_{it})$ provides a flexible approximation to the mapping from impatience into fees. Inference is implemented by computing standard errors clustered at the epoch level to allow for within-epoch dependence. To incorporate first-stage estimation uncertainty, we also report an epoch-block bootstrap that resamples epochs and re-estimates both stages within each resample. See Appendix (ref) for a formal analysis of identification and inference.
Our sample covers \num{11110277} confirmed Bitcoin transactions observed between 3 August 2025 and 9 October 2025 (approximately ten weeks), drawn from a continuous mempool observer database. Transactions are grouped into \num{1988} non-overlapping 30-minute epochs, which serve as the unit of observation for epoch fixed effects and clustered inference throughout the analysis.
\paragraph{Weight correction.} Raw transaction weights recorded by the local Bitcoin node are systematically understated for SegWit inputs: the node counts witness bytes at full weight rather than the discounted rate. We correct this by merging with independently fetched data from the mempool.space API, which reports the true virtual size (vsize) and witness-adjusted weight. This correction is available for $99.2\%$ of transactions and raises the mean weight by $+272.5$ weight units (WU), a $28.8\%$ average increase. Fee rates derived from corrected weights are materially lower for SegWit-heavy transaction types and are the figures used throughout.
\paragraph{CPFP package collapsing.} Child-pays-for-parent (CPFP) arrangements create a mismatch between the fee rate a transaction appears to offer and the rate that actually determines its priority in the miner's mempool. Following standard practice, we identify parent--child pairs and collapse each into a single package observation whose fee rate equals the total package fee divided by the total package virtual size. This affects approximately $24.4\%$ of the final sample.
\paragraph{Transaction composition.} We annotate each transaction with a structural label using a rule-based classifier. Table (ref) reports the resulting distribution. The majority are simple payment transactions; data-carrying transactions (carrying OP_RETURN outputs or inscriptions) account for roughly one fifth of the sample.
Additional sample characteristics: RBF-flagged transactions account for $5.3\%$ of observations; $24.4\%$ are CPFP packages; the fee rate distribution is heavily right-skewed, with a median of approximately $5$ sat/vB and a long tail of high-urgency transactions exceeding $100$ sat/vB.
The first stage estimates the delay technology $\hat{W}(p_{it}, s_t)$: the expected log confirmation delay as a function of a transaction's priority percentile $p_{it}$ within its epoch and the prevailing mempool state $s_t$. We use a Random Forest regressor because it flexibly captures the non-linear, interaction-heavy relationship between priority and delay without imposing a parametric form.
\paragraph{Model specification.} The response variable is $\log(\text{waittime} + 1)$ in seconds. The feature set is $\{p_{it},\; \text{blockspace utilization},\; \text{mempool size},\; \text{mempool tx count}\}$, where priority percentile $p_{it}$ is computed within each epoch using a tie-aware rank so that the distribution is approximately uniform on $[0,1]$ within every 30-minute window.\footnote{The mempool features enter the Random Forest in levels rather than logs. Because tree-based methods are invariant to monotone transformations of individual features, the choice is immaterial for the fitted predictions.} We use 200 trees, maximum depth 15, and minimum leaf size 20. A random 80/20 train--test split is used for evaluation.
\paragraph{Performance.} On the held-out test set the model achieves $R^2 = 0.611$, RMSE $= 0.812$ (in log-seconds). The remaining unexplained variance is expected: confirmation timing depends on factors not observable in the mempool (inter-block intervals, miner selection policies, network propagation), so the model deliberately captures the systematic component attributable to priority and congestion.
\paragraph{Feature importance.} Blockspace utilization dominates, accounting for $52.0\%$ of total feature importance in the fitted forest, followed by mempool transaction count ($24.6\%$), mempool size ($13.7\%$), and priority percentile ($9.7\%$). This ordering confirms that the level of network congestion---both within the current block and in the broader mempool---is the primary determinant of absolute confirmation delays, with a transaction's relative priority controlling the residual variation within a given congestion regime. Figure (ref) illustrates the importances.
\paragraph{Monotonicity enforcement and local slopes.} The VCG identification argument requires that $\hat{W}$ is weakly decreasing in priority $p$: higher-priority transactions must (weakly) confirm faster. For each epoch, we hold the non-priority features at their epoch median, evaluate the fitted forest over a fine 99-point priority grid, and apply isotonic regression to obtain a monotone decreasing schedule. The key input to Stage 2 is the local slope $\hat{W}'_{it} = \partial \hat{W}/\partial p$, which we compute via symmetric finite differences with step size $\delta = 0.05$ on a linear interpolant of this monotone schedule. All slopes are constrained to be positive (higher priority $\Rightarrow$ weakly lower delay). Figure (ref) shows the resulting delay--priority relationship stratified by congestion regime: the gradient is steeper during high-congestion periods, implying that priority is more valuable when the mempool is full.
\paragraph{Delay gradient regimes.} The epoch-median sweep reveals that the delay technology is not uniformly informative. Figure (ref) shows that $79.8\%$ of epochs ($7{,}980$ of $10{,}000$) exhibit a trivial delay gradient: the monotone-enforced schedule is essentially flat across the priority grid, so $\hat{W}'_{it} \approx 0$ for all transactions in those epochs. Only the remaining $20.2\%$ of epochs display an active delay technology in which higher priority produces a measurably steeper reduction in expected delay. The right panel confirms that the fee-rate distributions of the two regimes largely overlap, with the non-trivial regime showing a slightly heavier right tail.
This pattern has a natural interpretation: during low-congestion periods the mempool clears quickly regardless of priority, so the Random Forest correctly learns a flat delay schedule---there is no priority gradient to price. The structural channel identified by the VCG model is therefore operative primarily during congestion episodes, which is precisely when fee differentiation matters most. In Stage 2, observations from trivial-gradient epochs still contribute to the estimation of control-variable and epoch fixed-effect coefficients, but the identifying variation for $\alpha_1$ is concentrated in the $20\%$ of epochs where the delay technology is active. We retain all epochs in the estimation rather than restricting to the non-trivial regime, so that the model is disciplined by the full data distribution and the coefficient estimates are not conditional on an ex-post sample selection that could inflate the apparent strength of the structural channel.
We estimate
where $\hat{W}'_{it}$ is the Stage 1 delay gradient, $X_{it}$ is a vector of transaction-level controls (RBF flag, CPFP status, log output amount, input/output counts, and type indicators), $S_t$ collects block-state variables (blockspace utilization, log time since last block, log mempool size), and $\xi_t$ is a full set of epoch fixed effects. Standard errors are clustered at the epoch level using the Liang--Zeger sandwich estimator. The impatience term $s(\iota_{it})$ that appears in the theoretical specification (ref) is intentionally excluded here: the impatience proxy (derived from re-spend intervals) has incomplete coverage and its inclusion does not materially affect the coefficient on $\log \hat{W}'_{it}$; we treat the impatience channel as a robustness check rather than a baseline result.
\paragraph{Results.} Table (ref) reports coefficient estimates for the base features. All variables are statistically significant at the $0.1\%$ level.
\paragraph{Structural interpretation.} The negative and precisely estimated coefficient on $\log \hat{W}'_{it}$ ($\hat{\alpha}_1 = -0.046$, $t = -58.1$) is the central result of the paper.\footnote{A negative coefficient value on $\log \hat{W}'_{it}$ is equivalent to a positive coefficient on the elasticity of the slope of the value of reduction in delay, $D^{'}(p_{it}, s_{t})$. } The VCG theory predicts that a transaction's fee rate should be decreasing in the marginal delay reduction it generates: when each additional unit of priority produces a large reduction in expected wait time (steep delay gradient), senders can achieve a given confirmation speed at a lower fee. Conversely, when the delay schedule is flat---priority does little to accelerate confirmation---senders must bid higher to separate themselves from the queue. The estimate is consistent with this prediction and survives the inclusion of almost two thousand epoch fixed effects, indicating it is not driven by aggregate time trends.
\paragraph{Transaction-type controls.} RBF-flagged transactions pay a premium of approximately $93\%$ ($\exp(0.657) \approx 1.93$), suggesting that opting into replace-by-fee signals high urgency and is compensated accordingly by miners. CPFP packages pay $15\%$ less than stand-alone transactions of the same apparent priority, consistent with the bundled nature of the fee subsidy. Transactions carrying OP_RETURN outputs or inscriptions pay $20\%$ and $12\%$ lower fee rates respectively, reflecting their lower time sensitivity.
\paragraph{Block-state controls.} Blockspace utilization (fraction of the current block's weight already filled at the time of observation) and log time elapsed since the previous block both have positive, economically meaningful coefficients. A block that is $10$ percentage points closer to full is associated with a $2.5\%$ higher fee rate; each doubling of the inter-block interval adds roughly $10\%$ to fee rates, consistent with impatience growing as the gap since the last confirmation widens. Mempool depth (log mempool size in bytes) also enters positively, capturing longer-run congestion not fully absorbed by the priority percentile.
\paragraph{Epoch fixed effects and inference.} Epoch fixed effects absorb all variation in unobserved aggregate conditions within a 30-minute window---miner preferences, network propagation, and macro Bitcoin price dynamics---ensuring that the structural coefficients identify within-epoch, cross-transaction variation. The mean SE inflation of $6.90\times$ relative to na\"ive OLS confirms that transactions within the same epoch are substantially correlated, making epoch clustering essential for valid inference.
Figures (ref) and (ref) present standard diagnostics for the second-stage regression. The fitted-versus-actual plot shows good fit over the bulk of the distribution, with underprediction primarily in the extreme upper tail. The visible vertical streaking further suggests that realized fee rates may cluster at a discrete set of focal values rather than vary continuously. A plausible hypothesis is that wallet interfaces often implement a small menu of common fee options—e.g., 1, 1.5, 2.5 sat/vB—inducing bunching in realized fees even conditional on differing transaction characteristics and mempool states. If so, the diagonal bands in the residuals-versus-fitted plot (right panel) are simply the corresponding geometric implication, because residuals equal realized minus fitted fees. This same mechanism may contribute to the modest heteroskedasticity at low fitted values, where realized fees are additionally constrained by an effective lower bound. The residual histogram is nonetheless approximately normal, with slight positive skew, consistent with the smearing correction used in retransformation.
Figure (ref) displays the base-feature coefficient estimates with $95\%$ epoch-clustered confidence intervals.
Appendix (ref) reports two complementary robustness checks. First, allowing the impatience proxy to enter flexibly through a monotone I-spline leaves the estimated coefficient on the delay-gradient term essentially unchanged (-0.0455 versus -0.0459 in the baseline), improves fit only modestly, and implies an economically small aggregate impatience effect: the implied change in log fee rates from the median to the 95th percentile of impatience is 0.0270 (SE = 0.0032). Second, replacing the Random Forest first stage with a monotone gradient-boosted tree learner on the full sample yields $\hat{\alpha}_1$ = -0.0861 (SE = 0.0005). This is more negative in magnitude than the Random-Forest estimate, but it preserves the sign, precision, and qualitative interpretation of the structural channel. The corresponding aggregate impatience effect remains positive but smaller at 0.0178 (SE = 0.0023). Taken together, these results indicate that the main finding is not an artefact of the baseline functional-form choice: cross-sectional fee variation remains primarily tied to the steepness of the delay schedule, while impatience plays a secondary role, although the exact magnitude of the delay-gradient coefficient is somewhat sensitive to the first-stage learner.
A key question for any structural model estimated on time-series data is whether the coefficients represent stable structural parameters or are artifacts of a particular sample period. We conduct six complementary diagnostics, each requiring re-estimation on different subsets of the data.
\paragraph{Intraclass correlation.} The intraclass correlation coefficient (ICC) for $\log \hat{W}'$ is $0.186$, indicating that roughly one-fifth of its total variance lies between epochs rather than within them. The implied design effect is $980$, reducing the effective sample size from \num{11108662} to approximately \num{11340}. This confirms that epoch-clustered standard errors are essential; na\"ive OLS standard errors would dramatically overstate precision.
\paragraph{Cumulative precision.} Figure (ref) traces the clustered standard error of $\hat{\alpha}_1$ as epochs are added sequentially. Precision improves monotonically, with the SE falling from $0.0016$ at 298 epochs to $0.0008$ at the full \num{1988} epochs. The coefficient estimate itself is stable throughout this accumulation, ranging from $-0.042$ to $-0.048$, and is significant at the $0.1\%$ level at every sample size tested.
\paragraph{Rolling-window stability.} We re-estimate the full model on five non-overlapping temporal windows of approximately 400 epochs each. The structural coefficient $\hat{\alpha}_1$ ranges from $-0.054$ to $-0.039$ across windows (Figure (ref), a spread of $8.6$ times its pooled standard error. While all five estimates are negative and individually significant, this variation indicates non-trivial parameter drift---the delay gradient's effect on fees is not perfectly time-invariant. Among the control variables, only $\log(\text{time since last block})$ exhibits window-to-window stability (range$/\text{SE} = 2.0$).
\paragraph{Out-of-sample generalization.} To assess whether the structural channel generalises forward in time, we estimate expanding-window models via FWL that train on the first $k$ epochs and test on all subsequent epochs (Figure (ref). We report three complementary $R^2$ measures:
\paragraph{Variance decomposition.} Figure (ref) decomposes the variance of test-period outcomes and strict-OOS residuals into between- and within-epoch components. The test outcome has $\text{ICC} = 0.195$: approximately $19\%$ of variance is between epochs and $81\%$ within. After applying the structural model without epoch information, the residual $\text{ICC}$ rises to $0.292$---the model absorbs $29\%$ of within-epoch variance but slightly increases between-epoch variance (by $21\%$). This asymmetry is the key finding: the structural model succeeds at explaining why transactions within the same time period pay different fees---through the delay gradient, RBF signalling, transaction size, and other cross-sectional features---but it cannot predict which epochs will have high or low fees overall. Epoch-level fee variation is driven by unobserved aggregate conditions (miner behaviour, macro sentiment, sudden demand shocks) that the structural features do not capture, and that the epoch fixed effects are designed to absorb.
\paragraph{Epoch fixed-effect persistence.} The autocorrelation of the estimated epoch fixed effects (Figure (ref) decays from $0.86$ at lag 1 (30 minutes) to $0.10$ at lag 24 (12 hours), with a modest 24-hour seasonal uptick ($0.23$ at lag 48). This pattern is consistent with slowly mean-reverting congestion shocks rather than permanent shifts, supporting the use of epoch-level fixed effects to absorb aggregate conditions. The strong short-run persistence also suggests that, for data collection purposes, spaced-out sampling (e.g.\ covering more distinct calendar days) is more informative than collecting consecutive hours, since adjacent epochs carry largely redundant aggregate information.
\paragraph{Implications.} The structural coefficients drift across congestion regimes---$\hat{\alpha}_1$ ranges from $-0.054$ to $-0.039$ across five temporal windows---yet the model generalises well out-of-sample: the VCG channel adds $7$--$9$ percentage points of $R^2$ within epochs even when trained on disjoint time periods. The variance decomposition confirms that the model's strength is cross-sectional: it explains within-epoch heterogeneity in fees but does not predict the epoch-level mean. Extending the sample period is therefore valuable not because the structural parameters converge to a fixed point, but because additional epochs provide independent clusters that improve precision and span a wider range of congestion regimes, enabling future work to model the regime-switching itself---for example, by interacting the structural coefficients with epoch-level congestion state.
This paper studies how Bitcoin transaction fees are formed. To address that question, we adapt a priority-pricing model of the mempool to Bitcoin's weight-based block capacity and estimate it on transaction-level data. Miners are motivated to prioritize the processing of transactions by unit fees and transactors are motivated to set their fee as a function of their relative impatience.
We introduce a novel mempool data set that enables us to observe transaction arrivals, exits, block inclusion, fee-bumping events, and high-frequency congestion states, which enables us to recover the queueing environment faced by each transaction when its fee is chosen. That information is essential for separating the technology of confirmation delay from the willingness to pay for priority, and it is largely absent from blockchain-only data.
The estimates indicate that mempool congestion governs the value of priority. Confirmation delays are shaped mainly by mempool pressure and available blockspace, and fees respond to that delay technology in the direction implied by the model. Several institutional features matter as well. RBF-tagged transactions pay substantial premia, CPFP packages are priced differently from stand-alone transactions, and contemporaneous block conditions shift fees in economically important ways. At the same time, the model is stronger in the cross section than over time. It explains why transactions in the same fee environment pay different fees better than it explains why the overall fee level moves across epochs. That distinction is important for interpreting what the paper does and does not deliver. The estimates provide a disciplined account of private demand for transaction priority in the environment we observe, and they give the right empirical objects for counterfactual analysis. However, the short timespan of our mempool data -- approximately 90 days – limits the extent of variation in the data that is required for a confident estimate of model parameters. We intend to continue data collected from our Bitcoin ndoe to improve the preciaion of our estimates in the future.