UTXO

UTXO

This article introduces the UTXO mechanism of Bitcoin, including its definition, working principle, and application examples, and explains the important role of UTXO in the Bitcoin network. UTXO is the core of the Bitcoin ledger model, and each transaction needs to reference previous UTXOs, and must satisfy that the total value of inputs is greater than the total value of the transfer amount plus mining fees for it to be valid.

What is UTXO?

UTXO, short for Unspent Transaction Output, is a term used in cryptocurrency systems. Unlike the traditional account model, when a transaction is broadcasted to the Bitcoin network, its outputs are considered as unspent UTXOs until they are consumed by other transactions. Each UTXO includes an address and a value, and this information is stored on the Bitcoin blockchain.

How UTXO Works?

When a user sends Bitcoin, they must choose some unused UTXOs as inputs and create new UTXOs as outputs. Each transaction consumes unused UTXOs, and new UTXOs are created and recorded on the blockchain to prevent double-spending. Each transaction in the Bitcoin network must reference previous transactions and ensure that the total value of input UTXOs is greater than or equal to the total value of the transfer amount plus miner fees, otherwise the transaction is invalid.


For example, Alice received two UTXOs containing 1 BTC and 2 BTC at block height 77963. If Alice transfers 0.5 BTC to Bob at block height 78001, she only needs to consume the UTXO containing 1 BTC to meet the transfer conditions, and the remaining assets will be transferred as a new UTXO to a new change address.

Note: The change address is used to store the remaining assets after the UTXOs are consumed and is managed by the main address. When transferring on the Bitcoin network with imKey, imKey will automatically generate a new change address for the user, which enhances anonymity and saves miner fees.


(To better understand the UTXO mechanism, miner fees are temporarily ignored in the image)


If Alice transfers 2.5 BTC to Bob at block height 78001, she needs to consume two UTXOs to meet the transfer conditions, and the remaining assets will be transferred as a new UTXO to a new change address.

 

(To better understand the UTXO mechanism, miner fees are temporarily ignored in the image)