Consensus Algorithm in Blockcahin

3 Min Read
693 words


We all have heard about the term Blockchain, it's a decentralized network that provides transparency and security at the same time. There is no single authority like the 🏦 bank that governs it, here every transaction is verified by the Consensus Algorithm. Consensus algorithm works in a way where all the peers (nodes/entities) come to a common agreement about the ledger 📒. This way the algorithm builds up trust within the Blockchain amongst all the peers present in it.

One of the main tasks of the algorithm is to make sure that every new block which is being added to the Blockchain is one of its kind, this is possible when all the peers of the chain participate and crosscheck if there exists another block with the same characteristics. If the result from all the peers is unanimous then a new block is added.

Various types of consensus algorithms:
1)Proof of work
2)Proof of stake
3)Proof of Burn
4)Proof of Capacity
5)Proof of Elapsed Time
There is even more variety of consensus algorithms like proof of activity, weight, leased stake etc. but the above 5 mentioned are the top five popular ones.

Lets being understanding each of these in the same order :


1) Proof of Work "PoW"
For this, you need to first understand what crypto mining is, it's basically where miners are paid some tokes as rewards for verifying transactions. To understand this concept fully you can check out my blog on Bitcoin mining. Coming back to "PoW", this algorithm is used to determine the miner for the next Blockchain. The main objective here is to solve /guess a 16 digit hash code, the node or entity that guesses the code first gets the reward.

2)Proof Of Stake "PoS"
This is the second most popular algorithm after proof of work, here investors lock their funds in the form of a stake, then bets are placed on whether a certain block would be added or not and if the bet is won the rewards is proportional to the number of tokens staked. This method doesn't need any sort of expensive software. Ethereum runs on "PoS", in the end, a validator is chosen to generate a new block and the same process is repeated.


3)Proof of Burn "PoB"
In this process the tokens are sent to an irretrievable address, this again doesn't require any sort of expensive hardware. After the tokens are sent to a. irretrievable address miners are given priority to mine in the random selection process. Depending on how many coins are burnt the more priority is given to the miner is given for generating a new block.
Here investors let go of short term gains(by burning) and gain more over the long term. It is a good alternative in comparison to proof of work but in my perspective, there's a lot of tokens that are being wasted which doesn't make it an optimal solution.


4)Proof of capacity "PoC"
This is a very unique one, here we have to provide our hard drive space. The more the hard drive space is shared the more the chance of you to be selected as the next miner. This is a more optimal solution than staking funds or burning funds, then again hard drive space is limited and it has its limits with our current technology. Things would probably change if we could utilise cloud storage.

5)Proof of Elapsed Time "PoET"
This is an algorithm that kind of works on the "equality" principle. In this network, every miner gets a Fair Chance to generate a new block. This is done where all of the validators wait for a random amount of time, this way it keeps adding the proof of wait within the network. Here is winner 🏆 is determined by who has the least timer value. There are various other conditions to provide a chance to every validator and not let one node win every time.

Hope you understood what a consensus algorithm is and how different types of consensus algorithms function.

Let me know your thoughts about the consensus algorithm in the comments!