Proof of Work vs Proof of Stake

Proof of Work vs Proof of Stake

Blockchain is at the center of the Web 3 Ecosystem. Today we are using it in an increasing number of domains. Blockchain provides decentralization and security that Web 2 applications and interfaces fail to do (Proof of Work vs Proof of Stake).

dApps or decentralized applications aim to empower the user by giving them control and the right to the digital assets they own and how they can use them over the web.

Cryptocurrencies are the first technology that uses blockchain technology. Most Cryptocurrencies like Bitcoin use a mechanism we call Proof of Work to generate Bitcoin. It adds new blocks to the respective blockchain simultaneously.

Recently, some major blockchains like Ethereum have made changes by shifting to the Proof of Stake mechanism. This article will discuss both the mechanisms, explain them, their benefits and demerits, and the reason for this shift to proof of stake across different blockchains.

Blockchain

If you are a newbie to Web 3 and Blockchain, then it is important to understand what Blockchain is before moving ahead.

Blockchain at its core is just a distributed ledger. A Block contains data, the numbering of the Block in the chain, the hash of the previous block as a link, and its own hash number. You can think of Hash as a Digital Fingerprint of some digital data. We can generate a Hash number for any data. Every block has a unique hash. This unique hash is what we call Proof of Work.

Blocks in a Blockchain

As you can see, all the data on the chain is stored in groups in these blocks. These blocks are then linked to each other by the Hash of the previous Block. If someone attempts to alter a block in the chain, then they’ll need to mine all the blocks after the respective block that is subject to change. This is because the hash of the rest of the blocks does not change.

Altering a Block in Blockchain

Even if someone changes a block and re-mines it, every node in the blockchain network will know because everyone is keeping a copy of the same ledger. Also, the validity of the chain depends upon the consensus mechanism. This means choosing the relevant longest chain that the majority of nodes agree on.

Blockchain is a P2P (peer-to-peer) network, and it timestamps all the transactions by hashing them into an ongoing chain of proof of work. This forms a long database that is managed by all stakeholders, and no one can change it without doing the proof of work again for all the blocks after the altered one.

Now that we know what Blockchain is and how it stores data, let’s understand Proof of Work.

Proof of Work

The proof of work (POW) mechanism or algorithm first came into light in 1993. It was then introduced to combat spam e-mails. It was then, in the year 1997, it gets recognized as POW.

The algorithm was not widely useful until Satoshi Nakamoto saw an opportunity. He used it to create a cryptocurrency that provides decentralization. It uses a consensus mechanism between participating nodes to verify and timestamp transactions. This currency is what we call Bitcoin today.

Proof of work at its core is a way that secures the Blockchain. All the nodes have to solve a cryptographic puzzle. The people who work to solve this puzzle are known as Miners. The person who solves the puzzle first is able to get a reward for the same.

Limitations of Proof of Work

Most blockchains like Bitcoin share a similar problem today. It is that they use a lot of computing power to mine blocks. This is expensive because people are using enormous amounts of electricity, data, and hardware resources to mine blocks and collect the respective crypto assets as their reward.

The reward for mining is so lucrative that people are pooling their resources to collectively build mining firms. The role of these firms is to solve as many puzzles as they can and share the reward accordingly.

According to a few reports, Bitcoin miners alone are using enough electricity to power millions of households and even a few small countries. The creation of large firms has also led to monopoly to some extent because the presence of better equipment means more chances of solving the puzzle fast and getting that block mining reward.

Individual Miners also come together to extend their hashing power. These groups of miners are known as Mining Pools. The reward they earn is then distributed evenly among all the members.

Proof Of Stake

The Proof of Work algorithm has many limitations, as mentioned above. To solve this problem there is a requirement for a better alternative that is as robust and secure but is less expensive for miners and more efficient for the environment. If these two conditions are met, we can have a level playing field for all nodes and decrease the monopoly of Firms.

In 2011, a Bitcointalk forum user identifying himself as “QuantumMechanic” proposed a new mechanism to replace Proof of Work. He called it the Proof of Stake. His work asserts that letting everyone and anyone compete against each other to mine a block is just a waste of time, and resources, making it inefficient.

This new mechanism proposes a system in which the node that will solve the puzzle to mine a new block or validate it will be chosen through a random election process. In proof of stake, we call the people working as Validators instead of Miners. So basically people are not mining blocks, they are rather forging or minting new blocks in the chain.

