Demo: UTXOs

Here’s an example of how transactions work in Bitcoin: Let’s say that Gloria has two UTXOs, from past transactions, one worth one hundred (100) bitcoins… and one worth fifty bitcoins.

She, being incredibly wealthy and generous, wants to send one hundred and one bitcoins to me (Rustie).

To start off, she first breaks open the one hundred (100) UTXO and makes that an input for the transaction to me.

However, she recognizes that she doesn’t yet have enough in the input, so she breaks open her next UTXO worth fifty (50)…

and makes that a second input for the transaction.

The transaction now currently has two inputs, one worth one hundred (100) and one worth fifty (50), and one output worth one hundred and one (101) to me.

What about the remaining 49 bitcoins that were originally Gloria’s? Where do those go? To make sure that Gloria can spend these bitcoins at a later date, she makes a second output to herself known as a change UTXO, or another piggy bank, containing all the remaining unspent bitcoins from the inputs.

] This way, she can give one hundred and one (101) of her one hundred and fifty (150) bitcoins to me and keep her remaining forty nine (49) even though she doesn’t have UTXOs which sum up to exactly the amount she wants to spend.

From here, if I’m equally generous and want to give that remaining amount to Derrick, I can just make my new UTXO an input into a different transaction,…

the output of which will be Derrick’s new UTXO.

This is how Bitcoin effectively keeps track of individual transactions and prevents anyone from spending incorrect amounts of bitcoin.

Record Keeping (Stage 3)