### Bitcoin The coin balance of all addresses on public ledger blockchains is transparent. More specifically, each Bitcoin address is known to be in ownership of a spendable balance (which are *inputs* previously received from another address on the network). When sending, these "inputs" are referred to as Unspent Transactional Outputs (UTXOs). After confirmation in a block, UTXOs are stored on the blockchain in a [[#UTXO Set]], which are regularly used by miners to settle transactions on the ledger. The amount from a UTXO should not exceed the available balance (inputs) for an address in the current UTXO set. A transaction is typically confirmed in a block in roughly ten minutes, but it could be excluded from a future block if there is a disparity between inputs/outputs in the UTXO set. Generally, transactions take 6 confirmations to be considered final, so a transaction that makes it past 6 blocks is typically considered [[finality|final]] and [[immutability|immutable]]. >[!example] >A user could attempt to spend funds twice in the same block interval. Then, both transactions from this wallet address may be conflicting until both transactions have a sufficient number of confirmations. Time-delayed consensus is then a key purpose of [[miners]] and helps prevents fraud or [[double-spending]]. A UTXO can only be used once by the owner who has the necessary private key to unlock it. When this happens, the entire UTXO must be consumed, even if only a portion of its value needs to be spent. The remaining balance is then returned back to the sender in form of a new UTXO. >[!tip] Each private key within a given wallet can unlock certain individual elements from a UTXO set - the global pool of unspent outputs. ### UTXO Set The UTXO set refers to all currently unspent transaction outputs within a blockchain network at any given point in time. This set changes dynamically with each block added to the chain: new UTXOs are created for every incoming transaction and existing ones get removed when they're spent. Each transaction output (UTXO) represents an amount of cryptocurrency and has an associated unlocking script. When you spend some bitcoins, your wallet uses one or more UTXOs as inputs for a new transaction. These input UTXOs are then marked as spent and removed from the UTXO set.