One of the most talked about events in the crypto-world is the release of Ethereum 2.0. It is making the move from a Proof-of-work mechanism to a Proof-of-Stake mechanism. These are called Consensus mechanisms and are used to validate a transaction in a blockchain without the need for a third party. Before looking at what these mechanisms are, let me explain what a Consensus mechanism is.
The Consensus mechanism is used in a blockchain to confirm the transactions that occur in it. It does not need a third party and is designed to establish trust between the network participants. It is the final piece of the cryptographic puzzle that must be solved to validate the transactions and add the block to the network to make the cryptocurrency work.
There is no pre-defined mathematical solution to this problem. It instead uses cryptography and an incentive system to maintain a healthy and secure network.
This mechanism exists to avoid the double-spend attacks where a participant in the network spends the same coin multiple times and tries to update it in the network. This can be avoided by identifying the longest chain of blocks in the network. All the other shorter and invalid chains are discarded.
A consensus mechanism backs almost every crypto-asset. Several consensus mechanisms are developed and used, each with their own advantages and disadvantages. The mechanisms differ in how the verification of transactions is rewarded. The ones mentioned here are not the only two consensus mechanisms, and there are other ones like Proof of Authority, Federated Byzantine Agreement, etc.
Proof of work is a mechanism that was conceptualized way before the creation of crypto-assets. The concept was first introduced in 1993 by Cynthia Dwork and Moni Naor. It was only in the year 1999 that Markus Jakobsson coined the term "Proof-of-work".
Proof of Work is the first, and simplest consensus mechanism proposed, but this mechanism is nowhere near perfect even after so many years. This did not stop it from being the most dominant consensus mechanism that most of the cryptocurrencies in circulation use to date. It was first introduced in Bitcoin by Satoshi Nakamoto in the 2008 Bitcoin Whitepaper. (The algorithm was previously used in Adam Back's HashCash)
The process of this mechanism is quite simple. A miner verifies a set of transactions and adds it to the blockchain to get some cryptocurrency in return. A more detailed explanation:
The cryptographic puzzles mentioned above do not rely on a fixed solution. There is no mathematical skill required to solve these. Brute force does the work, which requires large amounts of computational power. These days people set up mining farms, making it almost impossible for individuals to mine and earn cryptocurrency. More on this later.
The mechanism is secure, but it is still vulnerable to a 51% attack. In layman's terms, 51% of the nodes in the network decide to be on the evil team to steal money by taking the blockchain network hostage. They control more than 51% of the computer power that is used for mining in the network. This is unlikely to happen in large-scale cryptocurrencies but smaller alt-coins like Bitcoin Gold have been subject to this attack in the past.
Proof of Stake was created to address the mining process's energy consumption problem in a Proof of Work system. Sunny King and Scott Nadal introduced it in 2012.
This mechanism does not involve miners, and there is no need for high computational power, making it a greener alternative to Proof of Work. The creators replaced the mining process with something called "staking." Instead of mining a block, the responsibility of creating a block is given to a user in a deterministic way, depending upon their stake (the amount of coins the individual owns). The individual with a higher stake has better chances of being chosen as the validator and will receive more staking rewards. This does seem pretty unfair as it allows for a centralization-like situation.
This brings us to another problem, similar to the 51% attack. Rather than contributing to 51% of the network's computational resources, you now have to own at least 51% of the coins in a network. This seems dangerous, but it is highly unlikely for anyone to trust a coin so much.
Unlike in Proof of Work, no new coins are minted. The validators are only paid through transaction fees where the rewards are from coins that were already created.
There are a few other issues with Proof of Stake like initial distribution of coins, monopolization, and the nothing at stake problem. All these issues were addressed in 2013 by the creation of Peercoin. Proof of Work turned heads majorly when Ethereum 2.0 announced that they are moving to a Proof of Stake system.
As already mentioned, Proof of Stake tackled the power consumption problem and adopted a greener mechanism. Due to mining farms setup around the world to mine cryptocurrencies, this practice's energy consumption shot up like crazy.
Study reveals Bitcoin’s electricity consumption is underestimated and finds the network “represents close to half of the current global data centre electricity use”
This is alarming and is definitely not the way to go. It is good to see that the future of cryptocurrency is moving towards PoS which requires only a small fraction of the energy.
Even though PoS is the future, it does have its flaws. In comparison, PoW is more decentralized since the validator being chosen does not depend upon the number of coins owned. Not everyone will want the overhead of becoming a miner.
In the case of PoS, the validators neither have to spend on mining equipment nor have to pay electricity bills. All they need to have is some cryptocurrency, which they keep staking. This leads to centralization as the coins are with the same person instead of a miner who will have to cash in some cryptocurrency to pay the electricity bills.
The PoW mechanism results in better distribution of coins and maintains the decentralized state of the network more fairly.
Proof of Work is a tried and tested mechanism. It has shown its strength with Bitcoin, and the world is witness. Since Proof of Stake is relatively new, it just can't be used without a lot of testing.
The problem with PoS is when a blockchain is forked due to some reason. Validators can validate transactions of both the chains without any consequences. This can be exploited to created multiple forks of the same blockchain. It introduces the problem of double spending where the coin spent in the original chain might not be added to the forked chain. Even though solutions have been proposed to solve this problem, it is not yet convincing from a user's perspective.
PoW is comparatively safer since miners will have to decide to split their mining power to the original and forked chain but are unlikely to do so as the low mining power resulting from the split will not be enough for mining.
Proof of Stake is better as a whole when compared to Proof of Work, but it just cannot be given the crown yet. PoS is a significant step-up when power consumption is taken into consideration, and it is a very important factor to consider given the amount of energy consumption by PoW.
Neither of them is perfect, but with proper testing and fixes, Proof of Stake will reign supreme and will be the norm in the years to come. It is indeed an interesting time we live in.