No one controls it is what we hear about blockchains all the time. But if no one controls it, then how does its large number of participants agree to process the transactions?
It is the mystery that we will solve in this blog.
Every blockchain works on a specific Consensus Mechanism on which its participants have to agree. Read on to know everything about it.
What is Consensus Mechanism?
A consensus mechanism is a decision-making mechanism that blockchains use to reach an agreement. It comprises a set of protocols to follow for blockchains when they verify their transactions or mine new units of their native currency.
As you know, a blockchain is a distributed ledger that keeps track of all its transactions. It records the transapoctions in a "block" after the network nodes verify them. Such blocks with verified transactions then attach to the existing blocks to form a blockchain: a "chain of blocks".
In this process, the consensus mechanism helps the blockchain to ensure that all its network nodes agree to its rules. In short, it keeps all the nodes of a network synchronized.
A new cryptocurrency blockchain either uses a new consensus mechanism or copies an existing one from the other blockchains. Some popular consensus mechanisms are- Proof of work and Proof of stake.
What are the types of Consensus mechanisms?
Here is an overview of some best-known types of consensus mechanisms.
PROOF OF WORK (PoW)
Proof of work is the first ever created consensus mechanism. Bitcoin operates on a proof of work consensus.
It involves choosing some network participants as the miners to complete the task of verifying new data. Once the chosen miners successfully verify and validate the latest data, the network rewards them with new crypto. This way, the network verifies the transactions and mints new crypto.
The miner(s) to verify a block of transactions gets chosen from many crypto miners who compete against one another to solve a complex computational equation presented by the blockchain. All the miners use high-powered computers to solve mathematical problems. The first miners to come up with a 64-digit hexadecimal number solution, also known as "Hash", gets the opportunity to form the new block by verifying its transactions. Once the miner successfully validates the given transactions, the blockchain network gift it a predetermined amount of crypto coins or tokens.
If we take the example of Bitcoin, it always generates a 64-character hash that miners race to figure out. The winner miner gets to add a new block of transactions to the bitcoin blockchain. In return, that miner receives bitcoin mining rewards in the form of newly minted bitcoins and transaction fees.
Interestingly, the mining rewards of Bitcoin get reduced to half every four years due to a pre-scheduled event called Bitcoin halving. Between 2008 to 2012, the mining reward for bitcoin was 50BTC which was reduced in 2012 to 25 BTC in the first Bitcoin halving. Similarly, this mining reward was further reduced to 12.5BTC in 2016 after the second halving event.
Famous cryptocurrencies like Bitcoin Cash, Ethereum Classic, Dogecoin, Monero, and Litecoin use the PoW mechanism.
- Highly secure and safe
- Truly decentralized
- Requires a lot of computational power
- Not energy efficient hence harms the environment
- Require a powerful and expensive mining machinery
- High transaction cost and low transaction speed of the network
PROOF OF STAKE (PoS)
Like its name, the Proof of Stake consensus mechanism works on the staking concept.
The network participants of a blockchain stake the native token of the network to get selected as the validator. The more coins you stake, the better your chance of being chosen as the validator.
Once chosen as a validator, the network will assign you a block to verify the transactions. After the validator verifies the transactions, a specific number of validators check the accuracy of verifications. Lastly, the network approves that block of transactions and sends it to the existing blockchain. This is when the validators get some newly minted crypto in reward.
Proof of stake blockchains can use a different process for validation. But the selection process of validators stays the same in all.
The poS mechanism does not require high computational power and solving of a complex puzzle. Hence, it consumes less energy and processes transactions faster than PoW.
Examples of cryptocurrencies that work on the Proof of Stake mechanism are- Cardano (ADA), Solana (SOL), and Tezos (XTC).
Ethereum currently uses Proof of Work consensus but will soon be shifting to Proof of Stake consensus in its upcoming upgrade, "The Merge."
- Energy efficient
- No need for highly advanced equipment
- Fast and inexpensive transactions.
- Sometimes, less secure than Proof of Work.
- Validators holding high PoS-based crypto can affect decentralization.
- May require the validators to lock their holdings for a specific period.
DELEGATED PROOF OF STAKE (DPoS)
It is a modified version of the Proof of stake consensus protocol.
In DPoS, all the network participants vote for selecting some delegates from themselves. These delegates would be responsible for verifying blocks of that blockchain. Once they validate all the transactions of a new block, they get the transaction fee of that block as a reward from the network.
The delegates then distribute this reward to those who have voted for them. The received reward is usually directly proportional to the staked amount. However, if the selected delegates fail to verify a block, they do not get any rewards. Instead, their rewards add to the next representatives if they successfully verify and validate a block.
The Delegates are also known as "witnesses".
Some examples of cryptocurrencies and tokens that use DPoS are- Cardano, EOS, and TRON.
- Low transaction cost
- Highly energy efficient
- Financially inclusive because smaller holders can participate
- Shorter Transaction processing time
- No need for highly advanced equipment
- Less decentralized than PoW and PoS.
- Prone to attacks
PROOF OF BURN (PoB)
The next consensus type in our list is Proof of Burn (PoB). In this, the miners earn the privilege of mining new coins of native cryptocurrency and verifying transactions through Crypto burning.
Crypto-burning means removing your crypto from the network. Generally, this practice reduces the supply of crypto and increases its price. However, PoB-powered blockchains use it to validate transactions. The concept behind PoB is that by burning your crypto, you are showing commitment and involvement in the blockchain network.
The miners burn the native cryptocurrencies of a PoB blockchain by sending them to an irretrievable wallet address. By doing this, they win the network's trust and the right to mine a new block. The miner can then verify a block's transactions to earn higher rewards.
The network decides which miner will get the new block by calculating the score generated through their crypto burning. The miner who burns the highest number of cryptocurrencies holds the highest score. It means the more crypto a miner burns, the higher his chance of selection for mining the next block.
In burning, when you send the coins to a non-redeemable wallet, it creates a "burn hash". The more crypto you burn, the smaller the burn hash will be. The lower your burn hashes, the better your score will be, and the higher your chances of getting selected for mining the new block.
The miners can keep getting the mining opportunities and earn rewards in the form of their native currency of the PoB blockchain. The PoB miners do not get their investment back immediately because they have to burn the coins to earn them again. However, this method benefits them in the long run because the reward can be higher than their burned asset.
An example of PoB-based blockchains is Slimcoin.
- No requirement for excessive energy or computing power
- Encourages investors in long-term projects
- Sometimes, add value to the existing native tokens and coins
- Not yet proven efficient in large scale.
- Sometimes require other cryptos to burn for mining the native crypto.
- Verifying the burning process is time-consuming.
PROOF OF AUTHORITY (PoA)
Proof of Authority (PoA) is a mechanism where the participants put their identity and reputation at stake instead of coins. It is also a modification of PoS like DPoS and was proposed by Ethereum co-founder Gavin Wood in 2017.
The participants share their real identities and prove their reputations to earn the right to become validators. They do so by providing their verification documents to the PoA blockchain project developer team. Once they successfully prove their good reputation, the network makes them its validators.
When a new block of transactions comes into the network, the network randomly selects one validator to verify the block. The chosen validator verifies the block and then sends it to other network validators. Once all the validators approve those verified transactions, the network approves the block. This way, the validator gets the reward which can be either the transaction fee of the block or the native currency of the blockchain.
Since the validators are chosen through a strict and well-detailed verification process, they stay loyal to the network. They can also be replaced anytime if they are found guilty of fraudulent activity by the network. All these factors motivate them to verify the transactions honestly and maintain the network health by following its rules.
Since this consensus mechanism requires participants to share their identities, it is more suitable for private blockchains.
Vechain Thor and Xodex are some platforms that use the Proof of authority consensus mechanism.
- No need to buy expensive hardware; hence affordable.
- Energy efficient.
- Highly scalable.
- Since personal identity is revealed, PoA is not secure.
- Compromises with decentralization as only a few can participate.
PROOF OF ACTIVITY
Proof of Activity is the fusion of proof of work (PoW) and proof of stake (PoS) consensus mechanisms. It begins with a proof of work (PoW) manner where miners try to solve a puzzle to claim the reward. The mined block in Proof of activity only contains the header information and the mining reward address of the first miner.
The header information of the block helps to select the random group of validators. It is where the mechanism switches from PoW to PoS. The selection of validators depends on the native crypto they have staked. These selected validators validate a block and its transactions. Once all the validators successfully validate a block, it gets added to the existing blockchain with the recorded transactions.
However, suppose any validator does not validate or sign the block. In that case, it is considered incomplete, and the next mined block comes for validation.
The winning miner and the validators get their share of the distributed network fee generated through their block.
Decred (DCR) cryptocurrency uses the PoA consensus mechanism.
- Low chance of 51% attacks. Hence, secure.
- Energy intensive mining
- Those with more stake in crypto can affect the decentralized process
- Slow as compared to other consensus mechanisms
PROOF OF CAPACITY (PoC)
This consensus mechanism is quite different from other mechanisms. Instead of computational power or the staked amount, it depends on your hardware space.
To understand PoC, you have to start with PoW, where the miners compete to solve a complex puzzle. PoC miners store a list of all possible solutions on their hard drives even before the mining starts. Here, the miners with more storage space get the advantages because they can store more possible solutions to match the required hash solution.
Once this process completes, the winning miner can start verifying the block transactions and get the reward specified by the blockchain.
Since it does not involve computational power to solve the puzzle, it is highly energy efficient compared to PoW. Moreover, it does not require expensive and heavy machinery, which makes it suitable for every network participant. It is also more decentralized than DPoS and similar mechanisms.
Burstcoin, Storj, Chia, and SpaceMint are some cryptocurrencies that use the Proof of capacity consensus mechanism.
- Energy efficient
- Faster than Proof of work consensus
- Does not require heavy machinery
- Generates a lot of useless data
- Anyone can own larger storage and earn more money
- Not very secure from hackers and attackers
PROOF OF HISTORY (PoH)
Solana is the first blockchain that uses Proof of history consensus. It uses this mechanism to improve its Proof of stake mechanism.
Proof of history helps to keep track of the order of on-chain transactions in a blockchain. Instead of grouping transactions with a single timestamp to form a block, Solana uses PoH to keep track of the series of transactions.
It uses the output of a transaction's hash as the input in the next transaction's hash. This way, the transactions in a series create a chain of hashes. This chain is secure, reliable, and verifiable. While Solana verifies transactions through PoS, it combines PoH to reduce the time spent by nodes to confirm the order of transactions.
PoH uses a high-frequency Verifiable Delay Function (VDF) to keep track of the time when every transaction in the blockchain occurred. This way, the nodes do not have to spend time agreeing on the date and sequence of the transactions in a block. They can start generating the next block, increasing the transaction speed.
- Makes transactions fast
- Reduces the transaction fee
- Energy efficient
- Makes the network prone to attackers and hackers
PROOF OF ELAPSED TIME (PoET)
Unlike all other consensus mechanisms we have discussed till now, Proof of Elapsed time (PoET) follows a lottery system for assigning the block to network participants. The algorithm in PoET generates a random wait time for each network node. The node with the shortest wait time will win the right to mine the block once it finishes the wait time. The randomness in assigning time and node decides the fairness in the PoET-based network.
Hyperledger Sawtooth is the coin that uses PoET consensus protocols.
Are there other consensus algorithms also?
The list of existing consensus mechanisms is not over yet. There also exist Practical Byzantine Fault Tolerance (pBFT), Proof of Weight (PoWeight), Proof of Importance (PoI), Leased Proof of Stake (LPoS), etc. But their adoption and popularity are not very significant currently. New consensus mechanisms also keep coming into the market.
A Consensus mechanism is the decision-making mechanism of blockchains that helps keep all its nodes in coordination. Many types of consensus mechanisms exist. Out of all, Proof of work and Proof of stake is the most popular. An ideal consensus should be decentralized, scalable, and secure. However, none of the mechanisms has been successful in excelling in all these three criteria till now. But the blockchain industry has been continuously working toward solving this issue.