A Beginner’s Guide To Consensus Algorithms

Dr Vin Menon
7 min readMar 23, 2020

One of the key traits of blockchain technology is its decentralized nature. This means that there is no centraalised entity which overlooks the working of blockchain. Instead, there is a distributed ledger which works on a peer to peer operation architecture. Since there is no authority figure governing the working of the blockchain, you may wonder — how exactly does this paradigm changing tech operate? The answer to this question lies in the presence of consensus algorithms. Consensus algorithms are a crucial element of blockchain technology, which govern the protocols through which a block is added in a chain without any malicious incision.

Since most users in a blockchain are unknown to each other, there can naturally be some level of uncertainty and distrust among the members. This can impede the working of the transactions made via these decentralized ledgers. Consensus algorithms are designed to ensure that blocks and transactions occur seamlessly without having to rely on trust. Let’s now take a look at some of the most prominent models of consensus algorithms the blockchains of today use:

PoW (Proof of Work)

The Proof of Work consensus algorithm was introduced by Satoshi Nakamoto in 2009 through Bitcoin. PoW is the primest solution to counter the problem of distrust as discussed earlier.

In a PoW system, whenever a transaction is initiated by a user, it needs to be verified. For this verification process, there are specialised nodes called miners which help in fulfilling it. Miners solve a complex computational problem associated with the block to validate its authenticity. This process is known as mining and for this, the miners are credited with a small reward.

There are thousands of miners competing to solve the computational problem at one time. Whoever solves the puzzle first, wins the reward. How do we decide if a puzzle has been solved correctly? The other miners verify the solution once it has been shared on the blockchain.

As a consequence, the miners compete, and rely on specialised software and high quality hardware to solve these problems. All this processing and computation costs energy and money — and has led to an overall increase in energy consumption globally.

As more and more blockchain platforms were created and developed, each platform experienced the threat of 51% attack. A 51% attack is the scenario in which a majority of the miners can come together and change the decentralized nature of working to a centralized one. Since other miners are supposed to verify the correct solutions whenever they are shared, with a majority in their hands, these groups can jeopardize every transaction, however fake, and con users of their assets.

Understanding these drawbacks in the functioning of PoW, Ethereum is also working to shift their base from PoW to PoS, which we will discuss next. In my view this is a progressive step for Ethereum and will provide it an edge against different cryptocurrencies.

PoS (Proof of Stake)

Proof of stake is based on an incentive consensus algorithm which deals with the setbacks of PoW. This consensus algorithm randomly chooses the winner on the basis of an amount they have staked. Let’s dive deeper to understand the previous statement.

The PoS model requires a user to deposit a certain amount of their coins to participate in the consensus building process. The user becomes a validator and has a right to forge the block based on the share of the assets they hold for that cryptocurrency. The validators are then paid a validating fee, proportional to their assets in the whole of the validation process.

A PoS consensus algorithm effectively deals with a scenario where a Validator turns malicious. In this case, that validator loses its entire stake. Plus, to take over a Proof of Stake network, you would effectively need 51% of all the coins in circulation — which would be practically impossible for most cryptocurrrencies.

This consensus algorithm has some drawbacks to its name as well. It has been proven that coin hoarders get benefitted in a PoS system since the users are paid rewards in proportional to their assets. In this way the richer becomes richer while the smaller asset owners do not experience this much growth. This is one of the drawbacks PoS may want to address on a war footing.

DPoS (Delegated Proof of Stake)

Whenever consensus algorithms are discussed, DPoS is unanimously hailed as a ‘democratic’ consensus algorithm. The reason lies in its egalitarian working.

In DPoS, the initial working is similar to the PoS. The users stake some coins to join the process. Based on the amount of coins they have, the users vote to elect ‘witnesses’ out of their own, who validate the transactions. The witnesses are paid a small fee for their services. Users also vote for a group of ‘delegates’. These delegates oversee the governance of the complete DPoS system, without actively participating in it. The whole procedure of voting is based on trust and witnesses and delegates are universally accountable for their actions.

