The reference implementation of Bitcoin (bitcoind/Bitcoin-Qt) has ad-hoc code for dealing with transaction priorities and fees. In particular, there are several 'magic' constants that are chosen by the core developers, setting policies for minimum transaction fees, minimum transaction priorities and minimum output sizes.
This document describes the algorithms used by my 'smartfee' branch to replace most of those arbitrary constants with values that will rise and fall based on transaction volume and miners' willingness to include transactions in their blocks.
The reference implementation needs to know two things to provide a good user experience:
- If a transaction has priority X, is it likely to be included in the next N blocks?
- If a transaction has a fee of Y, is it likely to be included in the next N blocks?