What is unspent transaction output (UTXO)?
Home > What is unspent transaction output (UTXO)?
AAG Marketing
Jun 30, 2023 7 mins read

What is unspent transaction output (UTXO)?

Unspent transaction output, or UTXO, is a model that plays an important role in Bitcoin and lots of other cryptocurrencies. It is used to define where a cryptocurrency transaction starts and finishes and allows transaction outputs to be used as inputs in a new transaction. It might sound complicated, but we’ll help you understand UTXO with a simple example later on.

In addition to explaining the UTXO model in more detail, this AAG Academy article will cover how UTXO works, why it matters, and its pros and cons. We’ll also look at how the UTXO model differs from the account model, and answer some frequently asked questions.

What is the UTXO model?

To understand UTXO, we first need to recognize how a blockchain transaction works. On many networks, each transaction is made up of inputs and outputs, which, to make things really simple, can be thought of as credits and debits in a traditional currency transaction. It is how the pieces of data, which are required to make cryptocurrency transactions possible, are distributed.

You might think that those debits and credits are made up of actual tokens, but that’s not always the case. For instance, when you use Bitcoin, which employs the UTXO model, it’s not actually BTC coins that you send to other people. Instead, you send unspent transaction outputs, which will have been created when the BTC you’re using was sent to you.

Almost all transactions create UTXO because they call for increments of Bitcoin, not whole coins. In other words, they don’t use single or whole pieces of data; they combine multiple pieces to fulfill the demands of the transaction, which vary widely every time. This provides Bitcoin with the flexibility it needs to be a practical payment token.

The UTXO model also helps Bitcoin maintain the transparency it is known for. Anyone can view a UTXO on the blockchain, and Bitcoin nodes use them to agree on exactly how much BTC exists at any point in time. This allows Bitcoin’s total coin supply to be audited to ensure that its monetary policy, and the rules it was designed with, are being respected.

How does UTXO work?

To understand how the UTXO model works in more detail, we’ll use a simple example. Let’s say Andy has 0.75 BTC in his wallet. Again, this isn’t a fraction of a single BTC as you might imagine; it is simply a collection of UTXOs that Andy holds. We’ll say there are two of them: One UTXO worth 0.6 BTC, and another worth 0.15 BTC.

Andy wants to send 0.55 BTC to his friend Billy. He doesn’t have a UTXO worth 0.55 BTC exactly, so he’ll need to break up the UTXO that’s worth 0.6 BTC. Of course, Andy doesn’t actually have to worry about this himself — it is all taken care of automatically when the transaction is made. So, Andy submits a transaction request to make his payment to Billy.

The network then takes Andy’s UTXO worth 0.6 BTC, breaks it up, and sends 0.55 BTC to Billy. This creates two new UTXOs, one worth 0.55 BTC, and another that’s worth the 0.05 BTC that’s left over. The remainder goes back to Andy. (It’s important to note that Andy would obviously have to pay fees on this transaction, but we’ve cut those out to keep things simple.)

The original UTXO worth 0.6 BTC is now spent and can no longer be used, but the two UTXOs that were created to facilitate this transaction are unspent (hence the name unspent transaction output). Billy is free to spend his 0.55 BTC, and Andy is free to spend the 0.05 BTC that’s left.

Now, let’s say Andy wants to send Billy 0.7 BTC instead. In this case, Andy doesn’t hold a single UTXO that covers this transaction, so both of his UTXOs will be used to produce a new UTXO worth 0.7 BTC for Billy, and another worth 0.05 that goes back to Andy. As you might have guessed, the existing UTXOs Andy holds are inputs, and the new UTXOs created are outputs.

Why does UTXO matter?

As we touched on above, the UTXO model plays a key role in enabling Bitcoin to be an effective payment token. It means BTC can be used to facilitate a transaction, regardless of what that transaction is worth. If we had to rely on digital coins and tokens themselves, there would be limitations depending on the number and type of denominations available.

Its primary objective, however, is to track ownership of all portions of a cryptocurrency. The UTXO model means that every single piece of BTC, no matter how small, can be accounted for. We know it exists, and we know where it is, or in which wallet it is held, on the blockchain.

What are the pros and cons of the UTXO model?

One of the biggest benefits of the UTXO model is that it prevents double-spending, which is when the same BTC is used by a single person (or wallet) twice. As we explained above, UTXOs are spent and essentially destroyed once they are used, then replaced by new UTXOs, so it is near impossible to use them more than once.

The UTXO model also brings some privacy benefits. Users can store UTXOs separately with a unique address if they wish, and that makes it difficult to ascertain connections between wallets. In contrast, with the accounts model, which we look at below, it is more difficult and sometimes prohibited to generate or hold multiple accounts.

There are some downsides to UTXO that we cannot ignore, however. In addition to being more complex, UTXO transactions tend to take up more storage space, which can make it less efficient than other systems.

UTXO vs. accounts model

Some cryptocurrencies, such as Ethereum, the second-most valuable crypto in existence, use an accounts model. This is more akin to the system used in traditional finance, in which users hold an account or several accounts that have a balance. This allows precise amounts to be debited from and credited to those accounts, so there is no need for change.

This means that in order to view the state of the entire network, or to calculate the total number of tokens in existence, we only need the current set of accounts and their balances. However, with the UTXO model, a complete picture of the network’s state requires a view of all transaction outputs, spent and unspent.

Both systems have their advantages and disadvantages, so it’s difficult to say which is “best” — that usually depends on what the blockchain has been designed to do and how it operates, and therefore which model fits it best.

Sources :

Frequently Asked Questions

Both the UTXO and accounts models have their pros and cons, so the “best” usually depends on the blockchain network itself, and which model fits it best.

No, Ethereum uses the accounts model instead of the UTXO model.

Yes, Bitcoin is one of a number of major cryptocurrencies that use the UTXO model. Others include Bitcoin Cash, Cardano, Dash, and Dogecoin.

A UTXO chain is a blockchain that uses the UTXO model. You can read more about this in the guide above.

Was this article helpful?
YesNo

Have a Question? Join our active Discord

Share this article:

About the author

AAG Marketing

Disclaimer

This article is intended to provide generalized information designed to educate a broad segment of the public; it does not give personalized investment, legal, or other business and professional advice. Before taking any action, you should always consult with your own financial, legal, tax, investment, or other professional for advice on matters that affect you and/or your business.

Explore Web3 & Metaverses intuitively with Saakuru®

Get news first

Be the first to get our newsletter full of company, product updates as well as market news.

🍪
We use cookies to make your experience better. Learn more: Privacy Policy
Accept

Explore Web3 & Metaverses intuitively with MetaOne®

Download now
Download Saakuru