Understand UTXOs, change, signatures, fees and confirmations without reading source code. The explanation names what wallets, nodes, and miners each do so their roles do not blur together.
- Bitcoin tracks UTXOs, not mutable account balances.
- Wallet-generated change is a normal transaction output.
- Fee cost follows transaction data size and fee rate.
Coins are outputs
Bitcoin accounting uses unspent transaction outputs, or UTXOs. Spending consumes one or more outputs and creates new ones. A wallet adds them up to present a familiar balance.
Change is normal
If selected inputs exceed the payment plus fee, the wallet creates a change output back to a fresh address it controls. Misunderstanding change can lead explorers to display misleading apparent payment amounts.
Name the layer and the actor. Wallets create transactions, nodes check rules, miners propose blocks, and Lightning peers manage channels.
Fees depend on data
Fees are based primarily on transaction weight, not the dollar value sent. Consolidating many small inputs can cost more than spending one large input because it uses more block space.
Inputs, outputs and change
A transaction has no balance field. It lists inputs — references to earlier outputs you control, each with a signature that unlocks it — and outputs, each with an amount and a locking script, usually an address.
Inputs must be spent whole, so paying 0.1 BTC from a 0.5 BTC output creates two outputs: 0.1 to the recipient and a little under 0.4 back to a fresh change address you own. The gap between inputs and outputs is the fee; a transaction never states it explicitly.
Wallets hide all of this, which is convenient until a fee looks wrong or a coin control question arises.
Size, weight and why fees are per byte
Miners are paid per block, and a block has limited space, so what they sell is bytes. A transaction with many inputs is large; one with a single input and two outputs is small.
Since Segregated Witness, signature data is discounted: size is measured in weight units, four per byte of ordinary data and one per byte of witness data, and fees are quoted per virtual byte, which is weight divided by four. Native SegWit and Taproot inputs are therefore cheaper to spend than legacy ones.
The UTXO planner on this site estimates the virtual size of a transaction before you build it.
Confirmation, replacement and finality
Broadcast puts a transaction in mempools; inclusion in a block gives it one confirmation. Until then it can be replaced: a sender can rebroadcast with a higher fee, and most nodes now accept replacements whether or not the original signalled it. A recipient who wants a stuck payment mined can spend its output with a high fee so miners take both.
After confirmation, reversal would require reorganising the chain, and the probability of that falls sharply with each block. Exchanges typically credit deposits after two to six confirmations; nothing in the protocol makes six special, it is simply where the residual risk becomes negligible.
Trace the rule through the network
Follow one transaction from wallet signing to node validation, mempool relay, block inclusion, and confirmations. That sequence shows which facts come from consensus and which depend on local policy.
Common questions
What is a UTXO?
An unspent transaction output — a discrete amount of bitcoin locked to a spending condition, usually a key. Wallets hold collections of UTXOs rather than a single balance, and a transaction consumes whole inputs and creates new outputs, including change back to yourself.
Can I cancel a transaction?
Not once it is confirmed in a block. While it is still unconfirmed you may be able to replace it with a higher-fee version if the wallet signalled replace-by-fee, and many nodes now accept replacements regardless. Recipients can also accelerate a stuck payment by spending its output with a high fee.
What does a confirmation mean?
One confirmation means the transaction is in the latest block; each new block adds another. The deeper the transaction sits, the more work an attacker would need to reverse it, which is why exchanges wait for several confirmations before crediting deposits.
Sources and further reading
Primary documents this guide draws on. Links open the original publisher.
- Developer guide: transactions developer.bitcoin.org
- Reference: transactions developer.bitcoin.org
- BIP 125: Opt-in full replace-by-fee signaling Bitcoin Improvement Proposals
- BIP 141: Segregated Witness Bitcoin Improvement Proposals
