UTXO

Also known as: Unspent transaction output

On this page 7

A UTXO (unspent transaction output) is a discrete chunk of cryptocurrency created by one transaction, locked to a spending condition, and not yet consumed by any later transaction. In blockchain fundamentals, the UTXO model is one of the two dominant ways a ledger records who owns what: instead of keeping account balances, the network keeps a set of individual outputs, and a balance is simply the sum of the outputs a key can unlock.

Bitcoin introduced the model, and Litecoin, Bitcoin Cash, Dogecoin and Cardano (in an extended form) use it as well. Understanding UTXOs explains why wallets produce change outputs, why transaction fees depend on size rather than amount, and why many small payments can become expensive to spend later.

How the UTXO model records ownership

The UTXO model records ownership as a set of unspent outputs, often called the UTXO set, that every full node keeps in its database. Each transaction consumes one or more existing outputs as inputs and creates new outputs that assign value to new spending conditions. Once an output is used as an input, it is removed from the set permanently; it can never be partly spent.

Because outputs are spent whole, a payment that needs less than an available output must return the remainder to the sender. If Alice holds a single output of 0.5 BTC and pays 0.2 BTC, her transaction creates one output of 0.2 BTC for the recipient and a change output of roughly 0.3 BTC back to an address she controls. The difference between total inputs and total outputs is the implicit transaction fee, collected by the miner who includes the transaction in a block.

Each output carries two essential fields: an amount denominated in the smallest unit (satoshis in Bitcoin) and a locking script, historically called scriptPubKey. To spend it, the next transaction must supply an unlocking script or witness that satisfies the lock, typically a valid digital signature from the matching private key. An output is identified by its outpoint, the pair of the creating transaction ID and the output index.

The following table lists the components that make up a transaction in the UTXO model.

ComponentWhat it containsRole
InputOutpoint plus unlocking dataPoints to and spends an existing UTXO
OutputAmount plus locking scriptCreates a new UTXO for the recipient
Change outputRemainder returned to the senderAvoids losing value to the fee
FeeSum of inputs minus sum of outputsPays the block producer for inclusion
WitnessSignatures and scripts (SegWit)Proves the right to spend
Components of a UTXO transaction

Validation and the UTXO set

A node validates a transaction by checking that every input refers to an output that exists in the current UTXO set, that each unlocking script satisfies its lock, and that outputs do not exceed inputs. This design makes double spending easy to detect: a second transaction that tries to consume the same outpoint simply fails, because the output is no longer in the set.

The UTXO set is the working state of the chain. On Bitcoin it holds on the order of 100 to 180 million outputs and occupies several gigabytes, a range that fluctuates with network activity and with waves of small inscription outputs. Nodes keep it in a fast key-value store, and its size directly affects memory needs and initial synchronization time. Proposals such as Utreexo aim to replace the full set with a compact cryptographic accumulator, so that a node can validate without storing every output.

Because transactions name their inputs explicitly, a node can verify independent transactions in parallel and can tell from the data alone which transactions conflict. Blocks then order those transactions, and a chain reorganization can return spent outputs to the set if the block that consumed them is replaced.

UTXO model versus the account model

The main alternative is the account model used by Ethereum and most smart contract platforms, where the ledger stores a balance and a nonce per address. Each model makes different trade-offs between simplicity, privacy and programmability, as the table shows.

PropertyUTXO modelAccount model
State storedSet of unspent outputsBalance and nonce per account
Replay protectionEach output spendable onceIncrementing account nonce
Parallel validationNatural, inputs are explicitHarder, shared state conflicts
PrivacyBetter with fresh addressesWeaker, one reusable address
Smart contractsLimited or extended (eUTXO)Rich, stateful contracts
Typical chainsBitcoin, Litecoin, CardanoEthereum, BNB Chain, Solana
Comparison of ledger accounting models

Cardano uses an extended UTXO (eUTXO) model, which attaches arbitrary data, called a datum, and validator scripts to outputs. This allows deterministic smart contracts: a user can know before submission whether a transaction will succeed and what fee it will pay, at the cost of more complex design for applications that share global state.

Coin selection, fees and dust

Coin selection is the wallet algorithm that decides which UTXOs to use as inputs. Since the fee is charged per virtual byte (vbyte), and every input adds roughly 57 to 148 vbytes depending on the script type, the choice of inputs often matters more than the amount being sent. Wallets balance three goals: low fees now, low fees later, and privacy.

The next table summarizes common coin selection strategies and their consequences.

StrategyHow it worksMain trade-off
Branch and boundSearches for an exact match with no changeSaves fees, may not find a match
Largest firstSpends the biggest outputs firstFew inputs, but fragments small coins
Smallest firstSpends many small outputsConsolidates, but costs more now
Random selectionPicks outputs at randomBetter privacy, less predictable fees
Common coin selection strategies

An output whose value is lower than the fee required to spend it is called dust. Bitcoin Core applies a dust threshold of a few hundred satoshis for relay, roughly 294 to 546 satoshis depending on the output type. Wallets with thousands of tiny outputs, typical for mining payouts or payment processors, often perform UTXO consolidation when fees are low, merging many inputs into one output to avoid expensive spending during congestion.

Privacy and common mistakes

The UTXO model can support strong privacy when each payment uses a new address, but chain analysis exploits predictable patterns. The common input ownership heuristic assumes that all inputs in one transaction belong to the same owner, and change detection tries to identify which output returns to the sender. Techniques such as CoinJoin deliberately break these assumptions by combining inputs from several users.

The table below lists frequent errors in handling UTXOs and how to avoid them.

MistakeConsequencePrevention
Forgetting the change outputRemainder is paid as a huge feeUse wallet software, never raw sums
Reusing one addressLinks payments and reduces privacyGenerate a fresh address per receipt
Accumulating dustOutputs become uneconomic to spendConsolidate when fees are low
Merging unrelated coinsReveals common ownershipUse coin control to separate sources
Frequent UTXO handling errors

A frequent misconception is that a wallet stores coins. In fact, coins exist only as UTXOs on the blockchain; the wallet stores the private keys that can unlock them and tracks which outputs those keys control.

In plain words

Think of UTXOs as banknotes in a wallet rather than a number in a bank account. If you have a 50 note and buy something for 20, you hand over the whole note and get 30 back as change. A UTXO blockchain works the same way: every payment uses whole outputs and returns the rest to you.

Your balance is the total of all the notes you hold. The network only needs to check that each note exists and has not been spent before, which is how it prevents the same money from being used twice.

A real-world example

An online shop that accepts Bitcoin receives around 400 small payments a month, each creating a new UTXO of roughly 50,000 satoshis. When the owner later wants to move the month’s revenue to cold storage, the wallet must spend all 400 outputs, and at legacy input sizes that transaction would exceed 60,000 vbytes. At a busy-period rate of 40 satoshis per vbyte, the fee would be about 2.4 million satoshis, more than ten percent of the total.

The shop instead switches to native SegWit addresses and schedules a weekly consolidation on a weekend, when fee rates drop to around 3 satoshis per vbyte. Each consolidation merges about 100 outputs into one at a fee of a few tens of thousands of satoshis. The result is that the monthly transfer to cold storage needs only four inputs, and its fee stays small even during congestion.