Well, the term consensus means general agreement. What if I say we all are part of some consensus mechanism in our daily life? Some of you might be confused that what am I saying but by the end of this article y'all will relate to and understand it.
So In a centralized system, all the decisions are taken by a centralized authority. But when we talk about blockchain the first word that comes to our mind is a decentralized system which means there is no central authority to control the network.
All the nodes should agree on a consensus to ensure all the transactions happening on the network are genuine.
Let's understand with an example, let's say there is a group of 4 people who decides to have a burger. So here there is no disagreement between them, which means consensus is achieved. But what if 2 of them back out, in this case, all 4 need to what to eat. In the worst-case scenario, it splits into 2 groups.
So Consensus Mechanisms are nothing but a set of rules that a decentralized network follow to stay in the agreement. Consensus mechanisms are changeable and one of the best examples of that is Ethereum which changed the mechanism from POW to POS.
What are POW (Proof Of Work) and POS(Proof Of Stake)?
POW and POW are consensus mechanisms that are widely used and known. Proof of work was the very first consensus mechanism. Bitcoin uses proof of work. Ethereum uses Proof of stake. We are gonna discuss both of them in the article.
Proof Of Work
Let's say you starting a business and you have 5 candidates from which you can only hire one person. So you give them a mathematical equation that is tough and will require a huge amount of time to solve. So the one who solves it that candidate will be hired. This is what Proof of Work is where the candidate has given the "proof of work" to get selected.
Proof of work is a consensus mechanism used in the blockchain to come to a consensus, to come to agree. The node needs to solve the mathematical puzzle for making the transactions or adding a block. To solve this puzzle, Node requires a huge amount of computational power. And the winner gets cryptocurrencies as a reward.
The network is secured because the only way to hack this network is to have 51% of the computational power which is impossible and a huge investment that will result in not much gain compared to the value invested.
Proof Of Stake
Why does proof of stake exists when we already have a consensus mechanism (POW)? The reason is POW requires a lot of computational energy to validate a block of transactions.
According to research conducted by the University of Cambridge, the annual electricity consumption by Bitcoin (which uses POW) accounts for an estimated 0.6% of global energy usage.
And There comes POS in which computational power plays very less role in validating the block. Let's See how
Let's say there's an auction for a house on sale where the one who pays the most will get the deal. But here comes the condition i.e. Every participant who is interested to participate in the auction has to stake an amount of money.
So the mechanism is similar to the above example. The one who stakes the most has a high chance of being selected to validate the block. And the blocks who are interested in becoming validator has to stake a specific amount of coins. In Ethereum, The amount is 32 Eth.
Apart from POS and POW, there are a lot of mechanisms that are used by different organizations according to their requirement.
I hope y'all have got the basic idea about consensus mechanisms. Do Like and share if you find it helpful.