delvingbitcoin

Mempool Based Fee Estimation on Bitcoin Core

Mempool Based Fee Estimation on Bitcoin Core

Original Postby harding

Posted on: March 22, 2024 23:41 UTC

In the complex world of cryptocurrency mining, there are potential strategies miners might employ to manipulate the mempool, leading to congestion and a spike in transaction fees.

One such method involves the creation of large, high-fee transactions that are initially withheld from broadcast. Concurrently, a miner, referred to here as Mallory, generates a minimal-size, zero-fee transaction that directly conflicts with the previously created transactions. This conflicting transaction is included in the miner's block templates. When Mallory successfully mines a block containing this zero-fee transaction, she delays broadcasting this block. Instead, she broadcasts her large, original transactions, waits briefly, then releases her mined block into the network. This sequence of actions can deceive other users into increasing their fee rates based on the misleading data provided by the initial large transactions, potentially leading to an artificial inflation of transaction fees.

This strategy is essentially a variant of the Finney attack but requires the miner to risk losing the block reward, which is currently dominated by the subsidy. Nevertheless, as transaction fees become a more significant part of the reward, this tactic could provide a worthwhile gamble for miners who do not hold the majority power but are substantial enough to influence the network briefly. Such maneuvers exploit the feedback loop between current transaction fees, estimated fees, and future fees, highlighting a vulnerability in the way fee estimates are calculated.

The algorithmic determination of fee rates plays a pivotal role in this context. Algorithms that lower fee rates too aggressively might lead to transactions not getting mined due to negative feedback, affecting only those unable to conveniently increase their transaction fees. Conversely, algorithms that raise fee rates too aggressively may receive positive feedback as their transactions get mined, encouraging even higher fee rate estimates. This escalation continues until it reaches a point where users refuse to transact due to exorbitant fees. This situation illustrates a critical concern: while using mempool data to adjust fee rates upwards can lead to overbidding and potential manipulation by miners, lowering fee rates based on such information might be safer and more user-friendly, assuming users have the flexibility to adjust their transaction fees without significant inconvenience.