Buy eBook

Consensus Mechanism

A consensus mechanism is a process computers on a decentralized blockchain use to verify transactions before the information is added

What is a Consensus Mechanism?

A consensus mechanism is a process through which computers on a decentralized blockchain agree that transactions are true and correct before the information is added to the blockchain.

The Long Definition

A decentralized blockchain is a distributed network of computers all over the world. Every computer in the network can see everything that goes on (not names, just info about the transactions). This is different from a centralized blockchain that is controlled by one big computer.

A decentralized blockchain needs a way to keep everyone on the same page. That “way” is called a consensus mechanism. It is the process through which the blockchain’s transactions are checked and shown to be true and correct before that information can be added to the blockchain.

The computers that do this work are called nodes, but the people behind them have different names depending on the blockchain they work on. For example, on the Ethereum blockchain, the people are called validators, and on the Bitcoin blockchain, they are called miners.

There are different ways that blockchains reach an agreement (consensus) on whether or not the details of a transaction are true and correct. This is called the consensus mechanism.

The most popular consensus mechanisms are proof-of-work (PoW) and proof-of-stake (PoS). Generally, the choice of the mechanism depends on a blockchain’s goals.

For example, Ethereum is designed to be a platform for other cryptocurrencies to be built on. That means lots of transactions, so PoS is better for them because it can handle more transactions faster than POW and at a lower cost per transaction, even if the number of transactions increases.

What is a consensus mechanism

Understanding consensus mechanism

A blockchain is a distributed ledger. Think of it as a database. And like any other database, data is being added all the time. This data is usually about cryptocurrency transactions.

Only valid transactions can be added to make sure the blockchain network is secure.

Decentralized blockchains do not have a central authority (like centralized blockchains). To ensure the records of transactions are true and correct, they offer the job to those computers on the network that want to get paid for checking, confirming, and adding the information into blocks. They usually give this work to a number of computers who all must agree before the information can be added.

On the Bitcoin blockchain (which uses the Proof of Work PoW consensus mechanism), the work is done by miners. On the Ethereum blockchain (which uses the Proof of Stake PoS consensus mechanism), they are called validators.

Miners and validators follow the rules so they can agree on valid transactions. This is the consensus mechanism, meaning they all must agree that everything is true and correct before the data can be entered into the blockchain.

Why is a consensus mechanism important?

A consensus mechanism keeps a blockchain secure, which means the information about transactions is worthy of trust and cannot be changed.

For someone to carry out a false transaction, they would need to “convince” the majority of the nodes to vote for it. This means they would have to control at least 51% of computers on a blockchain. That’s very unlikely because most blockchains have thousands of nodes spread out all over the world. So, it would cost a fortune to get 51% or more of the network and would not be worth the time, trouble, and money.

transaction verification through consensus mechanism

Types of consensus mechanisms

Blockchains use different consensus mechanisms to keep them secure. 

Proof of Work

Proof of work (PoW) is the original consensus mechanism. It is used by Bitcoin and Dogecoin and was also used by Ethereum before The Merge.

In PoW, participants – known as miners – compete to solve complex mathematical puzzles. Those who do so successfully receive block rewards as compensation for their work.

Generally, cracking PoW puzzles is hard and requires a lot of computing power. To earn fees, every miner races to complete each block. This makes PoW very energy-intensive since thousands of computers are doing it.

PoW is also expensive because mining demands powerful equipment that costs thousands of dollars. Proof of Stake (PoS) is a faster, cheaper, and more environment-friendly alternative to PoW.

Instead of miners with powerful computers, it uses validators. These are participants with a stake in the system. “Stake,” in this case, means that they have locked up a certain amount of crypto in the system.

Proof of Stake

In PoS, hundreds of validators compete to complete a block, but only one validator is chosen for the job. The selection process can be random, or skewed by how much each validator has staked. Either way, the process is much more efficient than PoW and better for the environment because it uses much less energy.

A validator is rewarded by earning transaction fees and block rewards. But if they make a mistake, they pay a penalty (called slashing) or are excluded from validation in the future.

Blockchains using this system include Cardano and Avalanche.

Solana uses the proof-of-history (PoH) consensus mechanism, which is based on PoS. In PoH, a cryptographic function is used to generate timestamps to create a chronological order of transactions.

There is also proof-of-capacity (PoC). This mechanism allows participants to maintain the network based on how much memory space they contribute.

Proof-of-burn (PoB) is another consensus mechanism. It involves the miner burning cryptocurrency for a chance to verify the blocks. The more crypto they burn, the more blocks they can mine, and the bigger the rewards they receive.

computer security graphic

What is the best consensus mechanism?

PoS is slowly becoming the standard due to its fast and cheap transactions. As blockchain technology advances, some lesser-used methods might rise in popularity, or new ones might be invented.

Want to join the Dypto journey? Follow our socials!