Free lessonHow Blockchain Works · 2/43 min read

Distributed ledgers and consensus: proof of work vs. proof of stake

How thousands of computers keep one shared ledger and agree on it, and the difference between proof of work and proof of stake.

A ledger is simply a record of who owns what and who paid whom. A bank keeps its ledger on its own servers. A blockchain is a distributed ledger: copies are held by many independent computers, called nodes, spread across the world.

Why distribute the ledger?

If one company keeps the only copy, you must trust that company. With thousands of copies, no single party can quietly change the record, shut it down or block a valid transaction on its own. Every node checks every new block against the same rules and rejects anything invalid, such as someone trying to spend coins they do not have.

The consensus problem

With so many copies, the network needs a way to agree on which new block comes next. This agreement process is called consensus. The two most common methods are proof of work and proof of stake.

Proof of work (PoW)

In proof of work, special computers called miners compete to solve a hard guessing puzzle. They repeatedly change a number in the block and hash it until they find a hash that meets a target. The first miner to succeed adds the block and earns a reward in new coins plus fees. Bitcoin uses proof of work.

Cheating would require controlling a majority of the network's computing power, which is enormously expensive on a large network. The downside is high electricity use.

Proof of stake (PoS)

In proof of stake, participants called validators lock up, or "stake," their own coins as a security deposit. The protocol selects validators to propose and confirm blocks. Honest work earns rewards. Provably dishonest behavior can be punished by destroying part of the stake, which is called slashing. Ethereum switched from proof of work to proof of stake in September 2022, an event known as "the Merge."

Proof of stake uses far less energy. Critics point out that those with the most coins may gain the most influence.

Example
Proof of workProof of stake
Who adds blocksMinersValidators
What they commitComputing power and electricityLocked coins (stake)
Penalty for cheatingWasted electricity and hardware costsStake can be slashed
Well-known exampleBitcoinEthereum (since 2022)

Neither is perfect

Both systems trade off security, cost and decentralization in different ways. A blockchain is only as strong as the number and independence of the people securing it. A small network with few miners or validators is much easier to attack than a large one.

Save your progress — free

A free account tracks lessons, unlocks the quizzes and gives you 10,000 virtual USD (no real value) to practise with.

Create free account

Education, not investment advice. Crypto prices can fall sharply and most retail traders lose money. Practice in DUKOIN uses virtual USD with no real value.