Yesterday we learned what a blockchain is. Today, we look at the most famous blockchain of all — Bitcoin — and understand the clever mechanisms that make it work without anyone in charge.
The Bitcoin Whitepaper
In October 2008, someone called Satoshi Nakamoto published a 9-page paper: "Bitcoin: A Peer-to-Peer Electronic Cash System." It proposed a way to send money online without banks, using cryptography and a clever incentive system.
The key insight: if you make it expensive to write to the ledger, and profitable to write honestly, you don't need trust. You need math.
Proof of Work: The Consensus Mechanism
In any shared ledger, someone has to decide which transactions are valid and in what order. Bitcoin's answer is Proof of Work (PoW).
Here's how it works:
- Miners collect pending transactions into a candidate block
- They repeatedly hash the block data with a random number (called a nonce)
- The goal: find a hash that starts with a certain number of zeros
- This is pure brute-force guessing — there's no shortcut
- The first miner to find a valid hash broadcasts the block to the network
- Other nodes verify it (easy) and add it to their chain
Target: 000000000000000000... (lots of leading zeros)
Attempt 1: nonce=0 → hash: 8a3f7b2c... ✗
Attempt 2: nonce=1 → hash: 1d9e4f8a... ✗
...
Attempt 4,291,087: nonce=4291087 → hash: 00000000000003a1f... ✓ Found!
⚡ Why "work"?
Finding the right nonce takes real computational effort — electricity, hardware, time. This cost is what makes it economically irrational to attack the network. To rewrite history, you'd need to re-do all that work, faster than everyone else combined.
Mining Difficulty Adjustment
Bitcoin targets one new block every ~10 minutes. But as more miners join (or leave), the collective hash power changes. So every 2,016 blocks (~2 weeks), the network automatically adjusts the difficulty — making the target hash easier or harder to find.
More miners → harder target → still ~10 minutes per block. It's a self-regulating system.
The Block Reward & Halving
Why do miners bother? Two reasons:
- Block reward — newly minted bitcoin given to the winning miner (currently 3.125 BTC)
- Transaction fees — small fees attached to each transaction in the block
The block reward halves every 210,000 blocks (~4 years). It started at 50 BTC in 2009, and will eventually reach zero around the year 2140. This is why Bitcoin has a hard cap of 21 million coins.
UTXOs: How Bitcoin Tracks Balances
Bitcoin doesn't have "accounts" with balances like a bank. Instead, it uses UTXOs — Unspent Transaction Outputs.
Think of it like cash. You don't have an "account" with $50 — you have a $20 bill and a $30 bill. When you pay someone $25, you hand over the $30 bill and get $5 change.
In Bitcoin:
- Every transaction creates outputs (like new bills)
- When you spend, you consume (destroy) existing UTXOs and create new ones
- Your "balance" is the sum of all UTXOs that your private key can unlock
TX #1234:
Input: UTXO worth 0.5 BTC (from a previous tx)
Output: 0.3 BTC → recipient address
0.199 BTC → your change address
0.001 BTC → miner fee
Why UTXO Instead of Accounts?
The UTXO model has some nice properties:
- Privacy — change goes to a new address each time, making tracking harder
- Parallelism — independent UTXOs can be processed simultaneously
- Simplicity — no need to track running balances; just check if inputs exist and are unspent
It's also why Bitcoin transactions can look confusing at first — you always spend entire UTXOs and get change back.
🔑 Key Takeaways
- Proof of Work secures Bitcoin by making it expensive to write and easy to verify
- Difficulty adjusts every ~2 weeks to maintain 10-minute block times
- Block rewards halve every ~4 years — creating a fixed supply of 21M coins
- Bitcoin uses UTXOs (like digital cash) instead of account balances