
Getting everyone to agree so the network can progress.
A consensus algorithm allows all the different computers that validate and record transactions in a blockchain to reach agreement.
It’s crucial to the successful operation of a blockchain because it prevents bad actors from cheating the system. The mechanism prevents malicious activities like double-spending cryptocurrencies by incentivizing honest actors.
The consensus mechanism applies rules and incentives that allow the network to agree on changes to the blockchain ledger and create new blocks.
How Do Consensus Algorithms Work?
Suppose Mark is a bad actor who has a balance of 10 crypto tokens. Mark wants to “double-spend” his crypto by sending 10 tokens to Sue and then transferring the same 10 tokens to Jack.
To successfully cheat Sue and Jack, Mark would need all the nodes on the blockchain to agree with his false history of transactions.
However, as a public blockchain is decentralized and open, the system counts on good and incentivized actors to reject false transactions. So long as the good actors outnumber the bad ones, Mark will not be able to double-spend his coins as there won’t be general agreement on the bogus transactions.
Terminology check: Blockchain Validator
A network validator is a special ‘full’ node (computer) that records the entire state of the blockchain network, capturing the details of each transaction. Validating nodes and maintaining consensus amongst them are their main functions. There are a other types of node in the blockchain network, but the full node is first amongst equals.
Types of Consensus Algorithm
There are different types of consensus algorithm used in blockchain networks. These are the most popular:
Proof-of-work (PoW)
Proof-of-stake (PoS)
Delegated proof-of-stake (dPoS)
Proof-of-authority (PoA)
Hybrid PoW/PoS consensus
Proof-of-burn (PoB)
Delayed proof-of-work (dPoW)
Proof-of-Work (PoW)
Proof-of-work is the most well-known consensus algorithm. It is the consensus algorithm used in the first public cryptocurrency-based blockchain: Bitcoin.
In the PoW consensus mechanism, network participants called “miners” expend computational power and electricity to validate transactions and add new blocks to the blockchain ledger. In return, miners are rewarded with new tokens (BTC in the case of Bitcoin) for their honest work.
A PoW blockchain remains secure as long as 51% of the computational power of the network is held by honest nodes. As honest miners control the majority of the computational power, the honest chain (honest version of the blockchain) will outpace any competing chains.
To make changes to a past block, an attacker will have to expend computational power and electricity to modify that particular block and all the blocks after it and then surpass the work of the honest chain. For an attacker expending such a large amount of computing power and electricity may outweigh the economic gains made in the attack.
Mature PoW blockchains like Bitcoin have sufficient hashing power to make it incredibly expensive to attempt a 51% attack.
However, the same cannot be said for smaller PoW blockchains with less hashing power securing the network.
Proof-Of-Stake (PoS)
Proof-of-stake consensus mechanism came into the limelight with Ethereum’s transition from PoW to PoS in 2022.
Here PoW miners are replaced by PoS stakers. Unlike miners, stakers do not need to expend energy to validate transactions. Instead, participants have to stake capital (in the form of cryptocurrencies) as collateral to become validators.
Validators are selected at random to create new blocks. After a new block is created, the validator is rewarded with new crypto tokens.
The collateral and block rewards ensure that validators remain honest and fulfill their duties of validating transactions, creating new blocks, and keeping the network running.
A validator risks the destruction of their staked collateral in case they behave maliciously. While the failure to participate in network activity when called upon will result in validators missing out on block rewards.
At time of writing, you had to stake a minimum of 32 ETH in order to become an Ethereum validator.
Key Differences Between PoW and PoS
Proof-of-work (PoW) | Proof-of-stake (PoS) |
Miners expend computational power and electricity to validate transactions and create new blocks | Validators stake cryptos as collateral to validate transactions and create new blocks |
Tried and tested consensus mechanism | Younger and less battle-tested compared to PoW |
Requires extensive amount of electricity, therefore not considered environmental-friendly | Consumes significantly less energy compared to PoW |
Miners invest in expensive hardware | Validators can run PoS software from laptops |
Miners compete to solve cryptographic puzzles to gain the chance to create a block | A validator is selected at random to create the latest block |
No slashing | Dishonest validators risk losing their staked collateral in an event called slashing |
Delegated Proof-Of-Stake (dPoS)
Delegated proof-of-stake is a variation of the PoS consensus mechanism. Here network users vote and elect delegates to validate blocks.
dPoS is a reputation-based consensus mechanism model. Delegates are elected based on their reputation of reliability. dPoS networks have less number of validators compared to PoS blockchains, which allows the network to reach faster consensus.
However, dPoS systems can be vulnerable to 51% attacks as there is less number of validators in the network. There is also the risk of centralization of power as validators are few in number, and voting is reputation biased.
Proof-of-authority is a consensus mechanism where only authorities entities are allowed to become block validators.
Here potential validators undergo a vetting process where they are selected based on their trustworthiness, moral standards, criminal records, investable capital, reliability, and reputation. PoA is considered a highly efficient consensus mechanism as the network depends on a small number of top validators.
Like DPoS, the PoA consensus mechanism is also vulnerable to centralization and 51% attacks.
Hybrid PoW/PoS Consensus
As the name suggests, hybrid PoW/PoS consensus is a mixture of proof-of-work and proof-of-stake consensus algorithms. This approach brings together PoW security and PoS governance.
An example of a blockchain that uses a hybrid PoW/PoS consensus is Decred. PoW miners on Decred play a similar role as they do on the Bitcoin blockchain i.e. verification of transactions and creating of new blocks.
PoS on Decred is designed for governance. DCR token holders can stake their coins to obtain voting tickets. Ticket holders are selected at random to approve PoW miners and vote on change proposals.
Proof-Of-Burn (PoB)
Before we start, we need to know what ‘burning’ means. Burning is the process of permanently removing coins from circulation by sending them to an unretrievable address.
Proof-of-burn is a consensus mechanism that requires miners to burn coins. The burning of coins is the cost required to take part in mining activity i.e. verifying transactions, creating new blocks, and receiving block rewards.
According to Iain Stewart, the creator of PoB consensus, the more coins a miner burns, the higher their mining capacity.
As PoB miners burn coins instead of spending electricity as PoW miners do, PoB is significantly less energy intensive compared to PoW.
Delayed Proof-Of-Work (dPoW)
Delayed proof-of-work is a consensus mechanism where a blockchain leverages the security of a secondary PoW network (e.g. Bitcoin). This consensus mechanism was pioneered by the Komodo Foundation.
According to Komodo, dPoW networks use the secondary PoW blockchain to store backups of its blockchain history. A single copy of the original dPoW chain will allow the entire network to rejuvenate in case there is an attack on the dPoW chain.
Through the dPoW consensus mechanism, blockchains will low hash rates can rely on mature PoW networks like Bitcoin for security.
The Bottom Line
Consensus algorithms are the backbone of blockchain technology. Each has advantages and limitations. While some advance security and decentralization, others prioritize speed and efficiency.
