Blog / Blockchain and Mining

What Is Consensus and Why Do Blockchains Need It?

Cointechies

Imagine a thousand people, none of whom trust each other, trying to keep an identical list of who owes what. Some may be dishonest, others may go offline. How do they agree on a single correct list? That puzzle is called the consensus problem.

The Byzantine Generals Problem

Computer scientists describe it as a group of generals surrounding a city. They must decide together whether to attack or retreat, but some may be traitors sending conflicting messages, and messengers can be intercepted. Making sure that honest generals reach the same decision despite traitors is hard.

Blockchains face exactly this challenge: nodes spread around the world, some faulty or malicious, must agree on the order of transactions.

Why it matters for money

Without consensus, the same coin could be spent twice, once in each of two versions of the ledger. This double-spending problem is the reason digital cash was so hard to create before Bitcoin. Consensus makes sure there is only one history.

The main approaches

  • Proof of work: participants spend computing effort. The longest valid chain with the most work wins. Used by Bitcoin.
  • Proof of stake: participants lock up capital and vote, risking penalties. Used by Ethereum and others.
  • Delegated proof of stake: token holders elect a small group of validators who produce blocks.
  • Practical Byzantine Fault Tolerance (PBFT) and similar: a known group of validators exchange votes in rounds, common in permissioned and some fast networks.
Illustrative line chart showing the chance of an attacker controlling most nodes falling as the network grows
With more independent participants, it becomes much harder for an attacker to control a majority.

Finality

Consensus mechanisms differ in how quickly a result becomes irreversible. Bitcoin offers probabilistic finality: the more blocks that pile on top, the safer a transaction is. Some proof-of-stake systems offer explicit finality after a checkpoint, when a large majority of validators has signed off.

The trade-offs

Designers balance three goals: decentralisation, security and scalability, known as the blockchain trilemma. Increasing one often costs another. A small group of validators can be fast but is less decentralised, while a global network of equal participants is more robust but slower.

Common attacks

  • 51% attack: a group controlling a majority of mining power or stake rewrites recent history.
  • Sybil attack: one actor creates many fake identities. Work or stake makes this costly.
  • Long-range and nothing-at-stake problems: specific risks in proof-of-stake designs, addressed with checkpoints and penalties.

The bottom line

Consensus is the heart of every blockchain: the process by which thousands of strangers agree on a single version of events. Its design determines a network’s security, speed and decentralisation.

This article is for educational purposes only and is not financial advice. Crypto assets are volatile and you can lose some or all of your investment.

Follow the market in real time on the live crypto prices page, or go back to all articles.

More from the blog

All articles