You are viewing a single comment's thread from:

RE: Mempool Consolidation Bitcoin UTXO: Unspent Transaction Output

in LeoFinance2 months ago

It sounds like you're understanding it correctly.

The one think you don't mention is the fee... which goes to the miner of the block.
The interesting thing about the fee is that a UTXO doesn't get created because that would be immediately unsustainable (as a UTXO that small is already dust). Rather, all the fees in that block get melted together and added to the UTXO that is the block reward itself (+6.25 BTC before halving). This number is not explicitly stated everywhere, and has to be calculated by subtracting all the outputs from all the inputs. Whatever number is leftover is the fee.

In the example above if you sent 2000 to your friend and 2500 to yourself, the fee is implied to be 500 even though the blockchain doesn't actually write it down anywhere. This is called a "virtual" operation and it is simply expected that all nodes will do the math independently without putting it on the chain.

Sort:  

Great. I had to really focus to get a mental picture. I’m glad I didn’t go off the path.

I can see now that all of this can be done with whole numbers of sats for simple addition and subtraction to calculate fees. No fractions needed. It’s like the accounting joke, “subtract the $20 and my pants, and there’s your profit”.