What Is UTXO?
The term UTXO refers to the amount of digital currency someone has left remaining after executing a cryptocurrency transaction such as bitcoin. The letters stand for unspent transaction output. Each bitcoin transaction begins with coins used to balance the ledger. UTXOs are processed continuously and are responsible for beginning and ending each transaction. Although confirmation of transaction results in the removal of spent coins from the UTXO database, a record of the spent coins still exists on the ledger.
- A UTXO is the amount of digital currency remaining after a cryptocurrency transaction is executed.
- UTXOs are processed continuously and are responsible for beginning and ending each transaction.
- When a transaction is completed, any unspent outputs are deposited back into a database as inputs which can be used at a later date for a new transaction.
An Unspent Transaction Output (UTXO) is a discrete piece of bitcoin. Bitcoin does not use accounts and balances. Instead, individual pieces of bitcoin are owned by individuals. Each UTXO has an amount associated with it. These are the discrete units of bitcoin which are spent and received in every transaction.
When a UTXO is spent in a transaction it is destroyed, and one or more new UTXOs are created. All nodes maintain a set of existing UTXOs, called the UTXO set, which they update every time a block of transactions creates and destroys UTXOs. This allows nodes to independently verify whether a given transaction and the bitcoin it is attempting to spend are valid.
UTXOs are analogous to physical cash in that they usually require change when spent. If Alice owns a UTXO worth 1 BTC and wishes to pay Bob 0.4 BTC, she must spend the entire 1 BTC as an input. In order to send Bob exactly 0.4 BTC, Alice creates two outputs: the first to Bob, in the amount of 0.4 BTC, and the second back to herself, in the amount 0.59 BTC, assuming that she paid a 0.01 BTC transaction fee. This transaction will consume one UTXO and create 2 new ones. Note that the fee paid is not itself an output. It is implied by the sum of the inputs—1 BTC—minus the sum of the outputs—0.4 + 0.59 = 0.99 BTC. The miner of this transaction would calculate this fee and claim it for themself in the coinbase transaction.(https://river.com/learn/terms/u/unspent-transaction-output-utxo/)