It’s an uncomplicated lot
Sometimes, trying to understand the words and terms behind blockchain technology is enough to turn away potential users who may only be out to make something out of their hard-earned money. Newly coined phrases not found in the dictionary are terminologies to identify parts of the whole crypto ecosystem that can be as common as can be once you traverse the digital highway. One of those is UTXO.
UTXO simply stands for Unspent Transaction Output. A technical model which is standard to the Bitcoin infrastructure. To provide a clearer picture, we need to travel back to how Bitcoin was conceptualized, beginning with The Blockchain.
To refer to Bitcoin’s blockchain is to refer to it with a capital B. The Blockchain is an Internet-based mathematical infrastructure containing data that the protocol interprets. It is a chain of blocks containing two structure types – header and Transaction List. The Header houses all metadata of a particular block which includes the hash of the previous block that is also hashed to a previous block that is also hashed to a previous block, and so forth and so on, until it reaches back to the first-ever block, the genesis block. This block chaining is a lot like a list linked in succession. Hence, Blockchain. In the summary section is the Header data and the section below it is the Transaction List. The first transaction of every block is the coinbase transaction where miners get their reward.
The Transaction Structure
Inside a single transaction, there many different structures, with the first one called Transaction Version. It is a version number in which a node determines the set of rules to verify the transaction. The end structure is the Lock Time which declares if the transaction is ready to be included in the blockchain according to a specified time. In between Transaction Version and Lock Time are lists of Inputs and Outputs. The transaction’s Output contains a cryptographic lock and a value. The Outputs are locked, and the Input keeps the key to open it. The value is the amount of satoshis locked in the Output.
Now, each transaction input has a pointer and an unlocking key. The pointer marks a previous transaction output, and the unlocking key is used to open the previous output the pointer is pointing to. When the input is successful in unlocking the output, the blockchain database marks it as ‘spent.’ A transaction, thus, unlocks previous outputs and creates new outputs. These created new outputs are none other than new inputs still to be unlocked by an input, or UTXO, the Unspent Transaction Output.
An unlocked output is removed from the circulating supply, and new outputs take over. Thus, the sum value of the unlocked outputs is always equal to the sum value of newly created outputs. It means that the circulating supply of bitcoins remains the same in total. Therefore, A UTXO is the same as a locked-up box of Bitcoin that is full of satoshis. Every output can be traced back via a transaction history graph until it reaches where a coinbase transaction created an output.
The UTXO Set
The UTXO set is the collection of all UTXOs maintained by every Bitcoin node or participating computer. It is known as chain state is updated on automation when a new block enters the blockchain after being verified. The block holds the list of the latest transactions defining which UTXOs were spent and which UTXOs are created. When a wallet is queried by the owner for Bitcoin balance, the wallet’s backend structure collects data of all UTXOs owned and reveals the sum value. That is now the total balance in the wallet.
UTXO and the Real World
UTXOs are to the Blockchain, where physical cash is to the real world. When goods are paid, a full bill is given, and the change is taken back. Similarly, UTXOs are consumed fully even though the payment is only partial. If a transaction is worth 6 BTC, but a UTXO available is worth 10 BTC, a UTXO worth 10 BTC pays, then two new UTXOs are created, one for 6 BTC, and another for 4 BTC. Each time a smaller value is paid with a higher UTXO value, the wallet creates on automation the change UTXO for the owner.
Bitcoin’s UTXOs are simple for transactions since they are consumed as a whole and only once. Though not intuitively flexible in usability, they are scalable and private, unlike account balance models used by Ethereum, which needed a more flexible model that executes based on the owner/user’s total account balance. All in all, UTXO usage depends upon a blockchain project’s system requirements.