Bitcoin: The First Blockchain
Chapters 1 through 4 built up every tool Bitcoin actually needed: the trust problem it solves, hashing and signatures, blocks and Merkle trees, and proof-of-work consensus. This chapter puts all of it together and looks at Bitcoin itself — specifically, how it actually tracks who owns what (a genuinely different model than a bank account), how many bitcoins will ever exist, and the real moment bitcoin was first used to buy something in the physical world.
The UTXO Model: How Bitcoin Actually Tracks Ownership
It's tempting to imagine Bitcoin works like a bank account — a running balance that goes up or down with each transaction. It doesn't. Bitcoin uses something structurally different, called the UTXO model — "Unspent Transaction Output."
A UTXO is a discrete, specific chunk of bitcoin, created by a previous transaction, that hasn't been spent yet. There's no single number anywhere on the network that says "Alice has 2.5 BTC." Instead, Alice's real spendable balance is whatever total you get by adding up every UTXO on the entire chain that's currently locked to her own public key. A transaction doesn't adjust a balance — it consumes one or more existing UTXOs as inputs, and creates one or more brand-new UTXOs as outputs.
Notice the "change" output. A UTXO has to be spent as a whole — you can't spend "part of" a 1.0 BTC UTXO the way you might type a partial number into a bank transfer. If Alice only wants to send Bob 0.3 BTC out of a 1.0 BTC UTXO, the transaction consumes the whole 1.0 BTC UTXO and creates two new outputs: 0.3 BTC to Bob, and the remainder (minus a small transaction fee) back to Alice as a fresh UTXO she now owns. This is genuinely similar to paying for something with a banknote larger than the price and receiving change back — a deliberate real echo of Chapter 1's own physical-cash analogy.
| UTXO Model (Bitcoin) | Account Model (previewed for Chapter 6) | |
|---|---|---|
| What's tracked | Discrete, unspent "coin" objects scattered across the chain's history | A single running balance number per account |
| To find your balance | Sum every UTXO currently locked to your public key | Read the one stored number for your account |
| Real advantage | Each UTXO either exists in full or doesn't — no partial/inconsistent states possible | Simpler to reason about; naturally supports more complex account state (Chapter 6) |
A Fixed, Predictable Supply: 21 Million Bitcoins
Bitcoin's total supply is capped at a real, fixed number: 21 million bitcoins, ever. New bitcoins only enter circulation as the block reward paid to whichever miner successfully mines each new block — there's no other mechanism for creating new coins.
That block reward isn't constant, though. It started at 50 BTC per block when the network launched in 2009, and it's cut exactly in half every 210,000 blocks — an event called a halving, which at Bitcoin's roughly 10-minute block time works out to happening approximately every four years. This halving schedule continues until the reward eventually rounds down to zero, at which point the full 21 million supply will have been issued — expected to occur around the year 2140.
Bitcoin Pizza Day: The First Real-World Transaction
This is a real, well-documented historical moment, not folklore — and it's genuinely significant precisely because it's the point where bitcoin stopped being a purely theoretical proof-of-concept and was first actually exchanged for a real, physical good in the ordinary world. Given bitcoin's value years later, 10,000 BTC for two pizzas has become a famous illustration of how uncertain and speculative bitcoin's own future value looked at the time — nobody involved in that transaction was pricing it against what it might be worth decades later.
Hands-On Exercises
Three exercises reinforcing the UTXO model and Bitcoin's real supply mechanics, before Chapter 6 introduces Ethereum's genuinely different account model and smart contracts.
Quick Reference
- UTXO — a discrete, unspent chunk of bitcoin created by a prior transaction; balance = the sum of every UTXO locked to your public key.
- Transaction mechanics — a transaction consumes existing UTXOs as inputs and creates new ones as outputs, including a "change" output back to the sender.
- 21 million cap — Bitcoin's real, fixed maximum supply, expected to be fully issued around the year 2140.
- Halving — the block reward (started at 50 BTC) is cut in half every 210,000 blocks, roughly every four years.
- Bitcoin Pizza Day — 22 May 2010, Laszlo Hanyecz's real 10,000 BTC payment for two pizzas, the first known commercial bitcoin transaction.
- Open question — whether transaction fees alone will sustain network security once the block reward shrinks toward zero.