How a Bitcoin transaction really works (UTXOs)
Your "balance" is really a pile of digital banknotes.
Builder ยท 10 min ยท Updated 2026-11-08
๐ก Paying with banknotes and getting change
You want to buy a โน300 shirt but only have a โน500 note. You can't tear the note โ you hand over the whole โน500 and get โน200 back. Bitcoin works the same way: your wallet holds separate "notes" called UTXOs (unspent transaction outputs). To pay, you spend whole notes and send the leftover back to yourself as change โ minus a small tip for the miner.
Balances are an illusion โ outputs are real
The Bitcoin ledger doesn't store "Alice: 0.05 BTC". It stores outputs: chunks of bitcoin locked to a key. Your wallet adds up the unspent ones (UTXOs) and shows you a balance.
Anatomy of a transaction
- Inputs โ references to UTXOs you are spending, each proven with your signature.
- Outputs โ new UTXOs: one for the recipient, usually one "change" output back to you.
- Fee โ not written as a field! It is simply
sum(inputs) โ sum(outputs), and the miner keeps it.
Fees depend on size, not amount
Miners prioritise transactions paying more satoshis per virtual byte (sat/vB). Sending $10 or $10 million costs the same fee if the transaction is the same size. Using many small UTXOs makes a transaction bigger โ and costlier.
From mempool to confirmation
- Your signed transaction is broadcast and waits in nodes' mempool (waiting room).
- A miner picks the highest-paying transactions that fit in a block.
- Once in a block: 1 confirmation. Each new block on top adds another.
The forgotten-change disaster
If you build a transaction by hand and forget the change output, the entire leftover becomes the miner's fee. Wallet software prevents this โ another reason never to experiment with real funds.
๐งฎ Practical example: Alice pays Bob 0.01 BTC
Key takeaways
- Wallet balance = sum of your UTXOs.
- Inputs are spent whole; leftover returns as change.
- Fee = inputs โ outputs, priced in sat/vB.
- Confirmations accumulate as blocks stack on top.
Education only โ not financial advice.