delvingbitcoin

Mempool Based Fee Estimation on Bitcoin Core

Mempool Based Fee Estimation on Bitcoin Core

Original Postby ismaelsadeeq

Posted on: March 22, 2024 11:38 UTC

In the dynamic environment of blockchain transactions, where a block is mined approximately every 10 minutes, the composition of a block can undergo significant changes within this timeframe.

This volatility affects the inclusion of transactions based on their fee rates, which are crucial for determining their priority for mining. Transactions with lower fee rates face the risk of being displaced by those with higher mining scores, especially when there's a surge in the volume of transactions entering the mempool. This displacement is particularly likely if the initial fee rate estimate was made using the median (50th percentile) of the block weight and subsequent transactions have a combined weight exceeding half of the block's maximum capacity (4,000,000 weight units). In such scenarios, the transaction in question would need to be resubmitted with a higher fee through Replace-By-Fee (RBF) to secure a place in an upcoming block.

To mitigate the risk of transaction displacement, it's suggested to base fee rate estimates on the top 25th percentile of block weights, as this approach may decrease the likelihood of underestimation and thus improve the chances of inclusion in the next block mined. Conversely, utilizing the bottom 25th percentile for estimating fee rates could lead to even lower estimates, increasing the risk of displacement due to underbidding in a competitive transaction environment.

For enhancing the accuracy of these estimations, incorporating direct blockchain data into the analysis is recommended. This method allows for real-time adjustments that more accurately reflect current network conditions and miner behavior. However, if discrepancies arise indicating a misalignment with miner expectations or network state, falling back on established methods like the CBlockPolicyEstimator for fee estimation is advised. This fallback ensures that estimations remain relevant and competitive, aligning more closely with the prevailing conditions on the blockchain.