In the ephemeral anchors draft BIP (also discussed here) it states that without V3 transactions an adversary can increase the required fees to replace a transaction as much as 500 times. That sounds a lot. What is the exact scenario where there would be a 500 times increase?
2 Answers
Yes it is, that's why "economical pinning" is also an issue. Requiring a high enough fee increase is comparable to preventing you from replacing altogether. And if you actually replace it, this didn't cost them anything to perform this attack in the first place.
To give you an example, let's take a 200
vb transaction with a 2_000
sats fee (10
sats/vb). If an attacker can replace it by a 100_000
vb version of this transaction that pays a 1_000_000
sats fee, the cheapest way by the current replacement rules to bump the feerate of this transaction is to pay 1_000_200
sats for the original 200
vb transaction.
This is a 5001
factor increase in feerate, and a 500.1
factor increase in absolute fees to be able to replace the transaction.
-
Doesn't that imply that the attacker also has to spend 500x the original fee?– bluesCommented Apr 27, 2023 at 9:09
-
Not if you end up replacing it :) And usually it would be used in order to achieve a larger gain anyways (like stealing an HTLC for instance). Commented Apr 28, 2023 at 10:10
The example given in version3_transactions.md shows how to get a fee rate increase of 100x, but if you assume transaction B is 200vB, instead of 1000vB, you can also demonstrate a 500x increase with that example (copied below).
"Rule 3" Pinning
RBF rules require the replacement transaction pay a higher absolute fee than the aggregate fees paid by all original transactions. This means Mallory may increase the fees required to replace B by:
- Adding transaction(s) that descend from B and pay a feerate too low to fee-bump B through CPFP.
For example, assuming the default descendant size limit is 101KvB and B is 1000vB paying a feerate of 2sat/vB, adding a 100KvB, 2sat/vB child increases the cost to replace B by 200Ksat.
- Adding a high-fee descendant of B that also spends from a large, low-feerate mempool transaction, C. The child may pay a very large fee but not actually be fee-bumping B if its overall ancestor feerate is still lower than B's individual feerate.
For example, assuming the default ancestor size limit is 101KvB, B is 1000vB paying 2sat/vB, and C is 99KvB paying 1sat/vB, adding a 1000vB child of B and C increases the cost to replace B by 101Ksat.