← UTXO

Compare versions

Version 1 → Version 2 (current). Removed · Added. This shows the entry's text as it is written, including its formatting marks.

Version 1 · Version 2 (current) · Version history

Side by side · Together

An unspent transaction output (UTXO) is a piece of bitcoin value that a transaction has created and that no later transaction has yet spent; a bitcoin balance is the sum of the UTXOs a wallet can spend.[2] ## The transaction model Bitcoin does not keep account balances. Its transactions, as described in the Bitcoin developer documentation, consist of inputs and outputs: each input spends the satoshis paid to a previous output, and each output waits as an unspent transaction output until a later input spends it.[2] The developer guide gives the everyday meaning: when a wallet shows a balance of 10,000 satoshis, that really means 10,000 satoshis waiting in one or more UTXOs.[2] (A satoshi is the smallest unit of bitcoin.) The 2008 Bitcoin white paper describes the same structure in its section on combining and splitting value. To let value be split and combined, it says, transactions contain multiple inputs and outputs. Normally there is either a single input from a larger previous transaction or several inputs combining smaller amounts, and at most two outputs: one for the payment and one returning the change, if any, to the sender.[1] ## Inputs, outputs and outpoints The developer reference states what each part holds. An output has a value in satoshis and a pubkey script, which "defines the conditions which must be satisfied to spend this output."[3] An input spends an outpoint from a previous transaction. An outpoint has two parts: a 32-byte transaction identifier (TXID) and a 4-byte output index, where the first output is numbered 0.[3] An input also carries a signature script that satisfies the output's conditions, and a sequence number.[3] The documentation does not use the word "UTXO" in this reference page; that an output is unspent when no input has yet pointed at its outpoint follows from how the page describes spending.[3] ## Change and fees An output can be spent only once, and it is spent whole. The developer guide says the full value of the UTXOs included in a transaction must be spent or given to a miner as a transaction fee.[2] When a wallet's chosen UTXOs hold more than the payment needs, the surplus returns to the spender in a change output, which the guide describes as a regular output.[2] The reference adds that the outputs of a transaction may not add up to more than the inputs, except in coinbase transactions, the ones that create new bitcoin as a block reward.[3] ## The UTXO set The collection of all outputs that are currently unspent is called the UTXO set. Bitcoin Core, the reference implementation, reports statistics about it through the `gettxoutsetinfo` command, which returns the block height, the number of transactions with unspent outputs, the number of unspent outputs (`txouts`), the estimated size of the chainstate on disk, and optionally a hash of the set.[4] The documentation calls the set's `bogosize` field "a meaningless metric for UTXO set size."[4] The developer guide notes that a particular kind of output, the null data output, does not have to be stored by full nodes in their UTXO database.[2] Bitcoin Core also uses a hash of the UTXO set to check a snapshot. Under its AssumeUTXO design, a node can load a snapshot of the set, while a background chainstate validates the chain up to the snapshot's base block; when it gets there, the node hashes the set and confirms it matches a value built into the software.[5] ## Linking and privacy Because an output can be spent only whole, a wallet often has to spend several UTXOs in one transaction, and that has a consequence for privacy. The white paper describes the privacy model as keeping public keys anonymous: the public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone.[1] It adds that a new key pair should be used for each transaction to keep them from being linked to a common owner, and that some linking is unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner.[1] The risk it names is that if the owner of one key is revealed, linking could reveal other transactions that belonged to the same owner.[1] The developer guide makes the same point about addresses. It says that if each public key is used exactly twice, once to receive a payment and once to spend it, the user can gain a significant amount of financial privacy, and it recommends sending change to a new address rather than reusing the one from the spent UTXO.[2] It names CoinJoin and merge avoidance as further techniques, discussed elsewhere in the guide.[2] ## Reclaiming disk space The white paper's section on reclaiming disk space is the earliest description of why spent outputs matter to storage. It says that once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space.[1] To do this without breaking a block's hash, transactions are hashed in a Merkle tree, with only the root included in the block's hash, so that old blocks can be compacted by stubbing off branches of the tree.[1] The paper's arithmetic is that a block header with no transactions would be about 80 bytes, which at one block every 10 minutes is 80 bytes * 6 * 24 * 365 = 4.2 MB per year.[1] ![A diagram of a Merkle tree, in which each parent node is the hash of its two children up to a single root hash.](/m/2026/11/JdvqkbJwdsWb0G6F.png) *Via Wikimedia Commons: [Hash Tree](https://commons.wikimedia.org/wiki/File:Hash_Tree.svg) by Azaghal, [CC0](http://creativecommons.org/publicdomain/zero/1.0/deed.en).* ## Sources - Satoshi Nakamoto, *Bitcoin: A Peer-to-Peer Electronic Cash System*, 2008. https://bitcoin.org/bitcoin.pdf - Bitcoin Project, "Transactions", Bitcoin Developer Guide (read November 2026). https://developer.bitcoin.org/devguide/transactions.html - Bitcoin Project, "Transactions", Bitcoin Developer Reference (read November 2026). https://developer.bitcoin.org/reference/transactions.html - Bitcoin Core, "gettxoutsetinfo", RPC documentation (read November 2026). https://developer.bitcoin.org/reference/rpc/gettxoutsetinfo.html - Bitcoin Core, "AssumeUTXO design" (doc/design/assumeutxo.md), read November 2026. https://github.com/bitcoin/bitcoin/blob/master/doc/design/assumeutxo.md