‹ CHAPTER 8, ALL LESSONS

PATHFINDER · CHAPTER 8 · LESSON 4 OF 5

Transactions & UTXO

Change outputs

You pay 0.01 BTC with a 0.5 BTC coin. What happens to the rest? 4 min

A UTXO cannot be cut in half. It is spent whole, like a banknote. If you owe 0.01 BTC and your wallet holds one UTXO of 0.5 BTC, the transaction spends the whole 0.5 BTC.

Giving yourself the change

The transaction then creates two outputs: 0.01 BTC to the recipient, and about 0.49 BTC back to a new address of your own wallet. That second output is the change. What is left between the two, a small amount, is the fee.

  • Input: 0.5 BTC
  • Output 1: 0.01 BTC to the recipient
  • Output 2: 0.4899 BTC back to you, the change
  • Fee: 0.0001 BTC, collected by the miner

The classic mistake

Wallets create the change output for you. People who build transactions by hand sometimes forget it, and the whole difference goes to the miner as a fee. Some very large fees in Bitcoin's history were exactly that.

What to remember

  • A UTXO is spent whole, like a banknote.
  • The rest comes back to you as a change output.
  • Forgetting the change turns it into a fee.

Quick check

You spend a 1 BTC UTXO to pay 0.2 BTC. What does a normal transaction contain?

What happens if a transaction has no change output by mistake?