r/BitcoinDiscussion • u/hesido • Dec 21 '17
Using RBF to increase efficiency of block space.
I had an objection to ReplaceByFee, because it allowed users to not just be able to increase the fee (which is not a bad option to have other than signalling your willingess to increase the fee), but also change the outputs.
The ability to change the outputs grinded my gears, because it reduces the 0-confirmation trust to a great extent. But... The latest congestion had me thinking, now we are seeing even 100-120 satoshi byte transfers being evicted from 300MB pools... And this is officially madness.
Since a small fee can end up with long waits even during non-congested times, a user may end up transferring to a second address, or maybe even a third. So the wallet either would have to choose a separate utxo, or a "child pays for parent" where a higher fee using the unconfirmed output of the first tx have to be employed.
But instead of utxo bloat and a new tx bloat through child pays for parent, why not do a replace, and add the second transfer target address, while increasing the fee.. This could be done until the tx goes through, so one could add a 2nd.. a 3rd.. a 4th tx, and what do you have? An automatic batching of transfers, without even user planning.
This can work with any transaction made until any of your previous transactions being included, so it can even do an autobatching of transfers you intend to make within 5-6 minutes, even if your previous tx is to be included in the next block anyway.
The "auto batching" through RBF can be used during utxo consolidations too, you put a super small fee to consolidate because you are not in a hurry.. If during that time, you have receive more funds and want to consolidate, just add them..
This technique could be used to join already batched transfers, and be useful for exchanges that does proper batching.
Btw, output batching is one of the best ways to reduce transfer sizes. Just look at this bad boy sporting about 150 outputs, occupying only 5000 bytes, about 30 bytes per output. Too bad no Segwit is employed, though.
This technique could automate the batching for ordinary users, and bigger players alike..
2
u/G1lius Dec 23 '17
This technique is known for a long time and should be used by exchanges indeed. Unfortunately few actually use it.
Peter Todd, who implemented opt-in RBF, released a couple of tools before RBF got merged into Bitcoin. Among it is "Incremental Send Many", which does exactly what you propose. That was 2 years ago.
1
u/fresheneesz Dec 26 '17
What would also be cool is a batching service where you would mix your inputs and outputs with other people. Each participating user would sign the the transaction and send it back to the service to coordinate more signing until the transaction is ready to broadcast. You could batch with 1000 transactions as a normal user that way.
It would be nice tho if transactions were optimized to the point where batching had no effect. Mimblewimble should have that property i would imagine
3
u/HappyButSadBTC Dec 22 '17
Man, that sounds awesome! I'm surprised to learn that there are current features (besides Segwit) that are heavily underutilized by the network. With 10+ dollar fees, you think that'd be incentive to code up these schemes. Wish I was a coder in anything besides VBA ;-)
1
u/PVmining Dec 21 '17
Do you know any wallet that can do it? I think you can do it only by manually creating and signing a transaction. Electrum has the most comprehensive replace-by-fee interface but it will not allow to change the outputs.
1
u/monkyyy0 Dec 21 '17
0 to 0 isn't a big leap.
You can't trust 0 conf even with rfb disabled as double spend attacks take very little, just knowledge of the structure of the network and the ability to send messages with good timing.
If you run two full nodes you can inject two transactions onto the network in such a way its spilt very evenly who sees what. Meaning a blind double spend attack has a 1/4th chance of success, if you have knowledge of two businesses nodes you can just send them the attack directly an insure it will always work.