Blockchain technology has been the talk of the town due to its potential to disrupt industries on a global level.
But for the blockchain to bring about this mass-level disruption, it needs to have a reliable, robust, efficient, and secure consensus mechanism.
Consensus means reaching an agreement about something within a group of people.
Consensus protocols are one of the very crucial aspects of blockchain technology. Blockchain consensus algorithms are a way to create fairness and equality in the Blockchain network.
The purpose of a consensus mechanism is to validate and verify that the data is appended to the Blockchain is valid.
There are various mechanisms for consensus that are used currently.
Each of them serves the same purpose of validating the data being added to the Blockchain, though, each of them does it differently. And quite naturally each one of them has its own pros and cons. The major difference between these mechanisms is in the way they reward and delegate the verification of transactions.
The two most notable Consensus mechanisms are – Proof of Work or POW, and Proof of Stake or POS which we will be covering.
Proof of Work is one of the older consensus mechanisms that came into existence in the 1990s.
Proof of work has been a tested consensus mechanism and has been used by various crypto projects like Bitcoin and Ethereum. Proof of Work uses the computational power of the computers on the network to solve complex mathematical problems and create new virtual coins. As a miner, a user is required to solve a complex mathematical problem to get rewarded by a new virtual coin, for example, bitcoins in the Bitcoin network. So let us understand how proof of work and mining works in the context of Bitcoin.
Transactions in the Bitcoin blockchain are bundled in a memory pool known as Memolo. Each transaction in the mempool needs to be verified.
This verification is done by the miners and this process of verification of the transactions is known as Mining. For verifying the transactions the miners are required to solve a complex mathematical puzzle. The puzzles are asymmetric in nature i.e., it is difficult to solve the puzzle but it is very easy to verify the correct solution by the network.
The puzzles don’t require any skill set of the user.
The whole puzzle solving requires brute force. In this puzzle-solving, the odds of solving the puzzle can be improved by acquiring more computational power, that is to have computers with powerful processors.
The average time for solving a puzzle is 10 minutes and once a puzzle gets solved the block gets added to the blockchain. Over time miners start finding it easier to solve the puzzle and therefore, the block generation time also gets reduced from the proposed 10 minutes. Hence to increase the difficulty level of the puzzle, and to make it more complex the puzzle is revised after every 14 days.
This in turn means that more computational power is required to solve the puzzle henceforth. The miner who solves the puzzle first is rewarded with newly minted Bitcoins and network transaction fees. The verified transactions form a block and this block is then appended to the existing Blockchain. One of the biggest challenges with the Proof of Work Consensus mechanism is the wastage of both computing power and electricity,
to solve the mathematical puzzles required to mine a block.
Now let’s understand how Proof of Stake works and how it is different from proof of work. Proof of Stake was introduced in the year 2011.
In this consensus mechanism, a block is added to the blockchain by a validator who is selected by a randomized system.
The selection of the block creator is decided by how much of the cryptocurrency a user is having with himself or in some cases also by the time duration for which he has been holding that cryptocurrency. Contrary to the proof of work, where the block creation depends on the computational power, the block creation in Proof of stake is directly proportional to the user’s holding of the cryptocurrency or the underlining token of the network.
In the proof of stake consensus mechanism, blocks are not mined instead, they are forged or minted and users who create these blocks are not known as miners instead, they are known as forgers.
For verifying the transactions and forging the block, forgers need to lock up some of the points at stake. In this situation the coins are held in escrow and in case the users are found to be involved in validating a fraudulent transaction, the stakes get slashed and they also lose their right to choose and as a forger in the future.
The basic assumption behind this mechanism is the fact that because the coins are at stake, they will be highly motivated to validate the right transactions. In the proof of stake mechanism, cryptocurrency units are created initially at the time of launch of the currency, and their numbers are also fixed.
Because the energy consumption in Proof of Stake is negligible as compared to Proof of work, the block creators are not rewarded with the network coins. Instead, they are rewarded with transaction fees for creating new blocks.