How a blockchain actually works
Strip away the price charts and a blockchain is a specific, checkable answer to an old problem: how do strangers agree on one shared record without a referee? Four ideas do all the work — blocks, hashing, chaining, and consensus.
What's actually inside a block
A block is just a bundle of recent transactions plus some bookkeeping. Every block carries:
Transaction data — who sent what to whom, batched together.
A timestamp — when the block was assembled.
The previous block's hash — a fingerprint of the block before it.
Its own hash — a fingerprint of everything above, generated once the block is finalized.
That third item — storing the previous block's fingerprint inside the next block — is what turns a pile of records into a chain. It's also what makes tampering visible, which the demo on the right shows directly.
Illustrative scramble, not real SHA-256 — but the property is real: change one character and the whole fingerprint changes unpredictably. There's no way to work backward from a hash to the original text.
From "send money" to permanent record
Transaction is broadcast +
You sign a transaction with your private key and send it to the network. Signing proves the transaction came from you without ever revealing the key itself.
The transaction now sits in a waiting area nodes call the mempool — memory pool — until someone includes it in a block.
Transactions are grouped into a candidate block +
A miner (Proof of Work) or a validator (Proof of Stake) pulls a batch of pending transactions from the mempool and assembles them into a candidate block, along with the hash of the current last block.
The network reaches consensus on the next block +
Proof of Work: miners compete to find a value ("nonce") that makes the block's hash meet a difficulty target — deliberately expensive, cheap for everyone else to verify. First valid one wins the right to add the block.
Proof of Stake: validators lock up ("stake") the network's own asset as collateral. The protocol selects a validator to propose the block; others attest to it. Propose or attest dishonestly and part of the stake can be destroyed — "slashed."
The block is appended and propagated +
Once accepted, the new block is broadcast to every node, which each independently verify it and attach it to their own copy of the chain, referencing it by its predecessor's hash.
Confirmations accumulate +
Each block added after yours makes rewriting history more expensive, because an attacker would need to redo the work or restake for every block since. This is why exchanges and merchants often wait for several "confirmations" before treating a large transaction as final.
Decentralization is a security budget, not a slogan
The rule most chains follow is majority rule: whichever version of the ledger the majority of computing power (Proof of Work) or staked value (Proof of Stake) agrees on is treated as the true one. That's powerful precisely because it's expensive to fake — but it also means the guarantee is only as strong as how spread out that power actually is.
If one entity ever controls more than half the network's mining power or staked value, they can, in principle, rewrite very recent blocks — this is called a 51% attack. It's happened to smaller chains with little distributed power behind them; it has never happened to Bitcoin or Ethereum, whose networks are large enough to make it financially irrational.
This is also why "decentralized" isn't a fixed label — it's a spectrum, and it's worth asking of any chain: how many independent parties would need to collude to rewrite it?
Smart contracts: code that lives on the ledger too
Some blockchains — Ethereum most prominently — let you store small programs on-chain, not just transactions.
Self-executing rules
A smart contract runs automatically when its conditions are met — no company or clerk in the loop enforcing it.
Same guarantees, more uses
Because the contract's code and state are replicated across the network like any other data, its execution inherits the same tamper-evidence as a transaction.
Code is not infallible
"Trustless" applies to the ledger, not to the programmer. Buggy contract code has led to real, well-documented losses — it's a genuine risk, not a footnote.
Now — what actually runs on all this?
See how Bitcoin, Ethereum, and stablecoins differ as assets.