If there is no central authority keeping the blockchain ledger, who decides what the next block is, and how do we prevent someone from altering the ledger? These are the questions a consensus mechanism is designed to answer. The two most common mechanisms are proof of work (PoW), used by Bitcoin, and proof of stake (PoS), which Ethereum uses today.

Coin mentioned in the article: $BTC Current price: 77,032.88 (24h -0.13%).

Proof of work: competing with computing power

Bitcoin uses proof of work: miners continuously try to calculate SHA-256 hashes. The first to find a result that meets the difficulty requirements earns the right to record the block and the block reward.

Bitcoin produces a block roughly every 10 minutes, and mining difficulty adjusts every 2,016 blocks: when the network’s total computing power increases, the difficulty goes up too, bringing block times back to around 10 minutes.

Proof of stake: put up staked assets as collateral:

In September 2022, Ethereum switched from proof of work to proof of stake through “The Merge.” Running a validator requires staking at least 32 ETH. Validators take turns proposing and attesting to blocks according to the rules.

Under Ethereum’s proof-of-stake system, each 12-second period is a slot, and at most one block can be produced per slot. Validators who misbehave have some of their stake slashed, while those offline for a long time also have some of their balance deducted.

What keeps it secure:

Proof of work relies on a real investment of computing power and electricity: rewriting the historical record would require controlling most of the network’s computing power, at an extremely high cost.

Proof of stake uses staked assets as collateral: to attack the network, you’d need to control a large amount of stake, and if your misbehavior is detected, that stake will be slashed. Both make “the cost of misbehavior far greater than the reward”—they just put different things at stake.

Don’t compare consensus mechanisms alone:

When discussing which chain is more secure, the consensus mechanism is only one part of the picture. How widely nodes and validators are distributed, the quality of client software, and how the community responds when things go wrong are just as important.

A couple of final thoughts:

Once you understand PoW and PoS, terms like “hash rate,” “staking,” and “slashing” make more sense in the context of the system as a whole. Markets always bring surprises, so think ahead about what you’ll do if you’re wrong.

What else would you like to learn about? Let me know in the comments.

I get it wrong a lot too—make your own judgment.