What are consensus mechanisms, and what’s their intention?
Any distributed ledger is based on a consensus algorithm that supports the network and makes it decentralized.
What is it?
The terms “algorithm” and “protocol” are commonly used as synonyms. It’s important to understand that they are not the same.
A protocol is a set of rules that runs the blockchain. These rules regulate the way the nodes interact, confirm the creation of blocks, etc. For example, Bitcoin is a protocol that works on the Proof of Work algorithm.
Consensus in blockchains is the agreement between the majority of users regarding the data distribution. The transaction confirmation is impossible without it.
A consensus algorithm is a kind of mechanism that stores the network rules and conditions necessary to reach consensus.
Unlike in centralized finance, where there’s one governing entity, all powers belong to validators (members of the network) in decentralized systems. In other words, the validation of all information and the conduction of transactions in the blockchain is performed by all members sharing equal powers. This ensures autonomy and decentralization.
Any blockchain has a consensus algorithm. For example, Ethereum is based on PoW, while Tezos on PoS. Let’s discuss these and other popular algorithms in detail.
Types of consensus
Proof of Work is one of the first and most popular algorithms. To create a new block in the network, a miner needs to mathematically calculate the block’s hash. The work is performed by special powerful devices that handle thousands of calculations per second. The miner who finds the necessary value faster gets rewards and the right to create a new block.
The algorithm is simple and reliable, but it also consumes a lot of energy and harms ecology: to calculate new hash fast, miners use powerful equipment that requires a lot of electricity.
Blockchains and assets based on PoW: Bitcoin, Ethereum, Litecoin, Dash, Monero, Dogecoin.
Proof of Stake is an eco-friendly alternative to PoW. The right to create new blocks belongs to the validator with the largest share. In other words, the more funds there are on the user’s balance, the more possible that the network allows them to generate a block. In PoS networks, members don’t need to compete and conduct complex calculations. Besides, such networks are much faster.
Blockchains and assets based on PoS: Tezos, Cardano, Polkadot, Ethereum (planning to shift to PoS in 2022).
Delegated Proof of Stake is an analogue of the mentioned PoS. The fundamental principle of this algorithm is that members with a bigger share get the right to choose a small group of validators that will create new blocks.
In networks based on DPoS, new blocks are generated every second. The validator chosen by members can share tokens with those who delegated them to this position.
Blockchains and assets based on DPoS: BitShares и EOS.
Proof-of-Activity is an alternative consensus method that combines PoW and PoS algorithms. The process of mining starts according to the PoW principle: miners calculate hash using special equipment. Once the block is created, the miner sends data to the network, and the system shifts to the PoS algorithm. A new block contains a miner’s reward address and a header. It enters the chain only after it’s signed by the required number of miners. The reward is divided between PoW and PoS miners.
PoA has the capacity to conduct way more transactions per second than PoW or PoS. Besides, the algorithm is less vulnerable to cyberattacks and consumes less electricity.
Blockchains and assets based on PoA: Decred, VeChain.
Proof-of-Location implies the possibility of tracking digital assets. The members of the network are assigned BFT indicators that make it possible to locate nodes synchronized with crypto. The system prevents scams and network failures.
Blockchains and assets based on PoL: Platin, FOAM.
Proof-of-Importance is the analogue of the PoS algorithm. The right to generate a new block goes to an active user who has the largest share of crypto and the largest share of time spent in the network. Thus, the more transactions the miner performs and the more their share is, the more significance they get in the algorithm.
Blockchains and assets based on PoI: NEM.
Proof of Capacity is an eco-friendly PoW analogue. The right to create blocks is assigned to a miner who has more free hardware storage.
Blockchains and assets based on PoC: Chia, SpaceMint.
Proof of Elapsed Time was created by Intel in 2016. According to the algorithm, to create a block, a miner has to generate a specific time interval and then go to a “sleeping mode” until the specified time. Those, who will wait until the required time, will get a right to create blocks. The consensus has a centralized server, works in the SGX system, and implies random time intervals for block generation.
Proof of Burn is a system that allows burning tokens for mining. In other words, to create a new block and get a reward, the network members have to burn a specified amount of crypto. The more coins miners eliminate, the more chances they get.
Blockchains and assets based on PoB: Slimcoin, Counterparty.
Byzantine Fault Tolerance is a unique type of protocol, where the confirmation of ⅔ members of the network is required for work. The intention of the system is to protect the network from members with malicious intentions.
A consensus algorithm is an essential part of any blockchain. Its purpose is to maintain decentralization. Consensus algorithms ensure the capacity of the network and protect blockchains from cyberattacks and malicious activity.