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 enables an attacker to rebroadcast the identical transactions time and again whereas at most paying for one small transaction per block.
In all the graphics an arrow factors from baby to mother or father, whereas a dotted line with a socket and ball factors from authentic to alternative with socket and ball along with the alternative. A socket with out ball (see Step 4) signifies an oblique battle with the socket on the aspect of the alternative.
You have got three confirmed UTXOs c1, c2 and c3. Let’s say 20 s/vB is the underside of the primary block.
- You create
tx_LL, a big low-feerate transaction with 100,000 vB at 1 s/vB (price: 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 (price: 100 s) by spendingtx_LL:0.
- You exchange
tx_LSwithtx_HSa high-feerate transaction that spendsc2andtx_LL:0.tx_HShas 5000 vB and pays 21 s/vB, however because it spends an output of a low-feerate mother or father, its mining rating is only one.95 s/vB.
- You exchange
tx_LLwithtx_LMthat has 100,000 vB and pays 3.05 s/vB (price: 305,000 s) by spending the outputsc1andc3.tx_LMadditionally not directly replacestx_HSeven whereastx_HShas a better particular person feerate. That is permitted, sincetx_LMpays a better complete price than the changed transactions and since it solely conflicts instantly withtx_LLit solely has to beat the feerate oftx_LLhowever not the feerate oftx_HS.
- You employ the brand new RBFr guidelines to switch
tx_LMwith a small excessive feerate transactiontx_RBFrwith 200 vB paying 20 s/vB (price: 4000 s) that spendsc3and 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 underneath the brand new guidelines.
- As no transaction within the mempool spends
c1, you then rebroadcasttx_LLandtx_LS.
- You instantly exchange each
tx_LSandtx_RBFrwithtx_HS.tx_HShas a feerate of 21 s/vB which is increased 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 4000 sats. If it it does get included in a block, simply begin over with two new confirmed UTXOs as your c2' and c3'.





