TL;DR: Because of the two uneven units of guidelines for alternative, a complete of 5 transactions is ample to make a cycle of replacements that beat one another in flip. This permits an attacker to rebroadcast the identical transactions again and again whereas at most paying for one small transaction per block.
You might have two confirmed UTXOs C1 and C2. Let’s say 20 s/vB is the underside of the primary block.
- You create a big low-feerate transaction
tx_LLwith 100,000 vB at 1 s/vB (payment: 100,000 s). It spends the confirmed outputC1and has an outputtx_LL:0. - You connect a small low-feerate transaction
tx_LSas a baby with 100 vB at 1 s/vB (payment: 100 s) by spendingtx_LL:0.
- You RBF
tx_LSwith a high-feerate transaction that spendsC2andtx_LL:0in a brand new transactiontx_HS.tx_HShas 5000 vB and pays 21 s/vB, however because it spends an output from a low-feerate mother or father, its mining rating is just one.95 s/vB.
- You RBF
tx_LLandtx_HSwithtx_LMthat has 100,000 vB and pays 3.05 s/vB (payment: 305,000 s) by spending the outputsC1andC2. That is permitted, since solelytx_LLis a direct battle, so the feerate oftx_HSdoesn’t need to be beat straight.
- You employ the brand new RBFr guidelines to exchange
tx_LMwith a small excessive feerate transactiontx_RBFrwith 100 vB paying 20 s/vB (payment: 2000 s) that spendsC2and makes it into the highest block of the mempool.tx_LMwas not going to be within the subsequent block, andtx_RBFrpays greater than 1.25× the feerate oftx_LM. So that is permitted below the brand new guidelines.
- You then rebroadcast
tx_LLandtx_LSas a result ofC1is now not being spent.
- You instantly substitute each
tx_LSandtx_RBFrwithtx_HS.tx_HShas a feerate of 21 s/vB which is greater thantx_RBFr(20 s/vB) andtx_LS(1 s/vB), and pays extra absolute charges than each (105,000 s vs 2000 s + 100 s). However because it’s a baby oftx_LLit solely has a mining rating of 1.95 s/vB.
Repeat 4.–7. to make each node on the community cycle the identical 5 transactions advert nauseam. Roll the locktimes or sequences to make the transaction have a brand new TXIDs in every iteration, whereas spending the identical UTXOs. The one transaction that’s ever in any hazard of getting mined is tx_RBFr which prices you 2000 s. If it it does get included in a block, simply begin over with a brand new confirmed UTXO as your c2'.