Changing the minimum relay feerate

I wonder if it is possible to set minimum relay fees dynamically and preserve DoS protections, without requiring a release cycle for Bitcoin Core policy to catch up with blockspace demand and the exchange rate between BTC and EC2 bandwidth.

If one only had to account for blockspace demand the problem would be more tractable since the only thing that needs to be considered is what transactions get included in blocks, and you could pick some metric like percentile of transactions included in blocks you want to fit above the minimum relay fee. Coupled with @0xB10C’s prefill proposal, this could mitigate compact block relay issues related to minimum relay feerate.

But, miners don’t pay the total cost to the network of relaying a transaction, they only pay their own small portion of that cost. So, in some circumstances it might be profitable for miners to include transactions at a feerate (sats/vB) below the network’s relay cost (# of nodes * cost of bandwidth in sats/byte * 4 bytes/vB[1]). For an example estimate of network relay cost, that follows along the same lines as @ajtowns calculations: taking EC2’s most expensive bandwidth tier of $0.09 / GB, and 1 BTC = 100,000 USD, the cost of bandwidth is 90 \frac{\text{sats}}{\text{GB}} = 9 \times 10^{-8} \frac{\text{sats}}{\text{Byte}} = 3.6 \times 10^{-7} \frac{\text{sats}}{\text{vB}}. Multiplied by 100,000 (10^5) nodes the total network bandwidth cost is 0.036 \frac{\text{sats}}{\text{vB}}. In this scenario, the proposed minimum relay feerate of 0.1 sats/vB makes DoS’ing the network with transaction relay still more expensive than DoS’ing it with EC2.

But, determining the cost to externally relay to the Bitcoin network seems like it will always require external information (cost of internet bandwidth in sats / 4 bytes) and accurately determining the number of nodes on the network is difficult and will always be subject to sybiling, so will Bitcoin Core always have to hardcode minimum relay feerates, responding to network / market shifts one release cycle after they happen?


  1. Multiplied by 4 because in the worst case a vB is four bytes. (BIP-0141#transaction-size-calculations ↩︎

1 Like