Protocol & Mining
The UTXO model, and why there are no balances
Protocol referenceSource: Bitcoin Developer Guide, TransactionsNo market data is used on this page; the definitions follow the protocol documentation.
Outputs, not accounts
A bank keeps a ledger of accounts. Each account has a balance, and a payment is a pair of edits: one balance goes down, another goes up. Bitcoin keeps something different. Its ledger is a list of transactions, and each transaction consumes a set of earlier outputs and creates a set of new ones. An output that has not yet been consumed is called an unspent transaction output, or UTXO, and the set of all of them at any moment is the entire record of who owns what. There is no account object anywhere in the system, and no field that stores a balance.
The distinction sounds pedantic until you follow it through. An output is not a number attached to a name; it is a specific, indivisible chunk of bitcoin, identified by the transaction that created it and its position within that transaction's output list. That pair — the transaction identifier and the output index — is how every output is named, and it is what a later transaction cites when it spends one. Ownership is not recorded as a fact about a person. It is recorded as a condition attached to the output: a small program, written in Bitcoin Script, that must be satisfied before the output can be spent.
A wallet's balance, then, is not read from the chain. It is calculated. The wallet scans the outputs it knows about, keeps the ones its keys can unlock, and adds up their values. Two wallets holding the same keys will report the same total because they are summing the same set, not because they are reading the same stored number. This is why restoring a wallet from a seed phrase works: the keys are enough to identify the outputs, and the outputs are the money.
The life of an output
An output is created when a transaction is confirmed. The transaction that creates it also spends something: every input names an existing unspent output and carries the data that satisfies its spending condition, usually a signature. When the transaction is mined, the outputs it named are removed from the unspent set and the outputs it created are added. The set changes size and shape with every block, but at no point does any part of the system hold a running total per address.
An output is spent exactly once, and it is spent whole. There is no partial spend and no way to leave a remainder attached to the same output. If an output worth one bitcoin is used to pay someone a tenth of a bitcoin, the transaction creates a new output of that tenth for the recipient and a second output returning the rest to the sender. That second output is the change, and it is a genuinely new output with its own identifier, not a modification of the old one. The original output is gone from the unspent set entirely.
This is the part of the model that surprises people most, because it means a wallet must plan its inputs the way a person plans banknotes. If the only outputs a wallet controls are large, a small payment still consumes a large output and produces change. The change output is indistinguishable on-chain from a payment, which is one reason wallet software takes care over how change is handled. The Script page covers the conditions attached to an output; the address types page covers how those conditions are encoded for a payer to read.
What the model buys
The first consequence is that validation is local and cheap. To check a transaction, a node does not need to know anything about the sender's history beyond the specific outputs being spent. It looks up each cited output, confirms that it exists in the unspent set and has not already been consumed, checks that the spending condition is satisfied, and confirms that the outputs created do not exceed the inputs in value. Nothing about the sender's other holdings enters the calculation, and no global state has to be reconciled.
The second is that double spending is prevented by construction rather than by trust. Because an output can be spent only once and its removal from the unspent set is part of the same state change that confirms the spending transaction, two conflicting spends cannot both be valid. A node that has seen one of them will reject the other, and the network converges on whichever the chain ultimately includes. There is no need for a central authority to arbitrate, because the rule is a property of the data structure.
The third is less often stated. Because outputs are discrete and individually identified, a transaction's provenance is explicit. Anyone can trace an output back through the transactions that produced it, which is what makes the chain auditable and also what makes it transparent: the same property that lets a node verify a payment lets an observer follow it. The model is not anonymous by design, and the privacy discussion on the Taproot page follows directly from it.
Sources
- Bitcoin Developer Guide, Transactions — the definitions of inputs, outputs and the unspent output set.
- Bitcoin Developer Guide, Block Chain — how confirmed transactions update the unspent output set.
- Bitcoin Core, developer notes — the reference implementation's treatment of the UTXO set.
Related reading
- Protocol, Transactions & MiningThe supply schedule, transaction mechanics and mining economics behind the price.
- Proof of WorkThe hash puzzle, the target and nonce, and why accumulated work secures the chain.
- Difficulty AdjustmentThe 2,016-block retarget, its caps, and the ten-minute target it defends.
- HashrateWhat hashrate measures, why it is estimated, and how it differs from difficulty.
- Mining PoolsPooled hash rate, share accounting, payout schemes and centralisation.
- Miner RevenueThe block subsidy plus fees, and how the mix changes across subsidy epochs.