All you need to know about Consensus Mechanism.
Tags: web3, blockchain, bitcoin
Published: 2022-07-19 04:31:00

**What is Consensus Mechanism and its Types?**

Imagine you run a store that is currently faced with issues of theft and insecurity. As a profit-making organization you know this is bad for business and should be sorted. You call up a meeting for ways to fix these issues, each worker comes up with a possible solution to this problem and eventually, a solution pops up. This solution solves the issues of theft— which could be proper record keeping— and of security— which could be using better padlocks and iron gates.
This illustration explains the concept of the Consensus Mechanism which is an agreed solution on every decentralized blockchain network, on ways to secure the blockchain, verify and record valid transactions, and create new blocks when the old blocks are filled up— ensuring proper functionality of a blockchain.

**Types of Consensus Mechanism.**

**Proof of Work**
This is the original form of Consensus Mechanism, first used by Bitcoin to regulate the functionality of its blockchain. Here, miners(computers) from all over the world compete to solve complex math problems created by the blockchain's algorithm, the first miner to randomly solve the problem and show proof, gets to validate and record the latest transaction, create a new block and earn a certain amount of crypto as a reward. But is this even secure? Yes! Proof of Work requires tons of computers working at the same time to solve the puzzle, making it impossible for anyone to alter transactions.
On the downside the disadvantages are, it consumes so much electrical energy; it is said to consume as much electricity as New Zealand, It also requires much computing power which wouldn't benefit individuals as much as it would groups.

**Proof of Stake.**
This is a user-friendly alternative to proof of work, This method involves Staking, which means putting down your crypto assets to be locked up in a particular blockchain over a period of time, which is in turn used to verify transactions.
Once a block of transaction is ready to be processed, a validator would be chosen at random—the chances of being selected depends highly on the number of assets you put in. This validator cross-checks the transaction to see the validity and approves if valid, thereby earning a reward. If a transaction is falsified, the validator loses all assets staked in the blockchain. This is the insurance policy the proof of stake runs on ensuring it's security.
Also, other miners get a little percentage of the reward once a transaction is validated.
Cardano blockchain uses the proof of stake.
 
**Delegated Proof of Stake.**
This is a slightly different version of proof of stake. In Delegated Proof of Stake, after staking your coins, you can vote for a validator who would run the transactions on your behalf. Once a validator with higher votes is chosen and the transactions are marked as valid, a new block is created, transactions are recorded, and the validator and those who voted gets rewarded with coins.

**Proof of Space**
This requires available space on your PC to store large documents or files for a required period. After the time is elapsed, checks would be carried out to ensure the file is still there, and once confirmed, you'd be rewarded with a certain amount of coins. This is used mostly by the Chia and filecoin block chain.
A very effective way of earning money but it has a disadvantage as dangerous files can cause malware and harm your systems.

**Proof of authority.**
Here, the rule of anonymity is violated as one's identity is revealed and their reputation is put on the line to validate and record transactions and create new blocks. In one way, this makes the blockchain secure knowing the person you're dealing with, but in another way, a revealed identity could cause manipulation and corruption.

**Proof of weight.**
This is mainly adopted by the Algorand blockchain. Here, eligibility is decided by how much token one has in a wallet, amount of transactions, and staking amount. With these, miners are selected to solve blocks, sign and record transactions, and create new blocks.
It is often said that this is a more general form as other mechanisms take their bearing from here. Eg. Proof of stake uses the method of staking.


**Proof of elapsed time.**
Funny concept but very effective. Miners' systems are randomly given a sleeping duration and put to sleep. When the time elapses, the system with the shortest sleeping duration immediately solves the hash and earns the reward. This method gives miners a fair chance of winning.

**Proof of activity.**
This greedy method applies both the proof of work mechanism in mining and the proof of stake mechanism in confirming transactions and sharing profits.
Miners compete to solve a particular problem which in this case is letters and headers, once solved, validators are randomly selected by the numbers of tokens staked and are allowed to validate the transaction, and rewards are shared among all miners.
           
 
There are many more Consensus Mechanism available and many more to come, the ones mentioned above are the most common ones associated with popular blockchains. With advancements in technology, more mechanisms would be created that would take into account higher level of security, faster transaction processing time, and reliable validators to validate and record transactions.
Thank you!