Proof of Work vs Proof of Stake – A look at consensus algorithms

Ethereum plans to move from a Proof of Work (PoW) consensus to a different algorithm called Proof of Stake (PoS). Since ETH and its blockchain is one of the most important cryptocurrencies this move will bring significant changes to its mining process which will ultimately affect everything else.

The Proof of Work vs Proof of Stake debate has been going on for quite some time and we’ll unravel the mystery of these two consensus algorithms in today’s guide.

Proof of Work vs Proof of Stake

We’ll discuss how each algorithm works, the differences between them, as well as the changes PoS will bring to Ethereum’s mining process, should the transition complete.

Proof of Work vs Proof of Stake
Proof of Work vs Proof of Stake

What is Proof of Work?

The Proof of Work algorithm was primarily designed to discourage cyber-attacks like distributed denial-of-service attacks (DDoS) which send a large number of fake requests to drain the resources of a computer system.

While the concept has been around before Bitcoin, Satoshi Nakamoto was the one to apply it to digital currency, bringing a new era for digital transactions.

PoW allows trustless and distributed consensus and you might wonder what this means exactly. A trustless and distributed consensus system means you can make financial transactions without having to trust or rely on third-party services.

Traditional payment systems depend on a third party to perform transactions such as PayPal, Visa, Mastercard, banks and so on. Each of these services has their own register used to store account balances and transactions history.

Bitcoin and other cryptocurrencies make a copy of the ledger (called the blockchain) available to all users so anyone can verify the written information without having to trust a third-party.

Proof of Work: Mining

The complex and resource-intensive computer calculation also known as mining relies on PoW to create a new group of trustless transactions (known as a block) on the blockchain (distributed ledger).

Mining is useful for verifying the legitimacy of a transaction and to create new cryptocurrency by rewarding miners for solving the block.

To set a transaction, first multiple transactions are grouped into a block. Miners verify if the transactions in each block are valid. To do this, they are required to solve a complex equation also known as a PoW problem. The first miner who solves each blocks’ problem receives the reward. All verified transactions are stored in the decentralized ledger, aka. the public blockchain.

The so-called PoW problem has an essential characteristic: it is asymmetric. This mean, the requester size need to work somewhat hard while the network should have no problem checking it. This concept is also known as CPU pricing function, CPU cost function, computational puzzle or client puzzle.

This means all the network miners compete to be the first to find a solution to the PoW problem concerning the candidate block and it can only be solved through brute force.

Once the correct solution is discovered, the miner who first found it announced it to the entire network and receives a cryptocurrency reward according to the protocol.

The mining process determines a number (nonce) so the cryptographic hash algorithm of block data is below a set threshold. This threshold is called difficulty and it establishes mining’s competitive nature.

As the network’s computing power increases, so does the difficulty and new block creation will also have a higher average number of calculations. Obviously, block creation will also be more expensive and miners who want to maintain their efficiency are forced to upgrade their mining systems. The difficulty update usually happens once every 14 days and a new block is created every 10 minutes.

Bitcoin, Ethereum, and many other blockchains rely on the Proof of Work consensus algorithm.

Of course, PoW systems have differences between them from one blockchain to another even though the way they work is similar. With that said, let’s see how Proof of Stake works, and what it can bring to the Ethereum platform.

What is Proof of Stake?

Proof of Stake is another type of consensus algorithm and it’s a rather new concept that was first used in cryptocurrency by Peercoin in 2012. Other currencies followed, such as ShadowCash, BlackCoin, NuShares/NuBits, Nav Coin and Nxt.

PoS selects the creator of a new block in a deterministic process, based on how many coins they already own, also known as stake. It’s also worth noting, all digital currencies are previously created in the beginning and they have a fixed number.

There is no block reward in a PoS system so miners (in this case, known as forgers) take the transaction fees.

PoS and Ethereum

Vitalik Buterin, Ethereum’s creator, as well as the community, are focused on making the switch from PoW to Pos.

Proof of Work consensus forces miners to use impressive amounts of energy. Of course, the power cost is paid using fiat currencies which maintains a constant negative pressure on the value of the digital currency. This is a problem cost-wise and also not a solution that’s friendly to our struggling planet’s resources.

As a result, developers and the Ethereum community are willing to rely on Proof of Stake as a cost-effective and eco-friendly distributed form of consensus.

With Proof of Stake, miners (forgers) will need to own coins of the digital currency they want to mine which is not a requirement for PoW.

How are forgers picked?

A validator pool will exist should the new PoS consensus protocol (called Casper) be implemented. Users can join the validator pool if they want to be selected as the forger. The process will be powered by a function calling the Casper contract and sending the blockchain’s coin at the same time.

According to Vitalik Buterin “You automatically get inducted after some time”. He also said “There is no priority scheme for getting inducted into the validator pool itself; anyone can join in any round they want, irrespective of the number of other joiners,”.

Buterin also says there will be no imposed limit on the number of active forgers. However, economic regulation will exist by cutting the interest rate if the number of validators is too high and by increasing the reward if it’s too low.

Regarding security, some experts have concerns for PoS. With Proof of Work, attacking the network translates into high costs, usually much higher than the potential reward.

PoS on the other hand, is cheaper to attack which is why Buterin created the Casper protocol. The algorithm relies on a set of predefined circumstances under which a bad validator can lose their deposit.

That set of rules is known as ‘slashing conditions’ and the validators are required to submit deposits to participates which can be lost if the protocol concludes some of the slashing conditions have been violated.