Tuesday, November 5, 2024

mempool – What’s the downside with the current “One-Shot Exchange-by-Payment-Charge” Proposal?

TL;DR: Because of the two uneven units of guidelines for substitute, a complete of 5 transactions is enough to make a cycle of replacements that beat one another in flip. This enables an attacker to rebroadcast the identical transactions again and again whereas at most paying for one small transaction per block.


You’ve got two confirmed UTXOs C1 and C2. Let’s say 20 s/vB is the underside of the primary block.

  1. You create a big low-feerate transaction tx_LL with 100,000 vB at 1 s/vB (charge: 100,000 s). It spends the confirmed output C1 and has an output tx_LL:0.
  2. You connect a small low-feerate transaction tx_LS as a baby with 100 vB at 1 s/vB (charge: 100 s) by spending tx_LL:0.

RBFr LL_LS.png

  1. You RBF tx_LS with a high-feerate transaction that spends C2 and tx_LL:0 in a brand new transaction tx_HS. tx_HS has 5000 vB and pays 21 s/vB, however because it spends an output from a low-feerate mother or father, its mining rating is only one.95 s/vB.

RBFr LL_HS.png

  1. You RBF tx_LL and tx_HS with tx_LM that has 100,000 vB and pays 3.05 s/vB (charge: 305,000 s) by spending the outputs C1 and C2. That is permitted, since solely tx_LL is a direct battle, so the feerate of tx_HS doesn’t must be beat immediately.

RBFr LM.png

  1. You employ the brand new RBFr guidelines to switch tx_LM with a small excessive feerate transaction tx_RBFr with 100 vB paying 20 s/vB (charge: 2000 s) that spends C2 and makes it into the highest block of the mempool. tx_LM was not going to be within the subsequent block, and tx_RBFr pays greater than 1.25× the feerate of tx_LM. So that is permitted beneath the brand new guidelines.

RBFr RBFr.png

  1. You then rebroadcast tx_LL and tx_LS as a result of C1 is now not being spent.

RBFr rebroadcast LL_LS.png

  1. You instantly exchange each tx_LS and tx_RBFr with tx_HS. tx_HS has a feerate of 21 s/vB which is increased than tx_RBFr (20 s/vB) and tx_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 of tx_LL it solely has a mining rating of 1.95 s/vB.

RBFr HS.png

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'.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles