The Playground

Every interactive demo from the course, gathered on one page so you can poke at the ideas back-to-back. Hash something, mine a block, forge a key, sign a message, tamper with a chain — the real algorithms, running right in your browser.

Hashing

A one-way fingerprint. Switch between SHA-256 and RIPEMD-160 — Bitcoin uses both — and change a single character to see the avalanche effect.

Private → public keys (secp256k1)

A public key is derived from a private key by elliptic-curve multiplication. Instant forwards; reversing it is the discrete-log problem no computer can solve.

Public key — X coordinate
Public key — Y coordinate
Compressed public key — what Bitcoin actually stores

Key → address pipeline

The real byte-by-byte derivation of a legacy address: public key → SHA-256 → RIPEMD-160 → version byte → checksum → Base58Check.

Digital signatures (ECDSA)

Sign a message with your private key; anyone can verify it against your public key. Change one character and it fails — the guarantee behind every Bitcoin spend.

Public key (compressed)
Signature — r
Signature — s

Mining (Proof of Work)

Spin the nonce until the hash starts with enough zeros. Hard to find, trivial to check — the asymmetry that secures the whole ledger.

Target0000
Nonce0
Hash

Anatomy of a transaction

No balances — only coins. Spend whole inputs, create outputs, and the fee is whatever’s left over.

Inputs — coins you own

Total in0.4 BTC

Outputs — where it goes

➜ To recipient0.3 BTC
↩ Change to you0 BTC
⛏ Miner fee0.0001 BTC
Total out0.4 BTC

Under the hood — the raw transaction
Size:

    Merkle tree

    How a block’s transactions are hashed together, pair by pair, up to a single Merkle root. Edit a transaction and watch its path to the root change.

    The blockchain (tamper-evident)

    Edit a block and every block after it turns red. Crank the difficulty and feel how expensive rewriting history becomes.

    Peer-to-peer consensus

    Three peers each hold the chain. Tamper with one and it falls out of consensus; re-mine it and it forks; the majority is what the network trusts. Change the same block on two of three to see a 51% attack.

    Bitcoin Script simulator

    Pick a script template — including 2-of-3 multisig — and step through the stack machine. The signature checks are real ECDSA.

    Script — unlocking, then locking

    Stack — top highlighted

    Lightning payment channel

    Send instant off-chain payments between Alice and Bob. The off-chain count climbs without limit while the on-chain count stays at 1 — until you close the channel.

    Alice
    Bob

    On-chain txs
    Off-chain payments
    Commitment state

    HTLC routing (multi-hop)

    Alice pays Carol through Bob with no direct channel. Step through the Hash Time-Locked Contract — the secret stays hidden until Carol reveals it, then cascades back. The hash is a real SHA-256.

    Alice
    Bob
    Carol
    Hash H Secret R

    Dollar-cost-averaging calculator

    Pick a monthly amount and a start date and see what steady buying since 2015 would be worth today — real historical prices, live valuation.

    Invested
    Worth today
    Multiple
    Sats stacked
    Avg cost / BTC
    Portfolio value Total invested

    Illustrative, real monthly BTC/USD closes since 2015; today’s value uses the live price. Past performance is not a promise of future results.

    The scale of big numbers

    Lottery odds, the world economy, grains of sand, atoms — ranked against the 2²⁵⁶ Bitcoin key-space. Tap any row to measure everything else against it.

    Tap a row to measure everything against it. Bars are on a logarithmic scale.

    Halving & the 21M supply curve

    Drag the year: supply climbs toward 21 million as the block reward halves and inflation falls to nothing.

    Circulating supply Annual inflation rate
    Year
    Block reward
    In circulation
    Of 21M mined
    Annual inflation

    Difficulty adjustment

    Change the hashrate and blocks drift off the 10-minute target; re-target (every 2016 blocks) to pull them back.

    Hashrate
    Difficulty
    Avg block time
    Status
    010-min target20+

    The fee market

    Block space is an auction. Set your fee rate and see if you make the next block; add congestion, mine to clear the top bidders.

    The next block — filling with the highest-paying transactions first

    low fee medium high fee your transaction
    In the mempool
    Next-block min fee
    Your fee
    Your wait

    RSA key pair

    Pick two secret primes; the whole key pair falls out. Encrypt a number with the public key and decrypt it with the private one — real modular arithmetic, tiny primes.

    Modulus n = p × q
    φ(n) = (p−1)(q−1)
    Public exponent e
    Private exponent d = e⁻¹ mod φ
    Public key:
    Private key:
    m = — mᵉ mod n → c = — cᵈ mod n →

    Purchasing power over time

    Pick a year and see what $100 saved back then is worth today — as cash, gold or bitcoin.

    What $100 saved back then is worth today

    Cash
    Gold

    Fractional-reserve money multiplier

    One $1,000 deposit becomes many times that as it is lent and re-lent — then trigger a bank run.

    Real cash
    Total balances
    Created from nothing
    Multiplier

    Multisig vault

    Pick an M-of-N policy and toggle which keys you hold — the vault opens only when enough are present.

    Annual dilution (stock-to-flow)

    How fast new supply is created: gold, the dollar, and Bitcoin halving toward zero.

    Gold
    US dollar
    Bitcoin

    Confirmation depth

    Stack confirmations and watch a transaction get buried — coffee needs zero, a house six.

    Money-properties radar

    Score gold, fiat, seashells and bitcoin against the properties of money — toggle to compare shapes.