Web3 has become a buzzword that incorporates concepts such as blockchain technologies, NFTs, metaverse, Dapps, Defi, etc. Blockchain has replaced third-party trust with decentralized ledgers, a new iteration of the World Wide Web.
The root of decentralized peer-to-peer networks lies in one patent working mechanism called the Consensus mechanism. The consensus protocol makes sure that every new block that is added to Blockchain is the only version of the truth that is agreed upon by all the nodes in the chain.
We hear about the most popular consensus mechanisms, proof of work (PoW) and proof of stake (PoS), but what purpose do they serve? Also, what are the other less-know but yet important consensus mechanisms? Keep reading the article to understand more about the consensus mechanisms and follow our blog to receive more freshly brewed updates on Web3.
Companies Mentioned
Coins Mentioned
Fourteen years ago the bitcoin whitepaper was released titled “A Peer-to-Peer Electronic Cash System”, and now Web 3.0, the huge tech evolutionary leap, is taking the world by storm with the tremendous opportunities in the blockchain domain. What is the secret behind this prospering tech? What is the foundation protocol that enables this evolution of blockchain networks, decentralized apps, or cryptos to maintain their state?
Web3 has become a buzzword that incorporates concepts such as blockchain technologies, NFTs, metaverse, Dapps, Defi, etc. Blockchain has replaced third-party trust with decentralized ledgers, a new iteration of the World Wide Web. The root of decentralized peer-to-peer networks lies in one patent working mechanism called the Consensus mechanism. We hear about the most popular consensus mechanisms, proof of work (PoW) and proof of stake (PoS), but what purpose do they serve? Also, what are the other less-know but yet important consensus mechanisms?
Blockchain is a 3-layered model consisting of three layers: Instances, Implementation, and Design goals. The design Goal Layer holds the key to data distribution in a blockchain that says that each node has a copy of information of all the data in the decentralized network which ensures privacy, transparency, and scalability. Have you ever wondered if every data can modify data in its own way, how do you make sure that all the nodes keep working on a consistent data set? In a blockchain, this problem is solved by the Consensus algorithms that form the backbone of any blockchain network. Consensus algorithms are the replica of any working mechanism of the blockchain concept. The consensus of blockchain is that all nodes maintain the same distributed ledger.
Keep reading the article to grind in more about the 7 most used consensus mechanisms that would help you ace basic problem statements in the Web3 space.
What are consensus mechanisms?
Every technology works on a certain set of rules and algorithms for smooth synchronization with the devices and user agreement. In the case of blockchain, these stacks of rules are termed consensus mechanisms. Consensus mechanisms are the protocols and algorithms that validate the transactions in a blockchain. It helps all the nodes in the distributed network to verify transactions and land on a common agreement about the present state of the distributed ledger.
In this way, a decentralized network achieves reliability and establishes trust between unknown parties(peers) without a central algorithm or a governing agency.
An account of basic consensus mechanisms
The tech is evolving and so are the blockchains. And consensus mechanisms form the extensive part of the blockchains. Here’s a quick sneak peek at the range of a few popular consensus mechanisms in use today:
1) Proof of Work (PoW)
The first consensus mechanism that came with Bitcoin’s whitepaper 14 years ago is the Proof of Work mechanism which is the seed of all other consensus mechanisms. In a blockchain network, the PoW consensus mechanism requires the network mining nodes to prove that the work done and submitted by them qualifies them to receive the right to add new transactions containing blocks to the blockchain. In Proof of Work, nodes that will add the next block to the blockchain are selected in proportion to their computing or hashing power; i.e., the nodes actually compete with each other using their computing power. It works by computing the hash values and validating the transactions until the specified number of leading zeros are found in the hash value.
2) Proof of Stake (PoS)
In proof of stake consensus, a validator is picked pseudo-randomly and assigned a block. The miner has to allocate a particular amount of his cryptocurrency to start validating. If the miner succeeds to validate the transaction, then the award is the stake they had pledged or allocated initially, along with certain transaction fees. This is a way to penalize bad behavior and incentivize good behavior. Validators will invest in the coins of the system by locking and staking up some of their coins. After that, all the validators will start validating the blocks and will validate blocks by placing a bet on them if they discover a block that they think can be added to the chain. Now based on the actual blocks added to the Blockchain, all the validators get a reward proportionate to their bets, and their stake increase accordingly. In the end, a validator is chosen to generate a new block based on its economic stake in the network. Thus, PoS encourages validators through an incentive mechanism to reach an agreement.
3) Proof of Activity (PoA)
The Proof of Activity consensus can be considered as an attempt to combine Proof of Work and Proof of Stake. This combination of consensus works in dual phases, first using PoW to validate blocks and then confirming the same through PoS. This mechanism boosts the overall security of transactions by ensuring blocks are stake-validated and hash-mined.
4) Proof of Elapsed Time:
It is one of the fairest consensus algorithms which chooses the next block using fair means only and is widely used in permissioned Blockchain networks.
In this algorithm, all the nodes get a fair chance by waiting for a random amount of time, adding proof of their wait in the block. The created blocks are then broadcasted to the network for others’ consideration and the winner is the validator that has the least timer value in the proof part. The block from the winning validator node gets appended to the Blockchain. There are various checks in the algorithm to stop nodes from always winning, and stop nodes from generating the lowest timer value.
5) Practical Byzantine’s Fault tolerance system
The Byzantine fault tolerance algorithm focuses on reaching a consensus even when some nodes of the network fail to respond or respond with incorrect information. Its objective is to safeguard a network from the influence of faulty nodes. It is derived from the famous Byzantine General’s Problem. Byzantine fault tolerance can be achieved if the correctly working nodes in the network reach an agreement on their values. There can be a default vote value given to missing messages which means we can assume that the message from a particular node is ‘faulty’ if:-
• Failure to return a result
• Respond with an incorrect result
• Respond with a deliberately misleading result
• Respond with a different result to different parts of the system
6) Proof of Capacity
In the Proof of Capacity consensus, validators are supposed to invest their hard drive space instead of investing in expensive hardware or burning coins. The more hard drive space validators have, the better their chances of getting selected for mining the next block and earning the block reward.
7) Proof of History
Proof of History is a means for improving the efficiency of other mechanisms and was proposed by the Solana project. It uses a VDF or a Verifiable Delay Function server that orders the transaction in a blockchain network. The validator nodes process transactions efficiently without any time limit. It is a stance of an increase in architectural complexity.
These are a few consensus mechanisms that have been in the Web3 economy for a while and have been the root cause of the Blockchain and consensus protocol transitions. Picking up the best consensus mechanism is not as straightforward as black and white. While one consensus mechanism may provide more efficiency and speed compared to another, which may provide retaining more pseudo-anonymity or privacy and less security. The consensus mechanisms have to be picked on the basis of reference to the use cases.
How will these concepts help you navigate the Web3 space?
Consensus mechanisms form the base of blockchain technology. The Internet ushered in a new era of entrepreneurs and industries along with which came along decentralized networks, smart contracts, cryptocurrencies, and many decentralized applications. This requires the people in the blockchain network to spend certain computing power to stabilize and maintain the blockchain. This is how consensus is fetched.If each and every node in a blockchain network both stores the network and has the power to decide which modifications should be applied, then the network is virtually impossible to corrupt. The consistency of this procedure is maintained by the consensus algorithm of that network which is present in every single node. This proves how consensus algorithms carry weight in the Web3 era.