I was inspired by this tweetstorm by John Newberry:
I wanted to reproduce the process using my own calculations.
I have two approaches so far:
- Compare the fee rate of my transaction to the median fee rate of all the transactions in the same block.
The is most straightforward solution.
- Compare to the 20th percentile fee rate.
By just keeping the 80% highest paying transactions (in terms of fee rate) we ignore the outliers in the bottiom 20%. According to an explanation by John, this is because if there are unconfirmed chains of transactions in the mempool, miners take the average feerate of the chain. Essentially, we do not want to be comparing against these transactions.
Questions I have to improve my process:
How can I be more specific in ignoring irrelevant transactions in the block? How could I deliberately ignore chains of unconfirmed transactions and only track 'singletons'?
Is comparing against the median fee rate a fair comparison to check if I have overpaid?
Does my approach make any sense? Shouldn't I be trying to compare against the mempool when that transaciton was broadcasted, not after? (even if it would be impossible to recreate a mempool)