How crypto works, built bottom-up — until you could design it yourself.
No hype, no price talk. We start with a notebook on a Pacific island, add one idea per chapter — fingerprints, chains, lotteries, signatures — and by Entry 07 you'll realize you've reinvented Bitcoin. By Entry 08, Ethereum. By Entry 09, you'll understand why Solana rebuilt the whole thing around a clock.
sha256("trust") =← a real hash, computed on your machine just now. You'll know exactly what it means by Entry 02.
Entry 01The ledger
Money is a list, not a thing
Before we touch a single line of cryptography, we have to unlearn what money is.
On the Pacific island of Yap, people used money made of stone — carved discs called rai, some heavier than a car. Nobody carried them around. When you bought something big, the stone stayed exactly where it was; everyone in the village simply agreed that it now belonged to someone else. One famous stone sank to the bottom of the ocean during transport. It kept being spent for generations. The stone didn't matter. The shared memory of who owned it did.
That's the secret hiding inside all money: money is a ledger — a list of who owns what. Your bank account isn't a vault with your name on it; it's a row in a database. When you tap your card, no object moves anywhere. A number goes down on one row and up on another.
Which raises the only question that matters: who keeps the list? On Yap, the whole village did. Today, banks and payment companies do. That works — until the keeper of the list makes a mistake, gets hacked, freezes your row, or quietly rewrites it.
Keep this question in your pocket for the whole course: who holds the pen?
Try it — the village notebook
One notebook, three villagers, one trusted bookkeeper. Add entries and watch balances follow the list. Then let the bookkeeper go bad.
#
Entry
Amount
In the real world
2008: the global financial system — the keepers of the list — nearly collapsed, and was rescued with public money. 2013, Cyprus: banks closed for two weeks and a slice of large deposits was simply taken to fund the bailout. The rows were rewritten, legally, overnight.
It's no coincidence that Bitcoin's very first block, mined in January 2009, contains a newspaper headline about bank bailouts. We'll see it in Entry 07.
Go deeper: the double-spend problem Depth 1 / 5
Why did digital cash take until 2009 to exist, when email existed in the 1970s? Because digital things are trivially copyable. If a coin is just a file, I can send the same file to two people — the double-spend problem.
A ledger solves it: coins aren't files, they're entries, and the ledger's order decides which spend came first. But that just moves the problem: now you need a ledger-keeper everyone trusts. Attempts like DigiCash (1989) had elegant cryptography but still needed a central company — which went bankrupt in 1998, taking the system with it.
So the real unsolved problem was narrower and harder: can a ledger keep itself honest with no keeper at all? Entries 02–06 assemble the answer one piece at a time.
Entry 02Hashing
The fingerprint machine
One function that turns anything into an unforgeable 64-character fingerprint.
Our notebook's weakness is that pages can be rewritten and no one can tell. What we need is a tamper-evident seal: something that makes any change, however small, instantly visible.
Enter the hash function. A hash function eats any data — a word, a book, a hard drive — and spits out a fixed-length fingerprint. The one Bitcoin uses, SHA-256, produces 256 bits, written as 64 hex characters. It has three almost magical properties:
Deterministic: the same input always gives the same fingerprint, on any machine, forever.
Avalanche: change one comma and the fingerprint changes beyond recognition — about half of all characters flip.
One-way: given a fingerprint, there is no known way to work backwards to the input, or to craft a second input with the same fingerprint. Your only option is guessing.
So instead of trusting a page hasn't changed, you write down its fingerprint. Later, re-hash the page: same fingerprint, same page. Guaranteed.
Try it — a real SHA-256 machine
Type anything. Then change a single letter and watch the avalanche.
—
Characters changed
—
Output length
always 64
In the real world
You already rely on hashes daily. Websites store the hash of your password, not the password — that's why they can check it but can't tell you what it was. Downloads ship with a checksum so you can verify no one tampered with the file in transit. And every Git commit ID your team argues about in code review? A hash of the code plus its history.
Go deeper: how big is 2256, and what's inside SHA-256? Depth 2 / 5
There are 2256 ≈ 1077 possible fingerprints. Estimates put the number of atoms in the observable universe around 1080. If every human on Earth computed a billion hashes per second since the Big Bang, the fraction of all fingerprints explored would still round to zero. That's why "just guess a collision" is not a plan.
Internally, SHA-256 chops input into 512-bit chunks and runs each through 64 rounds of bit-mixing — rotations, shifts, additions — folding each chunk into a running 256-bit state (a construction called Merkle–Damgård). Every output bit ends up depending on every input bit, which is exactly where the avalanche effect comes from. The demo above runs this exact algorithm in your browser.
One subtlety: collisions must mathematically exist (infinite inputs, finite outputs). Security means nobody can find one. When researchers learned to find collisions in older functions (MD5, then SHA-1), the world migrated away from them — cryptography is engineering with an expiry date, and SHA-256 remains unbroken.
Entry 03Blocks
Chaining the pages
One small trick — put each page's fingerprint on the next page — and you have a blockchain. Literally.
Fingerprinting each page is good, but Mallory can rewrite a page and its fingerprint together. The fix is beautifully simple: every new page starts by quoting the fingerprint of the page before it.
Now each page's fingerprint covers its own entries plus the previous fingerprint — which covered the one before that, and so on to page one. Tamper with page 2 and its fingerprint changes; page 3 now quotes a fingerprint that doesn't exist, so page 3 breaks; then 4, 5, 6… The entire history after your edit shatters visibly.
Rename "page" to block and this is, in full, a blockchain: blocks of entries, each sealed by a hash that includes the previous block's hash. Nothing more exotic than that.
A blockchain doesn't prevent tampering — it makes tampering impossible to hide.
Try it — break a blockchain, then repair it
Three sealed blocks. Edit the data in block #1 and watch every block after it invalidate. A seal is valid here when the hash starts with 000 — reason revealed in Entry 04.
In the real world
You've probably used a blockchain-shaped structure today: Git. Every commit contains the hash of its parent, which is why rewriting an old commit changes every later commit ID — same mechanism, same guarantee. Certificate Transparency logs, which browsers use to catch fraudulently issued HTTPS certificates, work the same way: an append-only, hash-linked history that can't be quietly edited.
One hash to seal them all: the Merkle tree
One detail before we move on, because all of Bitcoin depends on it. A real block holds a few thousand transactions. Does the block's seal hash them as one giant blob? It could — but then proving that your payment is inside would require shipping someone the entire block.
Instead, blocks use a Merkle tree, and the idea is pure Entry 02 applied recursively: hash the transactions in pairs. Then hash those hashes in pairs. Keep going until a single fingerprint remains — the Merkle root. That one hash now commits to every transaction below it: change any transaction and the change cascades up its branch, and the root — the only thing the block's seal actually contains — no longer matches.
The genius is what it does for proofs. To convince someone your transaction is in the tree, you don't send all 8 (or 8,000) transactions — you send only the sibling hashes along your branch: log₂(n) of them. For 4,096 transactions, that's 12 hashes instead of 4,096. Your phone's wallet works precisely because of this.
Try it — a live Merkle tree
Eight transactions at the bottom, one root at the top. Edit the selected transaction and watch the change cascade up its branch only. The dashed nodes are the entire proof someone would need to verify that transaction.
Go deeper: light clients — verifying without downloading the chain Depth 2 / 5
The Bitcoin chain is 600+ GB, but a block header — the part containing the previous-block hash and the Merkle root — is only 80 bytes. All headers ever, together, fit in about 70 MB.
So a light wallet (every phone wallet) downloads just the headers, verifies the proof-of-work chain between them, and when it needs to confirm a payment, asks a full node for that transaction's Merkle proof — the handful of sibling hashes you saw above. It re-hashes up the branch and checks the result against the root in the header. The full node cannot lie: forging a proof means finding a hash collision.
This trick — commit to enormous data with one hash, prove membership with log(n) hashes — escaped crypto long ago: Git uses hash trees for repositories, Amazon's DynamoDB and Cassandra use Merkle trees to sync replicas, and Certificate Transparency uses them to make HTTPS certificate logs auditable.
Entry 04Proof-of-work
Making cheating expensive
The chain shows tampering — now we make tampering cost more than it could ever pay.
There's a hole in Entry 03. Hashes are cheap — your laptop computes millions per second. Mallory can rewrite block 2 and simply re-seal every block after it in a blink. The chain breaks loudly, then she repairs it quietly.
The fix, and it's the strangest idea in the whole design: make seals artificially expensive to create. We add a rule — a block's hash only counts if it starts with a certain number of zeros. Since hashes are unpredictable, there's no cleverness that helps; you add a junk number to the block (a nonce), hash, check, and repeat millions of times until you stumble on a winner. Pure lottery.
Finding a valid seal: expensive. Billions of guesses, real electricity, real money.
Checking a seal: free. Anyone hashes once and looks for the zeros.
This is proof-of-work. A valid chain is now a chain someone provably burned energy to build. To rewrite history, Mallory must redo all that work — and outrun everyone honest adding new blocks at the same time. Cheating stops being a hack and becomes a hardware-and-electricity bill.
Work also answers a question we'd been ignoring: with no bookkeeper, who writes the next page? Answer: whoever wins the lottery. And they're paid for it — the winner writes themselves a reward of brand-new coins. That's mining: the security budget and the money-printing press are the same mechanism.
Try it — mine a block for real
Your browser will guess nonces until it finds a hash starting with enough zeros. Each extra zero makes it 16× harder.
Waiting. Press start and watch the lottery run.
Guesses (nonce)
0
Speed
—
Time
—
In the real world
Your browser just did maybe a few hundred thousand guesses per second. A single modern mining machine (an ASIC) does around 200 trillion per second, and the Bitcoin network combined does hundreds of quintillions — yet a block still takes ~10 minutes, because the network automatically raises the required zeros as more machines join. That energy appetite (roughly comparable to a mid-sized country) is proof-of-work's most criticized trait — and, its defenders argue, exactly what makes history unforgeable. Entry 08 shows the alternative that Ethereum switched to.
Go deeper: difficulty retargeting and the economics of attack Depth 3 / 5
"Leading zeros" is a simplification of the real rule: the block hash, read as a 256-bit number, must be below a target. Every 2,016 blocks (~2 weeks), every node recalculates the target from timestamps: blocks came fast → target shrinks (harder); slow → grows (easier). That feedback loop is why block time stays near 10 minutes whether the network has a thousand hobbyist GPUs or millions of ASICs.
Why 10 minutes? A compromise: fast enough to be usable, slow enough that a newly found block propagates worldwide before the next one, keeping accidental forks rare.
Attack economics: to rewrite even recent history you need hardware and energy rivaling the entire honest network — billions of dollars — and your prize is a currency whose value collapses the moment the attack is noticed. The design doesn't make fraud impossible; it makes fraud a terrible investment. Most miners join pools to smooth out lottery luck, which concentrates coordination (a real critique) but not ownership of the hardware.
Entry 05Keys & signatures
Proving it's you, without a passport
History is now tamper-proof. But who's allowed to spend which coins?
Our chain guards the past, but nothing stops me from writing a new entry: "Asha pays me everything." With no bank checking IDs, how does the notebook know an entry is authorized?
Handwritten signatures fail digitally — they're copy-pasteable. The answer is a digital signature, built from a mathematically linked pair of keys:
A private key — a giant random number only you know. This is your identity. Effectively: your money.
A public key — derived from the private key, shareable with everyone. (Your "address" is essentially a hash of it.)
Think of the pair as a padlock and its only key, but reversed from how you'd expect: you hand out open padlocks (public key) to the entire world, and only your key (private key) works them. Anyone can check the lock; nobody can copy the key from looking at the lock.
To authorize a payment you sign the message with your private key. Concretely, your wallet does two things you already understand: it hashes the transaction (Entry 02 — so the signature covers every character of it), then runs that hash through a math operation that only your private key can perform, but that your public key can check. The output — the signature — has two properties ink can't offer:
Anyone can verify it using only your public key. No secret needs to be shared, ever.
It's welded to the exact message. Change one character of "Pay Bo 10" and verification fails, because the message's hash changed. Copying a signature onto a different transaction achieves nothing.
The whole scheme rests on the same shape of magic as hashing: a one-way street. Private → public is instant math; public → private means searching a space of 2256 numbers. And because that's the only requirement, a blockchain account needs no signup, no email, no permission from anyone. Generate a random number and you have an account. Your "address" is essentially a hash of your public key — short, checkable, shareable.
One-way math sounds mystical, so let's shrink it until you can touch it. Take a small public formula: 5k mod 100,003 — "multiply 5 by itself k times, keep only the remainder." Going forward from your secret k is instant. Going backward from the result to k has no shortcut: you just try every k. With a 5-digit secret your browser cracks it in a blink. Real keys are 78-digit secrets — same street, but now it's 1072 times longer than anything brute force can walk.
Try it — crack a toy private key
Pick a secret. See how fast the public key is made — then watch what "working backwards" costs, even at toy scale.
The public number above is safe to shout from a rooftop — until someone brute-forces it. Try.
Try it — sign and verify with real cryptography
Your browser's built-in crypto engine (the same one behind HTTPS) will generate a key pair, sign a payment, and catch tampering.
—
—
After signing, edit one letter of the transaction and verify again.
In the real world
"Not your keys, not your coins" is the industry's hardest-earned lesson. A man in Wales spent a decade petitioning to excavate a landfill containing a hard drive with keys to ~8,000 BTC. Exchange customers learned it in reverse: Mt. Gox (2014) and FTX (2022) held customers' keys — so when the companies imploded, "their" coins were never really theirs. Hardware wallets exist purely to keep one number offline.
Go deeper: elliptic curves and where addresses come from Depth 3 / 5
Bitcoin and Ethereum use ECDSA over the secp256k1 curve (our demo uses the browser's P-256 — same construction, different curve). The trapdoor: on an elliptic curve you can "add a point to itself" k times cheaply, but recovering k from the result — the discrete logarithm — has no known efficient algorithm. Private key = k; public key = the resulting point.
A Bitcoin address is a processed public key: pubkey → SHA-256 → RIPEMD-160 → checksum → encode. That's why addresses are short, and why a typo'd address is rejected rather than paid: the checksum fails.
Those 12–24 word seed phrases wallets make you write down? A human-friendly encoding (BIP-39) of one master random number, from which all your keys are mathematically derived. The phrase is the wallet.
Looming footnote: a large-scale quantum computer running Shor's algorithm would break ECDSA (not SHA-256, notably). Post-quantum signature schemes exist and migration plans are an active research area — a real concern on a decades timescale, not a today one.
Entry 06Consensus
Nobody in charge: the network agrees
The last piece: thousands of copies of the notebook, and one rule to keep them identical.
Everything so far still assumed one notebook. Final move: give a full copy to anyone who wants one. Thousands of computers (nodes) each hold the whole chain, hear about new transactions, and check every rule themselves — signatures, balances, seals. A bad transaction isn't rejected by an authority; it's ignored by everyone independently.
But copies drift. Two miners can win the lottery seconds apart, and the network briefly splits into two versions — a fork. Who's right? Bitcoin's rule is disarmingly simple:
Follow the chain with the most accumulated work. Always.
Miners extend whichever branch they see; one branch soon pulls ahead; everyone abandons the loser (its transactions return to the queue, unharmed). Disagreement resolves itself in a block or two — no meetings, no vote, no chairman.
Now watch the security click into place. To undo a payment buried 6 blocks deep, an attacker must secretly build a longer chain from before that block — racing the entire honest network with a head start against them. With a minority of the world's hash power, the race is essentially unwinnable. This is why recipients wait for confirmations: every block stacked on top of your transaction is another block the attacker must outrun.
Try it — race the honest network
You're the attacker, starting behind by the confirmation count. Each round, one lottery ticket wins — yours with the probability you control. Watch one race, then run a thousand.
Honest chain
Your secret chain
In the real world
This math is why exchanges credit Bitcoin deposits only after ~3–6 confirmations. And the attack isn't theoretical: Ethereum Classic, a smaller chain whose total mining power was cheap to rival, suffered repeated 51% attacks in 2019–2020, with exchanges double-spent for millions. Bitcoin itself has never been 51%-attacked — renting more than half of its hash power is beyond even nation-state budgets. Security here isn't a feature you code; it's a quantity you buy.
Go deeper: Byzantine generals and probabilistic finality Depth 4 / 5
Computer scientists formalized this in 1982 as the Byzantine Generals Problem: armies must agree on a plan while some generals are traitors sending conflicting messages. Classical solutions require knowing who all the participants are. An open network where anyone can join anonymously — and cheaply fake a million identities (a Sybil attack) — was considered hopeless.
Nakamoto's insight sidesteps identity entirely: one CPU-cycle, one vote. Influence is proportional to energy burned, and energy can't be faked or duplicated. Proof-of-work is really an anti-Sybil mechanism wearing a lottery costume.
The trade-off is that finality is probabilistic: a Bitcoin transaction is never 100% final, just exponentially unlikely to reverse — the catch-up probability decays roughly like (q/p)z with depth z, which your simulator above measures empirically. Subtler attacks exist at the margins (selfish mining, eclipse attacks on a node's network view), which is why "more confirmations for bigger amounts" remains the professional rule.
Entry 07Bitcoin
Bitcoin: the pieces snap together
You now hold every part. Assembled, they're the 2008 white paper.
In October 2008 — weeks after Lehman Brothers collapsed — someone using the name Satoshi Nakamoto posted a nine-page paper to a cryptography mailing list. Almost nothing in it was new. Hash chains, proof-of-work, digital signatures — all existed. The genius was the assembly: each piece patching another's weakness until no trusted keeper remained. Look at what you've already built:
Entry 01 — money is a ledger; the question is who keeps it.
Entry 02 — hashes make any page tamper-evident.
Entry 03 — chaining hashes makes all of history tamper-evident.
Entry 04 — proof-of-work makes rewriting history economically absurd, and picks who writes next.
Entry 05 — signatures replace the bank's ID check.
Entry 06 — the longest-chain rule keeps ten thousand strangers' copies identical.
That's Bitcoin. Everything else is parameters. On 3 January 2009, Satoshi mined block #0 and embedded a message in it — that day's newspaper headline: "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks." Both a timestamp and a thesis statement.
The life of one bitcoin payment
Walk through it — from tap to settled
Five stages, using only ideas you already know.
Money with a printed schedule
Central banks decide how much money exists. Bitcoin replaces that committee with four lines of code: miners earn a block reward that halves every 210,000 blocks (~4 years), summing to a hard ceiling of 21 million coins, ever. Monetary policy as physics — nobody can print more, and everybody can verify it.
The supply curve every node enforces
Coins in circulation by year. Each dotted line is a halving of the block reward.
Halving
Year
Reward per block
What it meant
Genesis
2009
50 BTC
Mining on laptops; coins near-worthless
1st
2012
25 BTC
First proof the schedule executes itself
2nd
2016
12.5 BTC
Industrial ASIC mining era
3rd
2020
6.25 BTC
~88% of all coins already issued
4th
2024
3.125 BTC
Miner income shifting toward fees
Inside a real block
Enough abstraction — let's open one up. On 20 April 2024, a mining pool called ViaBTC won the lottery for block #840,000 — the block where the fourth halving triggered. It became famous for a second reason: a token-minting frenzy (the "Runes" launch) was underway, and users bid so hard for space in this specific block that its fees came to over 37 BTC — more than ten times the new 3.125 BTC subsidy. A preview of Bitcoin's far future, where fees, not fresh coins, pay for security.
Here is what a block actually is. Everything a miner grinds on — the famous 80-byte header — is just six fields, and you already understand five of them:
Header field
Size
What it is — in your vocabulary
version
4 B
Which rule-set this block follows (upgrades are signaled here)
prev_block_hash
32 B
Entry 03 — the chain link. The fingerprint of the previous header
merkle_root
32 B
Entry 03 — one hash committing to all ~3,000 transactions in the body
timestamp
4 B
Roughly when it was mined (nodes reject implausible times)
bits
4 B
Entry 04 — the difficulty target this hash had to beat
nonce
4 B
Entry 04 — the winning lottery ticket
That's it. The thousands of transactions live in the block body; the header commits to them all through the Merkle root; and the network's hundreds of quintillions of guesses per second are aimed at hashing these 80 bytes. Every diagram you've ever seen of Bitcoin is a decoration of this table.
There are no balances — build a transaction and see
Now the body. Here's Bitcoin's strangest design choice: the ledger stores no account balances at all. It stores coins — officially, UTXOs (unspent transaction outputs), each one created as the output of some earlier transaction, each locked to a key (Entry 05), each of arbitrary denomination — like bills your printer prints in any amount.
A transaction melts down old coins and mints new ones. Inputs: whole UTXOs you unlock with signatures. Outputs: brand-new UTXOs locked to the recipients. There's no "subtract 0.6 from Asha" anywhere. Three consequences that confuse every newcomer:
Change. You can't spend part of a coin. Pay 0.6 from a 1.0 coin and you mint two outputs — 0.6 to the merchant, ~0.4 back to yourself.
Fees are the gap. Whatever inputs exceed outputs is silently claimed by the miner. Forget your change output and the miner keeps it — this has really happened.
Your "balance" is a fiction your wallet computes by scanning the chain for UTXOs your keys can unlock.
Try it — build a real-shaped transaction
Your wallet controls four coins. Select which to melt down to pay a merchant 0.60 BTC, and watch the outputs — including your change — get minted.
In the real world — a fifteen-year stress test
22 May 2010: the first known purchase — two pizzas for 10,000 BTC ("Pizza Day"). 2013–14: the Silk Road bust and Mt. Gox collapse teach the difference between the protocol (kept working) and businesses built on it (didn't). 2021: El Salvador makes bitcoin legal tender. 2024: U.S. spot ETFs put it in retirement accounts. Through all of it — booms, ~80% crashes, bans, forks — the ledger itself has never been successfully rewritten. Whatever you think of the price, the machine has run for 15+ years with no CEO, no office, and ~99.98% uptime.
Go deeper: Script, and why blocks stay deliberately small Depth 4 / 5
How is a UTXO "locked to a key," exactly? Each output carries a tiny program written in Script, a deliberately crippled language — no loops, so every script provably terminates. The standard lock says "present a public key hashing to X, plus a valid signature over this transaction." To spend the coin, your input must supply data that makes the program return true. Multi-signature locks (2-of-3 keys) and time-locks (unspendable until block N) are native. Keep "programmable locks, but barely programmable" in mind — it's the exact contrast Entry 08 explodes.
Blocks are also deliberately small (~1–4 MB, roughly 3–7 transactions per second globally) so that a laptop in anyone's home can validate the full chain — decentralization was chosen over throughput. The 2015–17 "block size war" split the community over exactly this trade-off; the small-block side won, and scale moved to layers like Lightning: two parties lock coins in a shared on-chain UTXO, transact thousands of times off-chain by exchanging signed IOUs, and settle the net result on-chain later. Millions of coffee-sized payments, two blockchain entries.
Entry 08Ethereum
Ethereum: the ledger learns to run code
Bitcoin decentralized money. A 19-year-old asked: why stop at money?
In 2013, Vitalik Buterin — then a teenage Bitcoin Magazine writer — proposed generalizing the whole machine. Bitcoin's ledger stores balances guarded by (deliberately) limited scripts. What if the ledger could store programs, and every node ran them identically?
A smart contract is such a program: code plus its own money, living at an address on the chain. The classic mental model is a vending machine — it takes coins and releases soda by mechanism, not by trust. Nobody can talk it into a freebie; its rules are physics. A smart contract is a vending machine for any agreement: escrow, auctions, lending, insurance. Once deployed, not even its author can bend the rules — the same properties that made history immutable now make the code's execution immutable.
Two consequences follow immediately, and both run on ideas you already own:
Gas. If anyone can upload code that thousands of nodes must run, someone will upload while(true). So every instruction has a price, paid in ETH. Your transaction carries a fuel tank; when it's empty, execution halts and reverts. Spam becomes unaffordable by construction.
Accounts, not UTXOs. Contracts need persistent memory, so Ethereum drops Bitcoin's melted-coins model (Entry 07) and keeps real accounts: every address has a balance, a transaction counter, and — for contracts — code and storage.
So here is Ethereum, mechanically: one giant shared state — every account, every balance, every contract's variables — plus a rule for updating it. A block is no longer just "a page of payments"; it's a batch of state changes. Every node holds the full state, executes every transaction in the block through the EVM (the Ethereum Virtual Machine — a small, deliberately deterministic processor every node implements identically), and must arrive at the byte-identical new state. The blockchain machinery you learned in Entries 02–06 isn't replaced — it's now securing the history of a computer's memory instead of a cash ledger. A transaction's life looks familiar:
Sign — same as Bitcoin: your private key signs the call (Entry 05). Now it might say "call function contribute() on contract 0xAB… with 4 ETH" rather than "pay Bo."
Broadcast & queue — nodes gossip it; it waits in the mempool with a gas-price bid attached.
Execute — the block's proposer includes it; every node runs the contract's code, metering gas per instruction. If gas runs out or a require() fails, all its changes are rolled back — but the fee is still paid.
Commit — the block header commits to the entire resulting world state via (you guessed it) Merkle-style trees, so any single balance or storage slot can be proven with a short branch of hashes.
Try it — operate a smart contract
A crowdfunding escrow: reach 10 ETH before block 110 and only the creator can withdraw; miss it and only refunds work. Try to break the rules — the machine refuses politely.
// transaction log — every call costs gas, even failed ones
The Merge: replacing the furnace
Ethereum launched with Bitcoin-style mining, but in September 2022 it executed the Merge — swapping the security engine of a live $200-billion network, mid-flight, for proof-of-stake. Recall why proof-of-work exists (Entry 04): it's an anti-cheating mechanism — it makes writing history cost something real, so rewriting it costs more than it pays. Burned electricity was the collateral. Proof-of-stake keeps the collateral and drops the furnace: validators post the collateral up front, in money.
The mechanics, step by step:
Stake to play. Anyone can lock up 32 ETH as a deposit to run a validator. No warehouse of machines — a laptop suffices. There are now around a million validators.
Time is sliced into slots. Every 12 seconds, the protocol pseudo-randomly picks one validator to propose the next block. No lottery of hashes — the "who writes the next page?" question from Entry 04 is answered by drawing lots among depositors.
The rest vote. A committee of other validators checks the proposed block and signs an attestation — "I've seen this block and it's valid." Honest proposing and attesting earn small rewards; being offline leaks small penalties.
Votes accumulate into finality. Slots group into epochs (32 slots). When two-thirds of all staked ETH has attested across two consecutive epochs, the older one becomes finalized — and here's the upgrade over Bitcoin: not "exponentially unlikely to reverse" (Entry 06) but economically impossible. Reverting a finalized block provably requires at least one-third of all staked ETH — tens of billions of dollars — to sign contradictions… and be destroyed for it.
Cheating is self-incriminating. The only way to attack is to sign conflicting statements — and your signatures (Entry 05!) are unforgeable proof of your own crime. Anyone can submit them to the chain, and the protocol slashes the traitor's deposit and ejects them. The whistleblower gets a bounty.
Proof-of-work makes lying expensive to attempt. Proof-of-stake makes it ruinous to be caught — and you are always caught, because the lie must be signed with your own key.
The result: identical guarantees of Entries 03–06, ~99.95% less energy, and stronger finality — at the cost of a subtler system with more moving parts, and a new debate about whether wealth-weighted influence centralizes differently than hardware-weighted influence did.
Try it — run proof-of-stake yourself
Eight validators (you're V4), toy epochs of 8 slots (real ones are 32). Advance slots and watch proposers rotate, attestations pile up, and epochs finalize. Then try to cheat.
Slot
0
Epoch
0
Finalized through
—
Your stake
32 ETH
// the beacon chain ticks every 12 seconds, forever
Where do all the other coins come from?
Here's the answer to a question that confuses almost everyone: there are 20,000+ "cryptocurrencies," but only a handful of actual blockchains that matter. That's because most coins aren't blockchains at all — they're smart contracts.
Think about what a currency needs: a table of who owns how much, and a rule for moving amounts between rows. You built exactly that in Entry 01 — and a smart contract can hold that table in its storage. A "token" is a contract with a balance table and a transfer() function. That's the whole thing. Ethereum standardized the interface in 2015 as ERC-20, so every wallet and exchange can talk to every token without custom code — and suddenly launching a currency took an afternoon, for better (stablecoins, in Entry 08's callout below) and for much worse (the 2017 ICO bubble, most memecoins).
The security inheritance is the beautiful part: PizzaCoin below has no miners, no validators, no network of its own. Its balance table lives in Ethereum's world state, so forging a PizzaCoin transfer requires defeating Ethereum's entire validator set. Tokens rent the fortress. (NFTs are the same trick with one twist: instead of balances[address] → amount, the table is tokenId → owner — a registry of unique items rather than a currency. That's the ERC-721 standard, the entire technical substance of the 2021 NFT boom.)
Try it — launch your own currency
Deploy PizzaCoin to (simulated) Ethereum and move it around. Watch what a "coin" actually is: rows in one contract's storage.
// no PizzaCoin blockchain will be created. None is needed.
Bitcoin vs Ethereum, side by side
Same foundations — Entries 01 through 06 apply to both, line by line — but tuned for opposite goals. Bitcoin optimizes for being unchangeable money; Ethereum optimizes for being a programmable platform, and accepts extra complexity everywhere to get it.
Bitcoin
Ethereum
Born
2009, Satoshi Nakamoto
2015, Vitalik Buterin & co-founders
What the ledger stores
Coins (UTXOs) and their locks
Accounts, balances, contract code & storage
A block is…
A page of payments
A batch of state changes to a shared computer
Programmability
Script: tiny locks, no loops — on purpose
EVM: any program, metered by gas
Consensus
Proof-of-work (miners, energy)
Proof-of-stake since 2022 (validators, deposits)
New block every
~10 minutes
12 seconds
Finality
Probabilistic — confirmations pile up
Economic — finalized in ~13 min, reversal costs ⅓ of all stake
Money supply
Hard cap: 21M, halving schedule
No cap; small issuance to validators, partly offset by burned fees
Changes to the rules
Glacial, by design
Regular scheduled upgrades
Best mental model
Digital gold with a settlement network
A neutral world computer that hosts other people's money
In the real world
What actually runs on this world computer? Stablecoins — dollar-pegged tokens like USDC — move trillions a year and are crypto's clearest product-market fit (a dollar that settles in seconds, globally, 24/7). Uniswap is an exchange with no company operating it — just a contract holding billions in paired assets, quoting prices by formula. NFTs (2021's mania) are ownership entries in a contract's table. And the cautionary tale: The DAO (2016), a $150M investment fund drained through a reentrancy bug. The community split over reversing it — Ethereum forked to undo the theft; dissenters kept the original chain (Ethereum Classic). "Code is law" met "law is what the community accepts," and both answers still run.
Go deeper: the EVM, rollups, and the modern stack Depth 5 / 5
The EVM. Contracts compile to bytecode for the Ethereum Virtual Machine — a stack machine every node implements identically. Determinism is sacred: no randomness, no clocks, no network calls inside the VM, because 10,000 nodes must compute byte-identical state. Each opcode has a fixed gas cost (an ADD is 3 gas; writing a fresh storage slot is 20,000 — persistent state is what's truly expensive). The fee market got a notable redesign in 2021 (EIP-1559): a protocol-set base fee is burned rather than paid to validators, tying fee demand to ETH scarcity.
Rollups. Ethereum itself does ~15 transactions/second, so scale moved up a layer: rollups (Arbitrum, Optimism, Base, zkSync) execute thousands of transactions off-chain and post compressed results to Ethereum. Optimistic rollups assume honesty but allow fraud proofs during a challenge window; ZK rollups post a cryptographic validity proof — math instead of a waiting period. Either way, Ethereum becomes the settlement court, not the trading floor.
Proof-of-stake, precisely. ~1M validators attest to blocks in 12-second slots; a rotating committee's votes accumulate until blocks are finalized — economically irreversible unless attackers burn at least one-third of all staked ETH (tens of billions of dollars). Contrast Bitcoin's probabilistic finality from Entry 06. Open research problems remain, like MEV: block proposers can order transactions for profit (e.g., sandwiching your trade), an economic game the protocol is still learning to tame.
And the risks are real: immutable code means immutable bugs — billions have been lost to reentrancy, oracle manipulation, and bridge hacks. The vending machine cannot be talked out of its rules, including its broken ones.
Entry 09Solana
Solana: what if the ledger had a clock?
The same trust machine, re-engineered around a single obsession: speed.
After Ethereum proved the world computer could exist, a wave of would-be "Ethereum killers" appeared. Most are footnotes. Solana is worth a chapter, because it made one specific, contrarian bet — and to understand it, you have to see the bottleneck it attacks.
Why are blockchains slow? Not because hashing is slow — your browser did four hundred thousand hashes a second in Entry 04. They're slow because thousands of strangers must agree on the order of events. Bitcoin buys agreement with 10-minute lottery rounds (Entry 04); Ethereum with 12-second voting slots (Entry 08). Most of the Byzantine generals' messages, it turns out, are spent arguing about when things happened — because in a network with no trusted party, you can't trust anyone's wristwatch.
In 2017, Anatoly Yakovenko — a Qualcomm engineer who'd spent a career on precisely-clocked radio networks — had the insight: you can't trust a wristwatch, but you can trust math. His proof of history is a clock built from Entry 02:
Take a hash. Hash it. Hash the result. Hash that result. Forever. Each output is the next input, so the chain cannot be computed in parallel — hash #1,000,000 is unreachable without doing the 999,999 before it, one by one.
Therefore a long chain of hashes is proof that real time passed. Not "trust me, it's 3 PM" — provable, physical elapsed time, made of the same SHA-256 you already know.
Now fold events into the stream: mix a transaction into the running hash, and every hash after it becomes cryptographic proof the transaction came before them. Events get verifiable timestamps before consensus even starts.
Proof of history is not a consensus mechanism — Solana still uses proof-of-stake (Entry 08's validators, stake, and slashing). PoH is the shared clock that makes the consensus fast: with time itself already agreed, validators stop debating order and just verify. Leaders are scheduled in advance — everyone knows who proposes the next block, so transactions stream directly to them (no mempool waiting room), and blocks tick every ~400 milliseconds for fees of a fraction of a cent.
Try it — a clock made of hashes
Start the clock: your browser hashes its own output, single-file. Then stamp an event into the stream and see why its place in time can never be faked.
Tick (hashes so far)
0
Clock speed
—
Events stamped
0
// each hash needs the previous one — no supercomputer can skip ahead. That's what makes it a clock.
The second trick: run everything at once
A fast clock isn't enough — you also have to execute faster. Recall Entry 08: the EVM runs transactions one at a time, because any contract might touch any storage, so the only safe order is single-file. Solana's runtime (Sealevel) demands one thing in exchange for speed: every transaction must declare up front which accounts it will read and write. With the touch-lists known, the scheduler can prove that two transactions can't collide — and run them simultaneously on different CPU cores, like a bank with a thousand tellers instead of one.
Try it — one teller vs. many
Eight payments, each declaring the two accounts it touches. Run them the EVM way, then the Sealevel way.
One more inversion worth knowing: on Ethereum, a contract owns its storage — code and data live together at one address. On Solana, programs are stateless: code lives in one account, data lives in other accounts the program owns. It's why account touch-lists are even possible — and why Solana tokens (SPL tokens) are cheaper than Ethereum's: there's one shared, audited token program for the whole chain, and "launching a coin" just means creating a small data account that points at it. PizzaCoin from Entry 08, without even deploying code. (This is the machinery behind 2024–25's memecoin flood — the cost of launching a token fell to pocket change, with exactly the consequences you'd predict.)
What the speed costs
By now you know the iron rule of this course: every design buys its advantage somewhere. Bitcoin pays for validate-at-home decentralization with throughput. Solana pays for throughput in two currencies:
Hardware. Keeping up with 400ms blocks and parallel execution takes a serious server — hundreds of gigabytes of RAM, datacenter bandwidth. A laptop in anyone's home cannot be a Solana validator; there are ~1,500 of them, versus tens of thousands of Bitcoin and Ethereum nodes. The Yap villagers' notebook is now kept by fewer, stronger hands.
Fragility under load. The young network paid its tuition in public: roughly seven full or partial outages between 2021 and early 2024 — spam floods, a bot crush during an NFT mint, consensus bugs — each requiring validators to coordinate a restart. Bitcoin and Ethereum have never halted. Engineering since (fee markets that localize congestion, the independent Firedancer client) has kept it outage-free since, but the record is part of the ledger.
Decentralization, security, scale: every chain picks two to favor. Bitcoin and Ethereum lean toward the first two. Solana leans toward the last two — and says so out loud.
The three machines, side by side
Bitcoin
Ethereum
Solana
Born
2009
2015
2020
Optimized for
Unchangeable money
Programmable trust
Speed & cost
New block every
~10 min
12 s
~0.4 s
Typical fee
$0.50–$5+
$0.10–$5+ (L1)
< $0.01
Throughput (practice)
~5 tx/s
~15 tx/s (+ rollups)
1,000s tx/s
Consensus
Proof-of-work
Proof-of-stake
Proof-of-stake + proof-of-history clock
Execution
Tiny scripts, serial
EVM, serial (scale via rollups)
Sealevel, parallel (scale on the base layer)
Validating node needs
A laptop
A decent home server
A datacenter-class machine
Node / validator count
Tens of thousands
~1M validators, thousands of nodes
~1,500 validators
Money supply
Hard 21M cap
No cap; issuance ≈ burned fees
No cap; inflation declining toward ~1.5%
Downtime so far
None since 2013
None
~7 halts, 2021–2024
Best mental model
Digital gold
A neutral world computer
A global payments & trading engine
In the real world
Solana's history is a stress test of a different kind. Its biggest early backer was FTX — when the exchange collapsed in November 2022, SOL lost ~95% of its peak value and was widely declared dead. The network kept producing blocks through the entire funeral, and by 2024–25 it hosted more daily transactions than every other major chain combined — mostly payments and trading: Visa settles USDC stablecoin payments over Solana, Shopify merchants accept it, and the memecoin factories of 2024–25 (millions of tokens, most worthless by design) ran on those sub-cent fees. The physical world shows up too: Helium, a real wireless network of hundreds of thousands of hotspots, migrated its rewards ledger to Solana in 2023. The lesson generalizes: chains survive their companies — protocols and businesses fail separately (remember Mt. Gox, Entry 07).
Go deeper: Tower BFT, Turbine, and life without a mempool Depth 5 / 5
Tower BFT is the consensus layer riding on the PoH clock: validators vote on forks, and each vote locks them out of voting for a competing fork for an exponentially doubling number of PoH ticks. Flip-flopping becomes rapidly impossible; commitment hardens like Bitcoin confirmations, but in milliseconds — because "time" is now ticks of the hash clock, not wall-clock guesswork.
Turbine solves block propagation: a 400ms cadence leaves no time to send whole blocks around. Blocks are shredded into small pieces, fanned out through a tree of validators (each forwards its shreds to a small set of peers), and re-assembled — BitTorrent-shaped, so bandwidth per node stays sane.
No mempool, different MEV. With leaders known in advance, transactions are forwarded straight to the next leaders (a protocol once named Gulf Stream). There's no public waiting room to snipe — but leaders still order transactions, so extraction moved into off-chain auction infrastructure (Jito) rather than disappearing. Entry 08's MEV lesson survives every architecture: whoever orders transactions holds power.
Local fee markets: after the 2022 congestion era, fees became per-account rather than global — a bidding war over one hot NFT mint no longer prices out unrelated payments. And Firedancer, a from-scratch second validator client written by Jump's HFT engineers, targets the two weaknesses at once: single-client bugs (several outages traced there) and raw throughput. The bet, still being settled: that hardware gets cheaper faster than the world runs out of demand for block space.
Entry 10Closing the book
The final exam
Thirteen questions. If Entry 01 through 09 landed, you'll pass without scrolling back.
The whole course in one paragraph
Money is a ledger, and the hard problem is who keeps it. Hashes make records tamper-evident; chaining them makes all of history tamper-evident; proof-of-work (or staked capital) makes rewriting history cost more than it pays; signatures replace the ID check; and the longest-chain rule lets ten thousand strangers hold identical copies with nobody in charge. Bitcoin is that machine tuned to be money with a fixed supply. Ethereum is the same machine generalized to run arbitrary programs. Solana is the same machine again, betting that a hash-chain clock and parallel execution can make it fast enough for everyday payments — at the price of heavier hardware in fewer hands. Everything else in crypto — good, bad, and fraudulent — is built on top of those moves.
A sober footnote
This course explained how the machine works — not what any token is worth. The technology being genuinely clever doesn't make prices go up, and most of the 20,000+ tokens in existence are built on none of the careful trade-offs you just studied. If you take one protective habit from Entry 05: anyone who asks for your seed phrase is stealing from you, without exception.
Glossary — the vocabulary you've earned
Ledger
The list of who owns what. The actual substance of money. (Entry 01)
Double-spend
Spending the same digital coin twice — the problem that stalled digital cash for 30 years. (Entry 01)
Hash / SHA-256
A one-way fingerprint function: any input → unforgeable 64-hex-char output. (Entry 02)
Block / blockchain
A page of transactions sealed by a hash that includes the previous page's hash. (Entry 03)
Merkle root
One hash that commits to thousands of transactions via a tree of hashes. (Entry 03)
Nonce
The junk number miners vary to fish for a winning hash. (Entry 04)
Proof-of-work / mining
The guessing lottery that makes blocks expensive to create, cheap to verify — and mints new coins. (Entry 04)
Private / public key
Your secret identity number, and its shareable verification twin. (Entry 05)
Digital signature
Proof a specific message was approved by a specific private key. (Entry 05)
Node
A computer holding the full ledger and checking every rule independently. (Entry 06)
Fork / confirmations
A temporary split in the chain; the blocks buried above your transaction that make it irreversible. (Entry 06)
51% attack
Controlling most mining power to rewrite recent history. Possible, ruinously expensive. (Entry 06)
UTXO
Bitcoin's coin model: transactions consume whole "coins" and mint new ones, with change. (Entry 07)
Halving
The block reward cutting in half every ~4 years, enforcing the 21M cap. (Entry 07)
Smart contract
Code with its own money, living on-chain, whose execution nobody can override. (Entry 08)
Gas
Per-instruction fees that make infinite loops and spam unaffordable. (Entry 08)
Merkle proof
The log₂(n) sibling hashes that prove one transaction belongs to a block's root. (Entry 03)
Proof-of-stake / slashing
Security via locked collateral that the protocol destroys on provable cheating. (Entry 08)
Validator / epoch / finality
A 32-ETH depositor; a bundle of 32 block slots; the point where reversal provably costs ⅓ of all stake. (Entry 08)
ERC-20 token
A currency implemented as one contract's balance table — no blockchain of its own; it rents Ethereum's. (Entry 08)
Rollup / Layer 2
Doing transactions off-chain in bulk, settling proofs on-chain. (Entry 08)
Proof of history
Solana's clock: a sequential hash chain that proves time passed and timestamps events before consensus. (Entry 09)
Sealevel / SPL token
Solana's parallel runtime (transactions declare their accounts up front); its token standard — one shared program, no code to deploy. (Entry 09)