Crypto Encyclopedia
The ideas behind crypto and the arcade, each readable by anyone, with deeper asides and a widget you can poke at. Look one up, or read straight through.
What money is
beginnerMoney isn't the paper or the coin, it's an agreement. Anything works as money if enough people accept it for three jobs: a medium of exchange (pay for things), a store of value (hold it for later), and a unit of account (price things in it).
The form keeps changing as trust moves: barter (trust the goods) β gold (trust a scarce metal) β fiat (trust a government) β crypto (trust open math and a network instead of any single institution).
Ledgers & the public ledger
beginnerA ledger is just a record of who owns what, updated with each transaction (Alice pays Bob 5, so subtract 5 from Alice and add 5 to Bob). Your bank keeps one; you have to trust it, you can't see or check it.
A blockchain is a public ledger: the same record, but everyone holds a copy and can verify every entry. No trusted bookkeeper, the rules and the math do the bookkeeping. To spend, you prove you own the funds with a key (next entry); to trust the history, you check the chain (the one after).
Keys & addresses
beginnerA crypto wallet is a key pair. The private key is a secret only you hold, it authorizes spending by producing signatures. The public key (and the addressderived from it) is shareable, it's where people send funds and how anyone checks your signatures.
The asymmetry is the point: the private key can sign, and the public key can verify, but you can't work backward from public to private. That's why βnot your keys, not your coinsβ, whoever holds the private key controls the funds. (See Signaturesfor how a signature actually proves a message came from a key.)
Hashing
beginnerA hash function takes any data, a word, a file, a whole game board, and returns a short fixed-size fingerprint. These games use keccak256, which always returns 32 bytes (64 hex characters).
Three properties matter:
- Deterministic: the same input always gives the same hash.
- One-way: you cannot run it backward to recover the input.
- Avalanche: change one bit and the whole output changes.
Same input, same output, every time (deterministic). Change a single character and the whole result scrambles (the avalanche effect), and there is no way to run it backward. That is what makes a hash a tamper-evident fingerprint.
Blockchain
beginnerBundle transactions into a block, hash it, and put that hash inside the next block. Now each block depends on the one before, forming a chain. Change anything in an old block and its hash changes, which breaks the link in the next block, and the next, all the way to the tip. The ledger becomes tamper-evident.
Edit a block and watch the chain break:
Each block's hash includes the one before it. Edit any block and every block after it turns red, the chain is tamper-evident, so you can't quietly rewrite history.
Consensus & mining
beginnerWith thousands of independent copies of the ledger, how does everyone agree on the same next block, with no boss? That's consensus. Bitcoin's answer is proof-of-work: to add a block you must find a number (a nonce) that makes the block's hash start with a run of zeros. There's no shortcut but guessing, so it costs real computation, but checking a winner is a single hash.
Mine a block, watch the work add up:
Finding the nonce takes lots of guessing (the work). Checking it is one hash. That asymmetry is what makes proof-of-work secure, rewriting a block means re-mining it and everything after.
Decentralization
beginnerPut the public ledger, the chain, and consensus together and you get a system with no single point of control: thousands of nodes each hold the full ledger and enforce the same rules. There's no company to hack, bribe, or shut down, and no one who can freeze your funds or rewrite the record.
That's the trade: you give up a help desk and βundoβ button, and you gain censorship-resistance and self-custody. It's a spectrum, not a switch, real systems are more or less decentralized depending on who runs the nodes, the clients, and the development.
Smart contracts
beginnerSome chains store more than balances, they store programs. A smart contract is code deployed on-chain that runs exactly as written, enforced by the whole network, with no company able to stop, change, or censor it. Ethereum pioneered this, often called βthe world computer.β
Running code costs gas (a fee paid in the chain's currency), which stops infinite loops and pays the validators. Once deployed, the contract is the rulebook: it holds funds and releases them only when its conditions are met.
Tokens
beginnerNot every coin needs its own blockchain. A token is an asset defined by a smart contract on an existing chain, the contract is just a ledger of who owns how much.
- Fungible (ERC-20): every unit is identical and interchangeable, like MOON or a stablecoin.
- Non-fungible (ERC-721 / NFT): each one is unique, like an art piece or a game trophy.
Layer 2 & rollups
beginnerA secure base chain (an L1 like Ethereum) is slow and pricey, every node must process every transaction. A Layer 2 (L2) fixes this: it runs the transactions off the base chain, then posts a compact summary plus a proof back to it, so it inherits the L1's security while being far cheaper.
Drag the batch size to see the per-transaction cost collapse:
A rollup runs the transactions off the base chain, then posts a compact summary (and a proof) back to it. The work is cheap; the security is inherited from the base chain.
Merkle trees
beginnerHashing one thing gives one fingerprint. A Merkle tree fingerprints a whole collection into a single root, while still letting you prove any one item cheaply. You hash each item into a leaf, pair the leaves and hash each pair, then repeat until a single root remains.
Click any cell to see its proof rebuild the root:
To prove cell A is in the committed tree, you only reveal it plus two sibling hashes (not the whole board):
A tree of n cells needs only logβ(n) sibling hashes per proof (100 cells β 7).
The magic is the proof: to convince someone a single cell is part of the committed root, you reveal only that cell plus a handful of sibling hashes, never the whole board.
Commit and reveal
beginnerA commitment lets you lock in a secret now and reveal it later, with two guarantees:
- Binding: you can't change what you committed. Any change to the data changes the root.
- Hiding: the commitment (just a hash) reveals nothing about the data.
You publish the root up front. Later, when challenged, you reveal a specific piece plus its Merkle proof. The other side checks the proof against the root you already locked, so you can neither lie about it nor have changed it.
Verifiable randomness
beginnerLots of games need randomness: a race course, a card shuffle, a loot drop. On a blockchain there is no Math.random(), and the easy sources are unsafe, a block hash or timestamp can be nudged by the validator producing the block, and anything already on-chain can be read and exploited before you act.
The fix is commit-reveal randomness: each participant locks a secret (publishing only its hash), and once everyone is committed they reveal. The shared result is the hash of all the secrets, so no one party can predict it or steer it.
Lock two secrets, then reveal to see the course they produce:
Both players locked in a secret and published only its hash. Neither can see the other's.
Signatures
deeperA digital signature proves a specific message came from a specific wallet, and nobody can forge it without that wallet's private key. The contract recovers the signer from the signature and checks it matches.
This is how a game can be settled with a single cheap transaction: the loser signs a short βI concedeβ message and the winner submits it. No private key ever leaves your wallet.
Soulbound tokens
beginnerMost NFTs can be bought and sold. A soulbound token (the ERC-5192 standard) is one that is permanently non-transferable: once minted to your address, it stays there forever.
That is exactly what you want for a trophy. With no resale market it carries no monetary value, so it is a pure proof of achievement, an on-chain record that you earned it, rather than something bought.