One of the major aspects which makes DPoS an effective consensus algorithm is that nothing is permanent here. The voting is a continuous process and each witness is at a risk of being replaced by another user. Also users can vote to remove a witness who has lost their trust. So witnesses can’t do any malicious activity because if they do so then not only they malign their name, but also lose their income as a witness.

Coming to the comparison part, then DPoS is faster as compared to PoW and PoS and is an energy efficient alternative to PoW. As of yet ‘Lisk’ is one of the popular ones which have employed a DPoS system. I believe more blockchain platforms and cryptocurrencies should design themselves around this consensus algorithm due to immense potential it holds.

PoB (Proof of Burn)

As discussed earlier, PoW leads to excessive energy consumption. To counter this, developers designed what we call the Proof of Burn consensus algorithm. Here, the miners, instead of burning energy resources in the real world, burn their own cryptocurrency in order to acquire the right for writing blocks in proportion to the coins burnt.

Miners are required to send their cryptocurrency to a verifiable address from where they can not access the coins. In this way the miners show their commitment towards the platform and thus earn a right to mine. One key aspect that needs to be looked upon is that the more coins you burn, the greater are your chances to become the next block validator.

The Proof of Burn consensus algorithm does a commendable task saving energy resources when compared to PoW. But I see this as another of those consensus algorithms which primarily aid the rich users. Since they have a greater number of coins to burn, the chances of a user with lesser assets to become a validator is negligible. Therefore, a strong need to equalise the opportunities arises once this consensus is incorporated.

PoA (Proof of Activity)

Proof of Activity is a hybrid consensus algorithm formed by combining Proof of Work and Proof of Stake. As its developers say — “Proof of Activity houses the best of both the worlds.” In recent times, Decred has been actively using PoA in its working. Here, the mining process begins the way it does in PoW, with a cut throat competition among miners burning energy resources.

When the block gets mined it only contains a header and the miner’s reward address. The process now switches to PoS. Based on the details offered by the header, a group of users are selected, depending on their assets, to validate the block. The mining rewards are then divided among various validators who played their respective roles.

PoA, along with bringing together the best of PoW and PoS, also combines their drawbacks. Energy sources still get burned as in PoW and users with more assets get advantage over their peers as in PoS. Although PoA effectively combats the threat of 51% attack, it still has a long way to go when compared to other consensus algorithms.

PoI (Proof of Importance)

Proof of Importance was introduced to the blockchain platform by NEM in 2015. This consensus algorithm determines which node is eligible to add a block to the blockchain. Developers back at NEM named this process ‘harvesting’. PoI consensus algorithm rewards the nodes for harvesting the block with a transaction fee.

The PoI model as designed by NEM requires an account to hold at least 10,000 XEM to become eligible for harvesting. One of the main setbacks under PoS is that it rewards coin hoarders. PoI aims to eliminate these drawbacks by taking in consideration the size of a miner’s kitty for a particular time period only. It also rewards important credits to those accounts who make transactions with other NEM accounts.

Parting Thoughts

While there are many other consensus algorithms out there, in this post we’ve looked at some of the fairly major ones. Regardless of their differences, it is undeniaable that they have truly shaped the blockchain to be the revolutionary technology it is today. These consensus models have their own share of pros and cons, but what makes this discussion so fascinating is that, since 2009, when PoW got introduced by Satoshi Nakamoto, these algorithms too have undergone an incredible journey.

Not many guessed that to check the rampant consumption of energy, we could have burned the very same entity for which the energy was burned in the first place. But the team back at Slimcoin showed that this alternative is feasible with the PoB model. Now, as PoS rises in popularity across major cryptocurrencies (I’m fairly bullish on PoS for 2020), we can expect ground-breaking breakthroughs like these in future as well.

--

--

Dr Vin Menon

A blockchain enthusiast and entrepreneur’s musings on the next big revolution since the Internet.