Module 3: How Blockchains and Transactions Work
Bitcoin Fees and the UTXO Model
Chapter 3 of 13 · about 6 minutes
3.1 Where did the extra address come from?
Mint sent 0.004 BTC to the sibling abroad from a Bitcoin wallet. Looking at the transaction on a block explorer afterwards, Mint was confused. The transaction showed two inputs, and two outputs: 0.004 BTC to the sibling, and 0.00098 BTC to an address Mint didn't recognise.
"Did someone take part of my bitcoin?" Mint asked.
"That second address is yours," said Hash. "It's your change. Bitcoin doesn't work like a bank balance. It works more like cash."
3.2 Two ways to keep track of money
Ethereum uses an account model. Each address has a balance, like a bank account. When you send 0.1 ETH, the network subtracts 0.1 ETH from your balance and adds it to the recipient's.
Bitcoin uses the UTXO model, short for unspent transaction output. Instead of one balance, your wallet holds a collection of separate chunks of bitcoin, each one created by a previous transaction. Your "balance" is simply the total of all your unspent chunks.
Think of a physical wallet with banknotes. If you have a 50 note and a 20 note, your balance is 70. To pay 60, you can't tear off exactly 60. You hand over both notes, 70 in total, and receive 10 back in change.
Bitcoin works the same way. Each UTXO must be spent in full. Any amount left over is sent back to you as a new UTXO, called change, usually to a fresh address your wallet controls.
3.3 Mint's transaction, step by step
Mint's wallet held two UTXOs from earlier deposits.
| Mint's UTXOs | Amount |
|---|---|
| UTXO A | 0.003 BTC |
| UTXO B | 0.002 BTC |
| Total balance | 0.005 BTC |
To send 0.004 BTC, no single UTXO was large enough, so the wallet used both as inputs. Then it created outputs.
| Amount | |
|---|---|
| Inputs: UTXO A + UTXO B | 0.005 BTC |
| Output 1: to Mint's sibling | 0.004 BTC |
| Output 2: change back to Mint | 0.00098 BTC |
| Fee (inputs minus outputs) | 0.00002 BTC |
Notice there's no explicit "fee" field. The fee is whatever is left over after the outputs. The miner who includes the transaction collects it.
This also explains a classic, painful mistake. If someone builds a Bitcoin transaction manually and forgets the change output, the entire difference becomes the fee, and the miner keeps it. Modern wallets handle change automatically, which is one more reason to use well-established wallets.
Chapter 3 · Bitcoin inputs, outputs, and change
Two unspent outputs are spent as inputs. The transaction creates one output to the recipient and a change output back to the sender's new address. The fee equals total inputs minus total outputs, so a forgotten change output becomes an accidental fee.
3.4 How Bitcoin fees are calculated
On Bitcoin, the fee depends on the size of the transaction in data, not on the amount of bitcoin being moved. Size is measured in virtual bytes (vB), and fee rates are quoted in satoshis per virtual byte (sat/vB).
Fee = transaction size (vB) × fee rate (sat/vB)
A transaction's size depends mainly on how many inputs and outputs it has. More inputs mean more signatures, which mean more data.
Mint's transaction was about 200 vB. Here's what it would cost at different fee rates, with BTC at $100,000.
| Network conditions | Fee rate | Fee in sats | Fee in BTC | Fee in USD |
|---|---|---|---|---|
| Quiet | 1 sat/vB | 200 | 0.000002 | ~$0.20 |
| Normal | 2 sat/vB | 400 | 0.000004 | ~$0.40 |
| Elevated | 10 sat/vB | 2,000 | 0.00002 | ~$2.00 |
| Busy | 100 sat/vB | 20,000 | 0.0002 | ~$20.00 |
Through 2025 and 2026, typical fee rates have usually sat around 1 to 3 sat/vB, so most ordinary transactions cost well under a dollar. Rates of 10 sat/vB or more now mark elevated demand, and spikes above 100 sat/vB happen only during unusual congestion.
Just like Ethereum, sending 0.004 BTC or 40 BTC with the same structure costs the same fee.
Miners usually pick transactions with the highest fee rates first, because block space is limited to roughly 10 minutes' worth of transactions at a time. When demand spikes, fee rates rise. When it's quiet, even very low fee rates get through.
3.5 Lots of small UTXOs cost more
Node had been buying a small amount of bitcoin every week and withdrawing each purchase to a wallet. After a year, Node had 52 small UTXOs.
"So when I eventually send it all, my transaction has 52 inputs," said Node.
"Which makes it big," said Hash. "And big means expensive, especially if fees are high when you need to move it."
This is why some long-term holders consolidate their UTXOs, combining many small ones into one larger one, during periods of low fees. It costs a fee now, but saves a larger fee later.
Very tiny UTXOs can even become dust: amounts so small that spending them would cost more in fees than they're worth.
| Approach | Trade-off |
|---|---|
| Withdraw many small amounts | Many UTXOs, higher future fees to spend them |
| Withdraw less often, in larger amounts | Fewer UTXOs, cheaper to spend later |
| Consolidate during low-fee periods | Pay a small fee now to avoid a larger one later; may reduce privacy by linking UTXOs |
That last point matters: combining UTXOs in one transaction reveals to anyone watching that they belong to the same owner.
3.6 Stuck Bitcoin transactions
If you set a fee rate too low and the network gets busy, your transaction may wait for hours or longer. Bitcoin has two main ways to speed things up.
Replace-by-fee (RBF) lets you broadcast a new version of the same transaction with a higher fee. Miners will prefer the new version. Many wallets show this as a "bump fee" or "speed up" option.
Child pays for parent (CPFP) lets the recipient, or you via your change output, spend the stuck transaction's output in a new transaction with a high fee. Miners must include the parent to collect the child's fee, so both get confirmed together.
"So if my transaction is stuck, I'm not stuck forever," said Mint.
"No," said Hash. "And if you never bump it, it may eventually be dropped from mempools and the bitcoin will show as available again. But using your wallet's speed-up feature is usually simpler."
3.7 Change addresses and privacy
By default, most Bitcoin wallets send change to a new address each time. This improves privacy, because outsiders can't easily tell which output is the payment and which is the change. Your wallet keeps track of all these addresses automatically, since they're all generated from the same seed phrase (Module 2, Chapter 3).
That's why your Bitcoin wallet may show many addresses over time. It's normal, and all of them are yours.
3.8 Try it yourself
Find any recent Bitcoin transaction on a block explorer. Identify its inputs and outputs. Can you guess which output is the payment and which is the change? Then find the transaction's size in vB and its fee rate in sat/vB, and check that size times rate equals the fee.
Then look at a Bitcoin fee estimator and note the current fee rates for fast, medium, and slow confirmation.
Key takeaways from this chapter
- Bitcoin uses the UTXO model: your balance is a collection of separate unspent outputs, like banknotes.
- UTXOs are spent in full, and the remainder returns to you as change, usually at a new address.
- The fee is the difference between inputs and outputs, collected by the miner.
- Bitcoin fees depend on transaction size in vB and the fee rate in sat/vB, not on the amount sent.
- Many small UTXOs make future transactions larger and more expensive. Consolidation during low fees can help, with some privacy trade-off.
- Stuck transactions can be sped up with replace-by-fee or child pays for parent.
- Change addresses are normal and improve privacy. All of them belong to your wallet.