Bitcoin UTxO explained: Unspent Transaction Outputs

Everything you need to know about the Bitcoin UTxO model, and what exactly unspent transaction outputs are.
bitcoin explained illustration

In traditional finance, banks make use of an accounting model, where the balance of users is simply incremented after receiving a payment and decremented and doing a payment.

Many cryptocurrencies like Bitcoin, on the other hand, do not use such an accounting system, but something called a UTxO model, which is comparable to traditional paper money.

What is a UTxO?

The term UTxO stands for Unspent Transaction Output, which is a spendable unit of Bitcoin that can be compared to a single paper bill or coin as you know from traditional cash money.

Unlike cash money, a Bitcoin UTxO may contain any amount of Bitcoin, e.g. 0.0015 or 210.21 BTC, and does not have predetermined denominations as known from traditional paper bills and coins.

All Bitcoin, without exception, are stored and transferred in the form of such UTxOs on the Blockchain.

This means that, users of Bitcoin mostly own many different UTxOs that are not connected to each other but make up their entire Bitcoin balance, similar to how all the individual paper bills and silver coins together make up the amount of money you have in a wallet.

Consequently, there is no such thing as accounts in the Bitcoin network that would keep track of how many Bitcoin every single user owns. Instead, the total Bitcoin balance you see in your crypto wallet is determined by all your unique UTxOs stored somewhere in the Bitcoin blockchain.

How are UTxOs created?

As the name Unspent Transaction Outputs suggests, UTxOs are being created as results of transactions on a blockchain.

In practice, when a user sends you Bitcoins, he spends one or many of his UTxOs to create one or many new UTxOs for you as the output of his transaction.

The sender may also create a UTxO for himself to receive back any remaining amount of Bitcoin that remained unused in this transaction.

Bitcoin UTxO transaction
Bitcoin UTxO Transaction

Bitcoin UTxOs are therefore never transferred directly, but are first spent (deactivated) and then recreated: if you were to send all your Bitcoin to yourself ten times, for example, your Bitcoin would actually be contained in a different Bitcoin UTxO after each of those ten transactions.

After you spend any of your UTxOs by transferring some Bitcoin, your UTxOs simply become Spent Transaction Outputs (STxOs), or in other words, empty UTxOs with no more Bitcoin value.

Spent UTxOs are nevertheless not deleted from the Bitcoin blockchain under any circumstance, so that all transactions are truly set in stone and remain traceable forever. Because of that, the Bitcoin of each UTxO can be traced back to its total origin, where it was originally paid out to a Bitcoin miner as a mining reward.

UTxO Access Control

In order to be able to spend UTxOs, the sender must, of course, somehow prove to the blockchain network that he really is the owner of these UTxOs. Unlike banks, however, you cannot rely on your real identity on pseodonymous blockchains, because your identity in a blockchain merely consists of some numbers and digits.

This is where asymmetric cryptography consisting of private and public keys comes into play on blockchains.

When you receive Bitcoin from someone, the sender cryptographically locks the UTxOs created for you with your public key, or a receiving address created from it, so that only you are allowed to spend those UTxOs with your private keys.

As soon as you want to unlock and spend your UTxOs in the future, you have to create a digital signature with the help of your private key, proving to the Bitcoin network that you are the real owner of your Bitcoin UTxOs.

Bitcoin UTxOs: Practical Examples

Owning a UTxO of 100 Bitcoin is analogous to owning a $100 paper bill: If you want to buy something for $5 but only own a $100 paper bill, you pay your recipient $100 and receive a change of $95.

In the case of Bitcoin, if you want to pay someone 5 Bitcoin but only own a UTxO containing 100 Bitcoin, you would spend that UTxO of 100 Bitcoin to create a new UTxO with 5 Bitcoins for the recipient, and a new UTxO of 95 Bitcoin for yourself.

This process of spending existing UTxOs to create new UTxOs is called a Bitcoin transaction.

💡

