Blockchain & Cryptocurrency

Lesson 3 of 8

Distributed Ledgers & Consensus

How thousands of computers that don't trust each other agree on one shared history.

🟡 Intermediate 50 XP

Learn it

A distributed ledger has no master copy: every node (participating computer) keeps its own full copy and checks new blocks before accepting them.

The problem: if anyone can add blocks, how do thousands of strangers agree on which new block is valid? The answer is a consensus mechanism — rules for agreeing.

Proof of Work (PoW): computers race to solve a hard puzzle; the winner adds the next block. Cheating is pointless because redoing the puzzle for old blocks costs enormous computing power.

Proof of Stake (PoS): instead of racing, validators lock up a deposit ('stake') and are chosen to add blocks; if they cheat, they lose their deposit.

Key terms

Node
A computer participating in the network, keeping a copy of the ledger.
Consensus
The process by which all nodes agree on the next valid block.
Proof of Work
Consensus by racing to solve computational puzzles.
Proof of Stake
Consensus by validators who lock up a deposit they lose if they cheat.
51% attack
Controlling most of the network's power to rewrite recent history.
Longest chain rule
When branches disagree, the chain with the most work or stake behind it wins.

Play the referee

  1. 1Classroom vote: Imagine your class keeps a shared scoreboard, but anyone can write on it. Invent a rule so the class agrees on the real scoreboard without a teacher checking.
  2. 2Compare: Compare your rule with Proof of Work and Proof of Stake. What does each one make expensive: lying, or participating?
  3. 3Attack it: How would you cheat your own rule? What would it cost you? That cost is the security of the system.

Why cheating doesn't pay

textHONEST MINER
  spends electricity solving the puzzle
  adds a valid block -> earns a reward

CHEATER
  wants to rewrite an old block
  must redo that block's puzzle AND every block after it
  must outpace the whole honest network
  cost: more than the prize -> cheating is irrational

Consensus mechanisms make honesty the profitable strategy. Security comes from economics, not from a guard at the door.

Try it

Match each concept to its description.

Node
Proof of Work
Proof of Stake
51% attack
Longest chain rule

Challenge

Two blockchains are launched: CoinA has 200,000 independent nodes worldwide; CoinB has 40 nodes, half run by one company. Using consensus and the 51% attack, explain which ledger you would trust more for an important record, and what could go wrong with the other one.

Pick whichever way suits you — every mode earns the same bonus XP.

Write at least 40 more characters to submit.

Mark your own work

Guided walkthrough — 0/2 clues revealed

  1. Clue 1 locked — reveal it only if you get stuck.
  2. Clue 2 locked — reveal it only if you get stuck.

Each clue costs 3 XP (never below 13 XP). You'd earn 25 XP right now.

Quiz time

Question 1 of 3Score 0

What problem does a consensus mechanism solve?

Sources & further reading

Connected courses