Proof of work vs Proof of stake
Proof of work and proof of stake consensus mechanisms are the two major systems used by blockchains to verify new transactions, add the transactions to the network and create new tokens to reward miners and validators.
A consensus mechanism is any system that allows the nodes or computers in a network to validate transactions.
Blockchains are trustless and transparent, which means that at all times, anybody can take a look at a blockchain explorer to see the transactions that have been recorded. For the transaction to go through, most nodes or computers on the network all need to agree that a transaction is either valid or not. These decisions are made based on the consensus mechanism of any particular blockchain.
Proof of Work (PoW)
The idea of the proof of work (PoW) consensus mechanism was first conceived in 1993 as a measure of combating spam emails, the name was coined in 1997. The concept itself was largely unused until 2009 when Satoshi Nakamoto created Bitcoin.
He discovered that the mechanism could be used by nodes to secure the blockchain network.
How Proof-of-Work consensus mechanism works
The proof-of-work mechanism works by having all the nodes compete to solve a cryptographic puzzle, and the first miner to get the solution by making the correct guess of a random number gets the reward. The Bitcoin blockchain is a proof-of-work system. Ethereum was originally built as a proof-of-work blockchain but has been transitioned to a Proof of stake blockchain since September 2022.
In the proof of work system, the winner takes it all. Therefore, to increase their likelihood of solving the problem and getting a reward, miners began to combine their computing powers by building large mining farms. As a result of this, the mining farms began to consume large amounts of electricity. In fact, it was estimated that Bitcoin and Ethereum (before the merge) consumed over 300 terawatt hours of electricity per year - more electricity than Italy, Saudi Arabia and Mexico combined.
The proof of work mechanism only rewards the people with the most sophisticated mining equipment. A computer with a higher hashing or computing power will solve the puzzle faster, and the higher your hash rate, the higher your chances of creating the next block and receiving the rewards. The rewards are usually the newly minted cryptocurrencies and the fees associated with the transactions of the validated block.
To prevent the same supercomputer from solving the puzzle at all times the bitcoin blockchain adjusts its network difficulty based on how much computing power is connected to it.
These huge incentives gotten from mining have inspired individual miners to pool together, their hashing power, and when they receive the reward, it is shared with everyone in the pool. Therefore, this consensus mechanism has resulted in 2 major problems;
- The massive amounts of energy being used up
- The risk of centralization by mining pools
These problems called for an alternative consensus algorithm.
Proof of Stake (PoS)
In 2011, the proof-of-stake consensus mechanism was proposed by a user called QuantumMechanic in a Bitcoin Talk forum. He argued that running competitive mining for rewards was wasteful. He proposed a new system where only one node is selected at random to validate a block.
To become a validator, a node has to deposit a certain amount of coins into the network. This is called staking, and it works like a security deposit. Validators are usually selected based on the amount staked; therefore, the larger the amount, the higher the chances of being selected.
When selected, a node validates all the transactions within a given block, signs off the transactions, and adds them to the blockchain. Finally, they receive a reward from the fees associated with each transaction on that block.
How to maintain transparency in a blockchain network
Recall that before a node is selected to become a validator, they need to stake some coins. If they approve any fraudulent transactions or fail to show up, they stand to lose a part of their stake. And because the amount of money staked is often higher than the reward, they could possibly lose more money than they earn.
Whenever a node ceases to work as a validator, its stake and rewards are released after a certain time.
With proof-of-stake, nodes that are interested in becoming validators but cannot afford the staking amount or do not want to run their computers around the clock can contribute or lend their cryptocurrencies to one node to earn a cut of their rewards. These staking pools are similar to mining pools, but instead of pooling their computing resources, they pool their capital.
Comparing Proof of work and Proof of stake
Proof of work
- Proof of work mining requires special computers to handle the task. These computers are expensive, and for miners to be able to compete, they need to own more than one of these computers or join a larger mining pool.
- When newer models of mining computers are released, the older ones end up in landfills and have become an environmental concern.
- Large mining farms with specialized computers create a risk of centralization; for example, a few large mining farms currently control a significant portion of all the computing power on the Bitcoin and Ethereum blockchains.
- Making decisions and implementing new updates are slower on proof-of-work networks.
- Proof of work networks are slower because most of the computing power is spent on solving the puzzles instead of processing the transactions.
- The sizes of the blocks in the POW networks are smaller and slower than in POS. This small size makes it easier for someone to run a new node with the full transaction history of the blockchain.
Proof of Stake
- Technically, anybody can join a proof of stake network to process transactions and earn rewards.
- They have a higher threshold for the minimum amount of stake required to join as an independent node.
- Most proofs of stake cryptocurrencies are inflationary.
- Making new decisions and implementing updates on the network is faster with proof of stake. This is because staking makes it easy to create an on-chain governance system that allows nodes to vote on how cryptocurrencies can be changed.