What is a Bitcoin UTXO?

This text is taken from a longer article about Coinjoins.

Unspent Transaction Output (UTXO)

“UTXO” is a horrible, horrible name. While it accurately describes what it is, and it’s understandable by an experienced Bitcoiner, it is complete gobbledygook for someone new. It would be better if it was called “Received Coin” or something similar. Just from that, you might already understand what it is.

Even though bitcoins are divisible, think of Bitcoin amounts not like a dividable liquid, but of discrete amounts, like coins in a purse. I like to use Bitcoin’s competitor, gold, as an example. Imagine you received a gold coin weighing 1.2 ounces. And now you want to pay someone 0.2 ounces. You’d have to melt the 1.2-ounce coin and make two coins, one weighing 0.2 ounces for the payment, and the rest as a 1.0-ounce coin for you to keep.

Bitcoin is similar. When you receive 1.2 bitcoin to your wallet, you have a discrete 1.2 bitcoin “received coin” or UTXO. If you wanted to spend 0.2 of that, you can’t break off a piece of it and spend only that; you have to “melt” the entire 1.2 bitcoin amount first by putting it in a transaction. With the transaction, you can divide it up however you want, and send it to as many different addresses as you want, including back to one of your own addresses.

This is where the concept of “change” comes in. To spend 0.2 bitcoin, you take the 1.2 bitcoin as an input to the transaction, and make 2 outputs; one as payment (0.2 bitcoin), and another (1.0 bitcoin) as change back you one of your own addresses. It would look like this:

Alice’s 1.2 bitcoin sitting in one of her wallets’ addresses has been split into two. The Lambo dealer’s wallet address has received 0.2 bitcoin, and a different address in Alice’s wallet receives 1.0 bitcoin.

One final example – imagine you have the following UTXOs in your wallet, and you need to pay 0.6 bitcoin to someone.

  • 0.2 bitcoin
  • 0.5 bitcoin
  • 0.002 bitcoin

Your transaction would take the 0.2 and 0.5 bitcoin UTXOs and put them into a transaction (and leave the 0.002 bitcoin UTXO alone). The transaction would have two outputs: 0.6 bitcoin as the payment, and 0.1 bitcoin as change. After the transaction, your wallet will have a 0.002 bitcoin UTXO and the 0.1 bitcoin UTXO. Two “coins” in total, with a total balance of 0.102 bitcoin (ignoring mining fees to keep it simple).

Tips:

Static Lightning Address: dandysack84@walletofsatoshi.com

%d bloggers like this: