{"type":"rich","version":"1.0","author_name":"npub1q5sgcakfxhw3ya93tvnpqeacvf32p6lw70hke53rkjnf9lhw9w8s43ps87","author_url":"https://nostr.ae/npub1q5sgcakfxhw3ya93tvnpqeacvf32p6lw70hke53rkjnf9lhw9w8s43ps87","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2015-05-26\n📝 Original message:What prevents RBF from being used for fraudulent payment reversals?\n\nPay 1BTC to Alice for hard goods, then after you receive the goods\nbroadcast a double spend of that transaction to pay Alice nothing? Your\nonly cost is the higher network fee of the 2nd tx.\n\nThanks,\n-Danny\n\nOn Mon, May 25, 2015 at 5:10 PM, Peter Todd \u003cpete at petertodd.org\u003e wrote:\n\n\u003e On Tue, May 26, 2015 at 12:03:09AM +0200, Mike Hearn wrote:\n\u003e \u003e CPFP also solves it just fine.\n\u003e\n\u003e CPFP is a significantly more expensive way of paying fees than RBF,\n\u003e particularly for the use-case of defragmenting outputs, with cost\n\u003e savings ranging from 30% to 90%\n\u003e\n\u003e\n\u003e Case 1: CPFP vs. RBF for increasing the fee on a single tx\n\u003e ----------------------------------------------------------\n\u003e\n\u003e Creating an spending a P2PKH output uses 34 bytes of txout, and 148\n\u003e bytes of txin, 182 bytes total.\n\u003e\n\u003e Let's suppose I have a 1 BTC P2PKH output and I want to pay 0.1 BTC to\n\u003e Alice. This results in a 1in/2out transaction t1 that's 226 bytes in size.\n\u003e I forget to click on the \"priority fee\" option, so it goes out with the\n\u003e minimum fee of 2.26uBTC. Whoops! I use CPFP to spend that output,\n\u003e creating a new transaction t2 that's 192 bytes in size. I want to pay\n\u003e 1mBTC/KB for a fast confirmation, so I'm now paying 418uBTC of\n\u003e transaction fees.\n\u003e\n\u003e On the other hand, had I use RBF, my wallet would have simply\n\u003e rebroadcast t1 with the change address decreased. The rules require you\n\u003e to pay 2.26uBTC for the bandwidth consumed broadcasting it, plus the new\n\u003e fee level, or 218uBTC of fees in total.\n\u003e\n\u003e Cost savings: 48%\n\u003e\n\u003e\n\u003e Case 2: Paying multiple recipients in succession\n\u003e ------------------------------------------------\n\u003e\n\u003e Suppose that after I pay Alice, I also decide to pay Bob for his hard\n\u003e work demonstrating cryptographic protocols. I need to create a new\n\u003e transaction t2 spending t1's change address. Normally t2 would be\n\u003e another 226 bytes in size, resulting in 226uBTC additional fees.\n\u003e\n\u003e With RBF on the other hand I can simply double-spend t1 with a\n\u003e transaction paying both Alice and Bob. This new transaction is 260 bytes\n\u003e in size. I have to pay 2.6uBTC additional fees to pay for the bandwidth\n\u003e consumed broadcasting it, resulting in an additional 36uBTC of fees.\n\u003e\n\u003e Cost savings: 84%\n\u003e\n\u003e\n\u003e Case 3: Paying multiple recipients from a 2-of-3 multisig wallet\n\u003e ----------------------------------------------------------------\n\u003e\n\u003e The above situation gets even worse with multisig. t1 in the multisig\n\u003e case is 367 bytes; t2 another 367 bytes, costing an additional 367uBTC\n\u003e in fees. With RBF we rewrite t1 with an additional output, resulting in\n\u003e a 399 byte transaction, with just 36uBTC in additional fees.\n\u003e\n\u003e Cost savings: 90%\n\u003e\n\u003e\n\u003e Case 4: Dust defragmentation\n\u003e ----------------------------\n\u003e\n\u003e My wallet has a two transaction outputs that it wants to combine into\n\u003e one for the purpose of UTXO defragmentation. It broadcasts transaction\n\u003e t1 with two inputs and one output, size 340 bytes, paying zero fees.\n\u003e\n\u003e Prior to the transaction confirming I find I need to spend those funds\n\u003e for a priority transaction at the 1mBTC/KB fee level. This transaction,\n\u003e t2a, has one input and two outputs, 226 bytes in size. However it needs\n\u003e to pay fees for both transactions at once, resulting in a combined total\n\u003e fee of 556uBTC. If this situation happens frequently, defragmenting\n\u003e UTXOs is likely to cost more in additional fees than it saves.\n\u003e\n\u003e With RBF I'd simply doublespend t1 with a 2-in-2-out transaction 374\n\u003e bytes in size, paying 374uBTC. Even better, if one of the two inputs is\n\u003e sufficiently large to cover my costs I can doublespend t1 with a\n\u003e 1-in-2-out tx just 226 bytes in size, paying 226uBTC.\n\u003e\n\u003e Cost savings: 32% to 59%, or even infinite if defragmentation w/o RBF\n\u003e               costs you more than you save\n\u003e\n\u003e --\n\u003e 'peter'[:-1]@petertodd.org\n\u003e 0000000000000000134ce6577d4122094479f548b997baf84367eaf0c190bc9f\n\u003e\n\u003e\n\u003e ------------------------------------------------------------------------------\n\u003e One dashboard for servers and applications across Physical-Virtual-Cloud\n\u003e Widest out-of-the-box monitoring support with 50+ applications\n\u003e Performance metrics, stats and reports that give you Actionable Insights\n\u003e Deep dive visibility with transaction tracing using APM Insight.\n\u003e http://ad.doubleclick.net/ddm/clk/290420510;117567292;y\n\u003e _______________________________________________\n\u003e Bitcoin-development mailing list\n\u003e Bitcoin-development at lists.sourceforge.net\n\u003e https://lists.sourceforge.net/lists/listinfo/bitcoin-development\n\u003e\n\u003e\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150526/4f1264c0/attachment.html\u003e"}
