delvingbitcoin

Package aware Fee estimator post cluster mempool

Package aware Fee estimator post cluster mempool

Original Postby ajtowns

Posted on: December 24, 2023 11:14 UTC

The process of tracking transactions within the Bitcoin network involves monitoring chunks, which are essentially groupings of transactions or individual transactions in isolation.

Transactions enter the mempool with an associated fee rate and remain there until confirmed in a block. Fee estimation models are built on understanding the relationship between fee rates and confirmation times, specifically by analyzing how many blocks it takes for a transaction to be confirmed given a certain fee rate.

An interesting scenario arises when dealing with Child Pays For Parent (CPFP) transactions, where a subsequent transaction (C) can pay a higher fee rate to expedite the confirmation of a preceding transaction (P). When such pairings occur, a combined chunk [P,C] is created with a new, higher average fee rate. If this chunk confirms, the time taken from the initial entry of P into the mempool is considered for fee estimation purposes.

However, complications occur if the child transaction C is replaced by another transaction D through Replace-By-Fee (RBF), leaving the parent transaction P to be confirmed at its original lower fee rate. In this case, the question presented is whether to revert to counting the time P has spent in the mempool for fee estimation.

A proposed rule suggests that for every chunk in the mempool that sees some of its transactions included in a newly mined block, fee estimation should only consider the chunk if all its transactions were confirmed. If any transaction within the chunk remains unconfirmed, the chunk should be disregarded for fee estimation purposes. When taking a chunk into account, the fee estimation should use the fee rate associated with the chunk and the mempool duration of the youngest transaction in the chunk. This approach aims to refine the accuracy of fee estimations by considering the dynamic nature of transaction confirmations and fee rates.