pull down to refresh

Zero fee playground

A site for trying out zero fee bitcoin transactions

How to try it

What is it?

This project showcases a recent upgrade to bitcoin in version 28. Before v28, all nodes refused, by default, to relay transactions that paid zero fees, and miners refused to mine them. Also, nodes and miners rejected transactions that did pay a fee if it was below a "minimum fee" threshold. The "minimum fee" threshold varied on a node-by-node basis, but it was related to the average fee paid by the transactions in each node's copy of the mempool.
V28 changed the rules. A transaction can now pay zero fees (or a fee below the "minimum fee" threshold) if it is paired with a second transaction that pays extra fees. To follow the new rule, the second transaction has to pay enough fees that, when the two transactions are considered together, their "combined feerate" is above the old "minimum fee" threshold. There are also several other conditions they have to follow; for example, the two transactions have to have version number 3, and the "first" one can't spend an unconfirmed utxo. The full rules are outlined in Bip 431 and Bip 331.
If you visit this link and follow the steps, you will create a pair of transactions that follows the new rules. The first of your two transactions will pay zero fees, but nodes will still relay it (and miners will still mine it) as long as it is paired with the second transaction.
186 sats \ 1 reply \ @OT 11 Dec
I like the idea of moving an already coin joined UTXO with zero fees and a few other participants. I bet there are tens of thousands of 1m sat UTXO's still in Samurai's whirlpool that need to be moved.
reply
yeah, that could be interesting
I wanted to learn how to use zero fee transactions because they can improve several of my projects, including hedgehog and my statechain implementation
I also came up with a coinpool idea recently that benefits from zero fee transactions
But first I had to play around with them to learn how they work, and now I know how to do that and figured I'd help other people play with them too
reply
How long do zero fee payments hang out in the waiting room? Is this mempool or some other place? If mempool and long, won't attacs bloat it?
reply
How long do zero fee payments hang out in the waiting room?
They don't normally spend any time waiting at all. The transaction that takes them out of the waiting room must be broadcasted together with the transaction that puts them in there; by default, they are relayed together and mined together, so the moment a UTXO enters a waiting room, it also leaves it. This is enforced by a standardness rule, so you could only make a tx wait in the waiting room by bribing a miner to keep it there for longer than it's supposed to be, e.g. using an out-of-band payment.
Is [the waiting room] mempool or some other place?
The waiting room is not the mempool, it is not part of zero fee transactions generally, it is just something I made for this demo page. I chose to send money from address_1, which is the address displayed in step 1, to address_2, which is a random address generated by the demo software to show that the money can really go anywhere in a zero fee transaction, and then to address_3, which is an address chosen by the user during step 2. I decided to call address_2 "the waiting room" for purposes of the demo, just so it could have a name, but perhaps that was a mistake. Several people have expressed confusion about it, and in fact no time is spent waiting there. I don't know what else I shoulld call it. Suggestions welcome!
If mempool and long, won't attacs bloat it?
It's not mempool, it's there for no time at all, and it's just something I made up for use in this demo, it's not part of the zero fee transactions protocol (though it is one of the things devs can do with this protocol, because I did it).
reply
then I miss the point of this all. why chain two transactions A->B->C if in the end you just pay a higher total fee that paying directly from A to C?
reply
It's for use in protocols where you have to create a transaction at time A but it might not be broadcasted til time B, and you don't know what fees will be at time B
These feeless transactions allow you to set a fee of 0 on the transaction at time A and then select the appropriate fee at time B by making a child transaction
You might wonder "why not just wait til time B to make your transaction and give it an appropriate fee then, i.e. when you actually want to broadcast it, instead of making a second transaction that pays the real fee"
But this isn't always feasible. For example, watchtowers on the lightning network don't have the private keys necessary to write the transaction for you -- they can just hang onto a transaction you wrote weeks or months ago and broadcast it if it becomes necessary.
But perhaps the transaction you wrote weeks or months ago used a feerate that is too low to get mined when the watchtower broadcasts it. This new protocol allows you to set a fee of 0 and then the watchtower can pay the fees for you by pairing your 0 fee transaction with a transaction of their own. (And they'd presumably charge you a monthly fee to cover the cost of doing so.)
So this helps with any protocol that makes use of watchtowers (lightning and statechains come to mind) but it also helps with any protocol where (1) you create a transaction at time A (2) you can't predict what fees will be at time B (3) you can't rewrite the transaction at time B (4) but you, or someone else, can "bump" the fee with a child transaction
reply
ok, thanks. maybe some idea along these lines will help avoid FCs due to disagreements about the commitment fee between different implementations. will keep an eye.
reply
12 sats \ 1 reply \ @ek 12 Dec
Is P2A related to package relay?
edit: Oh, I see you linked to BIP-331 which seems to be the package relay BIP
reply
Yes, the p2a address type was created for use in packages
reply
Update: I added an option to use the new P2A address type that was also introduced in v28 (well, actually it was introduced slightly before v28, but it was introduced for use in v28 of bitcoin).
P2A addresses look very funny in my opinion. Here they are in all three formats that bitcoin supports:
mainnet: bc1pfeessrawgf regtest: bcrt1pfeesnyr2tx testnet: tb1pfees9rn5nz
Those are also the only P2A addresses. No other P2A addresses exist; and even those three are actually the same address, just encoded in three different ways for bitcoin's three different types of networks. It's so weird that these were added to bitcoin and you can really send money to them and then spend that money like how "normal" bitcoin addresses work. (Well, kinda...they work, but they work kinda funny. Check out the playground for more details.) And it's weird that they were created to solve headaches involving mining fees, and the word "fees" randomly happens to appear in all three versions of this address. Wild! Try them out in the playground today.
reply
0 sats \ 2 replies \ @Ge 12 Dec
Wow this is sick there goes that selling of test net coins Super Testnet out here doing the lords work
reply
there goes that selling of test net coins
Huh? What is this a reference to? Is someone selling testnet coins?
reply
0 sats \ 0 replies \ @Ge 12 Dec
that was word on the streets!!
reply
stackers have outlawed this. turn on wild west mode in your /settings to see outlawed content.