Note: You cannot spend a fraction of a UTxO, just like you can't rip a $10 bill in half to pay someone $5. That's why you may see your Bitcoin transactions on a blockchain explorer having two recipients, even though you're sending money to only one person. In that case, the second recipient is you paying yourself a new UTxO as a change because you did not own a UTxO containing the exact amount you wanted to pay someone.

Similarly, owning a UTxO containing 2 Bitcoin, as well as a UTxO containing 0.5 Bitcoin is analogous to owning a $2 bill and a $0.5 coin. If you'd now like to send someone 2.5 Bitcoin, you would simply put the UTxO of 2 Bitcoin, as well as the UTxO of 0.5 Bitcoin together to create a new UTxO of 2.5 Bitcoin for the recipient.

Hence, UTxOs are just like paper bills and coins in your real-life wallet. They can be spent independently or combined with other UTxOs to pay higher amounts.

Benefits of the UTxO Model

The three biggest advantages of the UTxO model are easier verifiability, higher scalability, and privacy of user funds on a public blockchain.

Easy Traceability

UTxOs create a transparent "supply chain" where every newly created UTxO is linked with the transaction that created it.

The UTxO model makes it very easy to track down the funds of every user back to their very origin and verify that the funds are valid and adhere to the rules of the Blockchain.

This is quite the opposite of an accounting model: Verifying the funds of a user on account-based blockchains like Ethereum pretty much requires scanning the entire blockchain from beginning to end for possible transactions, as there are no UTxOs that would link to each other.

Scalability

Because UTxOs create this previously mentioned supply chain of funds, transactions on UTxO-based blockchains like Bitcoin are encapsulated as they never modify any account or global states that would track the total balance of users.

This makes sending and receiving Bitcoin as easy as spending a UTxO and creating a new one. Validating such a transaction requires just a few easily-done cryptographic checks of the provided digital signatures.

Transacting on account-based blockchains like Ethereum on the other hand, requires complex checks and updates of global account states, with potential conflicts across different transactions and many different edge cases that increase the computational load.

In theory, this makes UTxO-based blockchains involve less computational overload for processing and verifying transactions, making them more performant and easier for users to run a full node.

From a data structure perspective, the UTxO model links money flows in the form of a linked list that can be especially easily traversed. In the account model, on the other hand, transactions are only ordered chronologically, similar to an ordered array.

Privacy

The UTxO model of Bitcoin also increases the privacy of the entire Bitcoin network.

This is because a UTxO is only associated with a receiving address instead of an entire account. And because Bitcoin users can generate as many receiving addresses as they'd like, they can receive Bitcoin with newly generated addresses for each single UTxO.

For example, if you would receive Bitcoin 100 times using 100 different receiving addresses generated by your Bitcoin wallet, all of your 100 different Bitcoin UTxOs would not be publicly associated in any way. No one besides you would actually know that your private key gives you access to all of those 100 unique Bitcoin UTxOs.

This would create the illusion that the 100 Bitcoin UTxOs are actually owned by 100 unique individuals, and allow you to hide your wealth from the network until you combined those UTxOs to create bigger Bitcoin payments in the future.

Only when you use several of your UTxOs in a single transaction do you expose yourself as the owner of all these UTxOs, leaving lots of room for privacy. For this reason, privacy advocates often even forfeit small Bitcoin UTxO amounts of a few dollars, just to avoid linking their money flows.

If Bitcoin used an accounting model like banks or the cryptocurrency Ethereum, all of your Bitcoin transactions would be associated with a single, unique account, making it extremely easy for everyone in the network to see your entire transaction history, and hence your total balance.

Which Blockchains use UTxOs?

While Bitcoin was the first cryptocurrency to introduce the UTxO model, many other blockchains adopted this approach.

Some known cryptocurrencies utilizing the UTxO model include Litecoin (LTC), Cardano (ADA), Dash (DASH), Tezos (XTZ), and ZCash (ZEC).

To allow for more complex transactions and smart contracts, cryptocurrencies like Cardano use an extended UTxO Model - the eUTxO - which makes UTxOs programmable and customizable.