What is a consensus algorithm and how does it work?

Consensus algorithm

What is a consensus algorithm?

A consensus algorithm is a mechanism that ensures all participants in a network agree (consensus) on the state of the blockchain, without the need for a central authority. Consensus algorithms are what make a blockchain function.

A blockchain is a chain of information in which transactions are stored. When new transactions occur, a new block is added to the blockchain. This means that all information is recorded and cannot be changed afterward. The consensus algorithm of a blockchain determines how the nodes reach agreement so that this new block can be reliably added.

Thanks to consensus algorithms, blockchains function and remain secure. Consensus algorithms ensure that all nodes in a network agree on the order of transactions, which prevents double spending or fraudulent actions.


Key Takeaways

  • Consensus algorithms ensure agreement among participants on the blockchain.
  • Consensus algorithms prevent double spending and fraud by agreeing on the order of transactions.
  • There are different types of consensus algorithms, each with its own advantages and disadvantages.

How does a consensus algorithm work?

Consensus algorithms work through a cryptographic process in which nodes validate the validity of a transaction or a block of transactions and must agree on the order in which these new blocks are added to the blockchain. The node that eventually gets to add the block with new information to the blockchain is called the validator and receives a reward in the form of cryptocurrency. This process often runs automatically and does not require a central party to oversee everything.

Consensus algorithms ensure that all nodes in a blockchain network agree on the validity of transactions. Through cryptographic methods, nodes validate new transactions or blocks and coordinate which block gets added to the blockchain. The node that ultimately gets to add a block (you can think of this as the winner) is called the validator (in Proof of Stake) or miner (in Proof of Work). This node receives a reward in the form of cryptocurrency (in the case of Bitcoin, a reward in Bitcoin). This entire process operates without a central party — the network handles verification and approval on its own.

Let’s explain the consensus algorithm process using a Formula 1 race as an example:

Imagine a Formula 1 race: multiple drivers race on a track with the goal of crossing the finish line first. From start to finish, they can’t just do whatever they want — there are clear rules set by the FIA (the international motorsport federation) to ensure everything is fair and safe. Think of rules regarding specific tires teams may use, or that drivers cannot cut corners.

During the race, everything is monitored by race officials (a kind of referees) and sensors on the cars. Officials constantly check whether drivers follow the rules. If a driver breaks a rule, they receive a warning, time penalty, or even a disqualification.

A blockchain works with a similar mechanism — the consensus algorithm. Instead of drivers, you have nodes that all try to process (the race) and validate transactions (based on pre-established rules). But there is one big difference: instead of one central referee like the FIA, the nodes monitor each other. They make sure the blockchain is updated correctly. If a node breaks the rules, such as by approving double spending, other nodes can ignore or even penalize it.

In the end, consensus is reached among all participants through the algorithm about which transactions are valid. The process resembles a Formula 1 race but is completely decentralized.

What are the different types of consensus algorithms?

There are various types of consensus algorithms that enable the network of nodes to reach agreement on a blockchain. Each mechanism has its own rules, advantages, and limitations.

Proof of Work (PoW)

This is the oldest and best-known consensus algorithm, introduced by Bitcoin. It is known for its high energy consumption, because nodes must solve mathematical puzzles, which requires a lot of computing power. Proof of Work is a very secure consensus algorithm, but scalability is an issue.

Well-known Proof of Work blockchains: Bitcoin and Litecoin

Proof of Stake (PoS)

Proof of Stake is a consensus algorithm in which participants are selected based on the number of tokens they stake. Proof of Stake is more energy-efficient than Proof of Work, as it doesn’t require intensive computing power. Ethereum switched from Proof of Work to Proof of Stake in 2022 to improve energy efficiency.

Well-known Proof of Stake blockchains: Ethereum, Cardano and Tezos

Delegated Proof of Stake (DPoS)

Delegated Proof of Stake is a variation of Proof of Stake designed to be faster and more efficient. It uses a small group of elected representatives who add new blocks to the blockchain. This increases network speed but reduces the level of decentralization.

Well-known Delegated Proof of Stake blockchains: Tron

Proof of Authority (PoA)

In Proof of Authority, the network has so-called "validators," a limited trusted group of participants who are allowed to add blocks to the blockchain. The network is fast and efficient but less decentralized than Proof of Work or Proof of Stake. Proof of Authority is often used by private blockchains.

Well-known Proof of Authority blockchains: VeChain

Proof of History (PoH)

Proof of History is a relatively new and innovative consensus algorithm. It became known through the Solana blockchain. Instead of reaching consensus about the order of transactions on the network, transactions in Proof of History are cryptographically timestamped. Each event on the network receives a unique timestamp before being sent to the network, allowing nodes to see the order in which events occurred. As a result, nodes don’t need to coordinate. This allows such blockchains to operate extremely fast and efficiently, with low costs.

Well-known Proof of History blockchains: Solana

Other consensus algorithms

  • Proof of Burn
  • Proof of Capacity
  • Proof of Participation
  • Proof of Elapsed Time
  • Delayed Proof of Work
  • Effective Proof of Stake
  • Pure Proof of Stake
  • Bonded Proof of Stake
  • Nominated Proof of Stake
  • Proof of Stake Time
  • Leased Proof of Stake
  • Anonymous Proof of Stake
  • Hybrid Proof of Stake
  • Delegated Proof of Contribution
  • Secure Proof of Stake
  • Tresholded Proof of Stake
  • Roll Delegated Proof of Stake
  • Proof of Coverage
  • Proof of Importance
  • Delegated Proof of Broker
  • Proof of Transfer
  • Proof of Storage
  • Proof of Activity

Final thoughts

Consensus algorithms ensure that blockchains function reliably, securely, and in a decentralized manner by enabling agreement among all nodes on the network about the validity and order of transactions. Without a central authority, blockchains can continue to operate as transparent networks where fraud is prevented and double spending is impossible. Each type of consensus algorithm has its own characteristics, advantages, and limitations, making them suitable for different applications in the crypto world.

About Finst

Finst is one of the leading cryptocurrency providers in The Netherlands and offers a best-in-class investment platform together with institutional-grade security standards and ultra-low trading fees. Finst is led by the ex-core team of DEGIRO and is registered as a Crypto Service Provider with De Nederlandsche Bank (DNB). Finst offers a full suite of crypto services including trading, custody, fiat on/off ramp, and staking for both retail and institutional investors.

The crypto platform you'll love

We are here to give you the tools, inspiration, and support you need to become a better investor.