Choosing Validators

People can not become validators and get chosen for the job just randomly. Instead, each willing node has to deposit a certain amount of the chain’s native currency (ETH in the Ethereum network) or coins into the network. This deposit is given as a stake. This is like a refundable security deposit.

The chance of a node getting chosen is directly proportional to the amount of the deposits or the size of its stake. Suppose there are two validators, Harry and Ron. Harry has given 10 Rupees as Stake and Ron has given 100 Rupees as Stake. This means that Ron will have 20 times more chances of solving puzzles for the next block.

Benefits of Proof of Stake

You may think that in this mechanism, only the rich will benefit as they’ll be able to deposit giant chunks into the network, but that is not true. Actually, proof of stake is fairer than proof of work.

With Proof of Work, rich people can enjoy the power of economies of scale. The price they pay for mining equipment like hardware etc and electricity does not go up linearly. It is similar to buying anything in large quantities in the market. The more we buy, the better price we get. Buying in bulk significantly reduces the cost of acquiring something.

The node that is chosen as a validator for the respective block has to verify all the transactions present inside that Block. After he successfully completes his task, he signs the block, and it adds to the blockchain. The validator (Proof of Work vs Proof of Stake) then receives the amount for all the transactions inside that block.

One of the interesting ways proof of stake is how it tackles fraudulent transactions. So if a validator in charge of a block verifies a foul transaction, then he loses a certain part of his stake accordingly. Just like the validator selection process, the trust we can have in the chosen node depends on his stake. Until the transaction fee the validator is getting is less than his stake, he is less likely to do any malpractice.

If nodes stop working as a validators, then both their transaction fees and deposit as the stake are released after some time. The interim time to release the funds is to cross-verify all the transactions to avoid any fraudulent activity and cut a part of the stake if something along the line is found.

Limitations of Proof of Stake

Proof of Stake provides many advantages over Proof of work, but it is not perfect itself. There are flaws in the algorithm that one can exploit to take control of the network.

The 51% Attack

If someone buys a majority of a stake in the network, then one can essentially control the events that take place in the blockchain. That node with the majority share will be then able to approve fraudulent transactions.

The 51% Attack

This act is called the 51% attack. It is a limitation and weakness of proof of work too. It states that if a miner or group of miners can obtain 51% or more of the hashing power, then they will be able to manipulate the blockchain.

Although the 51% attack is tough to take place in proof of stake because 51% in terms of the stake will mean nearly half of the value of the currency in the market, the amount one will have to pay for such a stake is very high and thus overwhelming.

Right Validators

Selecting a Validator depends on the size of the stake in the network. Although this mechanism offers more decentralization and more security, we can not rule out that it will benefit the rich.

This is because it will lead to a cycle of rich people getting chosen as validators quite frequently, and thus the gap or the disparity between nodes will further widen.

Another problem can be that after the network chooses a validator, he may fail to complete his task due to absence or inefficiency. In such a scenario, the network can have backup validators to take the task and complete it accordingly. Punishing validators (Proof of Work vs Proof of Stake) for failing to live up to their end of the bargain and validate their respective blocks can help significantly to solve this problem.

Proof of Work vs Proof of Stake

Proof of Work (POW)Proof of Stake (POS)
Everyone can mine Blocks in the Proof of Work mechanism.Only a few of the selected nodes can Validate Blocks.
It uses an enormous amount of energy and other equipment.It uses relatively less amount of energy because not all the nodes are working.
Proof of Work has mining Pools that have can control the majority of a Blockchain due to large computing power. This reduces decentralization.Proof of Stake is more decentralized because has no mining pools and thus provides a more level playing field to nodes that stake their coins into the network.
The cost of setting up a node for proof of work-based blockchain is significantly high. Thus, a lot of people find it hard to set up their nodes.The cost of setting up a node for a proof of stake-based blockchain is much less than the proof of work one. This is because you don’t need expensive mining equipment. Thus more people can create nodes.

Proof of Work vs Proof of Stake

Conclusion

Proof of Work vs Proof of Stake are mechanisms to pool transactions/data together in groups when they reach a certain number. These groups are blocks that are linked together in a Blockchain.

Proof of Work is less efficient and provides less decentralization and thus proof of stake is a new way to do the same task. But the proof of stake is not perfect and has its own limitations which we need to comprehend, mitigate, and find solutions accordingly.