Consensus Mechanisms in Blockchain and Why They Are Important

Consensus Mechanisms in Blockchain and Why They Are Important

The core feature of blockchain is decentralization. I mean, the reason why many of us have embraced blockchain technology is mainly because of this feature of decentralization.

The idea that, with the third web (web3), we have complete control of our finances and data excites us.

Despite this feature, decisions have to be made to validate transactions and make progress.

Since the decentralized nature of the blockchain ecosystem does not permit a single person or entity to be in charge of making decisions, consensus mechanisms have become very important to maintain trust and transparency, the major features of the blockchain.

What is Consensus?

Consensus means general agreement among members of a given group, organization, or community. It is simply the process of decision-making that seeks the agreement of a majority of the community members.

For example, if a consensus is reached on the value of a community’s plot of land and 51% of the community members agree on 50 dollars, while 49% agree on 20 dollars, the value of the land will be 50 dollars.

In layman's terms, consensus means the majority carries the vote.

What is Consensus Mechanism in Blockchain?

In blockchain, a consensus mechanism is a system that is used to reach an agreement about the true state of a blockchain at a particular point in time. It is what determines how a transaction is added to a blockchain.

It is a system that validates a transaction and declares it authentic. It ensures that all nodes in the blockchain are in harmony with the state of a transaction.

Once the nodes have agreed on the legitimacy of a transaction, it gets approved, authenticated, and recorded on the blockchain. After this is done, the block or transaction remains there forever.

Blockchains such as Bitcoin, Ethereum, Polkadot, Cardano, etc. use consensus mechanisms to validate transactions and keep the blockchain secure.

Types of Consensus Mechanisms.

There are several types of consensus mechanisms, and each blockchain can only adopt one at a time. Below are examples of consensus mechanisms in blockchain, as well as their upsides and trade-offs.

Proof of Work (Miners)

This is the oldest and most popular consensus mechanism. It emerged alongside the first blockchain (Bitcoin blockchain) created by Satoshi Nakamoto.

Proof of work relies exclusively on miners. These miners, who act as nodes, compete to solve complex cryptographic puzzles.

Here, the first miner to get the right answer (the hash of the next block) receives the right to mine the next block. The miner, i.e., the winner of the puzzle, gets rewarded with newly minted cryptocurrency, which is often referred to as “gas fees."

Upside: It is very secure and difficult to hack.

Tradeoff: It is slow and requires a lot of computing power and energy.

The Bitcoin and Litecoin blockchains use this consensus mechanism to this day.

Proof of Stake (Validators)

This is the second-most popular consensus mechanism. Recently, it has become the alternative to the proof of work model.

This consensus mechanism does not involve mining but requires that members of the blockchain network stake coins to participate in the validation of transactions.

Instead of miners, it uses validators.

Blockchains like Ethereum, Polkadot, and Algorand use this consensus mechanism.

For Ethereum, a validator is required to stake 32 eth to qualify to validate a transaction.

Upside: It requires less computing energy and is faster than the proof of work mechanism.

Tradeoff: Validators with a larger stake have excessive influence on transaction validation, which is a security risk and defeats the core of the blockchain: decentralization.

Delegated Proof of Stake (Voters and Delegates)

This is an advanced version of the Proof of Stake consensus mechanism. It simply builds upon the proof of stake and is made up of voters and delegates.

The major difference here is the implementation of the new voting system.

Here, the voters stake coins, while the delegates are elected by the voters to validate transactions.

Tron and Steem blockchains adopt this Delegated Proof of Stake(DPos) consensus mechanism.

Upside: Delegated proof of stake is more efficient and democratic, as it includes more users financially and provides incentives to validators so they can maintain the network’s functionality.

Tradeoff: Delegating network control to a few nodes not only increases the vulnerability of the blockchain to hackers but also defeats decentralization.

Proof of Authority (Identity)

The proof of authority consensus mechanism is more suitable for private blockchain networks.

In this mechanism, instead of having validators stake coins, they stake their own identity and reputation.

It makes use of a reputation-based model to validate transactions on the blockchain, where approved accounts validate transactions and create new blocks.

These approved accounts have to be nodes that have shown interest not just in the short-term but in the long-term growth and success of the network.

The Vechain blockchain uses the Proof of Authority consensus mechanism.

Upside: Proof of Authority consensus mechanism achieve high scalability because they limit the number of validators that exist in a network.

Tradeoff: Any consensus mechanism that gives the power of a network to a few people in the network compromises decentralization and proof of authority is not an exemption.

Proof of Capacity (Storage)

This consensus mechanism can also be referred to as Proof of Space.

Here, the more memory space or hard disk space a miner has, the higher the chance of the miner being able to get the hash value of the next block and validate a transaction on the blockchain.

Instead of solving complex puzzles like some other consensus mechanisms, here, nodes store a bunch of random data on their hard drives. When the network needs any data, these nodes find and show that data, proving they have a lot of storage. Whichever node finds the data first gets to add a new block to the network and gets rewarded for it.

Upside: It is energy efficient compared to Proof of Work (PoW) because it relies on storage space rather than computational power.

Tradeoff: Few miners with extensive storage capacity or resources could control the network, potentially leading to centralization.

Proof of History (Timestamp)

Proof of History works by generating verifiable timestamps (the exact time an on-chain transaction occurred) using a sequential cryptographic hashing function called SHA256.

These timestamps are linked together to form a secure, linear, and irreversible history of transactions on the blockchain.

While most blockchains with consensus mechanisms other than Proof of History require validators to collectively agree on the time each transaction has taken place, nodes in the network using the Proof of History consensus mechanism can easily verify these timestamps without having to redo the entire computation, making it efficient, less time-consuming, and scalable.

Proof of History is a new consensus mechanism used by Solana.

Conclusion

Consensus mechanisms in blockchain are simply verification standards.

This article provides a non-exhaustive list of consensus mechanisms in the blockchain ecosystem.

The truth is that several consensus mechanisms have been created, but few have been implemented or used. As of the time of this writing, the popular ones are proof of work (PoW) and (PoS).

It is important to note that the different consensus mechanisms have their upsides (strengths) and weaknesses, as outlined. As a result, each blockchain chooses the consensus mechanism that best meets its core needs.

All the consensus mechanisms use different concepts to perform the same function (validating transactions on the blockchain).

As the blockchain sector continues to grow and gain massive adoption, more consensus mechanisms will still be established as the need arises.

I hope you were able to learn a thing about consensus mechanisms, the role they play in validating transactions, why they are important in blockchain, and which blockchain uses which.

Till I come your way again, stay winning.