Proof of Work vs. Proof of Stake & the Battle for Blockchain Consensus

Proof of Work vs. Proof of Stake

As blockchain technology and applications have grown over the past few years, so too has the user base for blockchain platforms like Bitcoin and Ethereum. This is great news for adoption, and blockchain proponents are quick to point out that it seems blockchain has reached an inflection point in public consciousness and enterprise use. Companies around the world and across many industries are finding ways that blockchain can fit into their business models.

Along with this growth in adoption has come an increased interest in providing the computing power behind blockchain. It’s now a well-worn cliche to see news stories and blog articles about how Bitcoin mining consumes more energy than many small countries. Competition to create new blocks is fierce, because the reward can be enormous. Thousands of dollars worth of Bitcoin are up for grabs every 10 minutes as new blocks get mined.

The challenge of all this growth is scalability and cost. The more transactions and nodes you add to a network, the more difficult it is to fit all those transactions in a block and establish consensus across the global network. Since there’s no governing body or central institution in a blockchain, the ledger only gets updated when the entire network agrees.

In the face of this growth and change, many are starting to question the foundations of proof of work consensus as laid out by Satoshi Nakamoto in the Bitcoin white paper. Not only does it use a lot of electricity, but it also concentrates mining power and rewards to the institutions that are willing to invest millions of dollars in mining equipment and electricity. Proof of stake consensus is the foremost challenger to proof of work’s hardware and electricity-based consensus paradigm. In this article we’ll explore both consensus mechanisms and their advantages and drawbacks.

1. Why do we need consensus?

Why do we need consensus

In a conventional data storage system, record keeping is usually the domain of a third party. There is a central database of information that is a single source of truth. In the case of financial transactions, this means a bank keeps a ledger of transactions and has final say over what your balance is. For other information exchanges, you need to trust gmail’s servers, your insurance company’s records, or your country’s elections committee.

Of course, centralized, single source of truth systems also mean there’s a single source of failure. We’ve seen countless companies lose customer information when their systems are hacked. In other cases, bad actors can infiltrate and change data or manipulate results.

Blockchains overcome this weakness by giving a copy of the data to everyone on the network. Through the public ledger, anyone on the network can see and verify its accuracy. However, since it’s a shared ledger, updates to the record need the approval of everyone on the network. This is where consensus mechanisms come in.

A good consensus algorithm establishes an agreed-upon state for the blockchain amongst the nodes on the network. It usually does so by rewarding one node or a group of nodes for doing the work of compiling an accurate, legitimate new block. Once the new block is created, the network can then choose to accept it, reward the creator, and begin working on the next block.

2. What is Proof of Work?

Proof of work

Proof of work is the first and currently most popular consensus algorithm for blockchain applications. Satoshi Nakamoto devised proof of work as a series of cryptographic puzzles for a computer to solve in order to create a new block. These puzzles are known as cryptographic hash functions, and they’re only solvable using guess-and-check, even for computers. The computers attempting to solve the puzzle must check trillions of wrong answers before they find a correct answer. Even with thousands of computers working on the same problem, it still takes ten minutes on average for one computer to find a correct answer.

The computer that finds the answer receives a reward, but the thousands of other computers working on the problem just wasted their time and energy. This is the wasted electricity that the news articles report on. As soon as a computer finds a correct answer and the network accepts it, the entire network begins working on compiling a new block and solving a new puzzle.

Of course, if you have the fastest computers or the most computers (or both), then you’re more likely to find a correct answer and win the reward. As such, huge warehouses have sprung up across the world with hundreds of specially designed computers known as ASICs all mining Bitcoin at the same time. These major companies win many of the mining rewards and therefore continue to concentrate wealth. Over time, this could essentially mean that a centralized institution “runs” Bitcoin, compromising the original vision and security of the network.

The same problem applies to any other blockchain platform that uses proof of work. While many of these platforms use modified algorithms to limit the effectiveness of specialized ASIC computers, they’re still subject to energy waste and other challenges of centralization.

3. What is Proof of Stake?

Proof of stake

The problem with proof of work, beyond wasted energy, is there’s no mechanism for punishing bad actors. If someone creates a fraudulent block or chain of blocks, the network will likely reject their attempt, but the network has no way to punish that bad actor and disincentivize them from trying again. We can’t fry the expensive hardware or charge them extra on their electricity bill.

In the interest of saving energy and creating a disincentive for bad actions, proof of stake moves the incentive and punishment system entirely inside the blockchain. Instead of making an investment in expensive hardware and electricity, proof of stake participants make an investment in the token itself. They set aside a certain amount of wealth as collateral, and based on the amount of collateral they wager the network randomly selects someone to build the next block.

If the block builder creates a fair, valid block, then they will receive a reward, vested over a time period long enough for the network to verify the transactions inside the block. If the block builder is dishonest, however, they will lose their collateral, restricting their ability to participate in future rounds of PoS.

4. Benefits & Drawbacks

Proof of work and stake benefits and drawbacks

Proof of stake is more energy efficient, because it removes the high-powered computing from the consensus algorithm. Therefore, it’s better for the environment. However, proof of stake is also a more complicated system and difficult to secure. Adding punishment and collateral creates new variables in the algorithm, all of which need to be tested, and each of which could present a security weakness if the algorithm is not written correctly. For instance, how much should stakers be required to put up as collateral? If they create an invalid block should they automatically lose 100% of that collateral? How big should the reward be for creating a valid block? How long should that reward be vested before stakers can withdraw it to balance security and platform longevity with timely rewards?

The answers to all of these questions impact the centralization and security of a proof of stake system. Higher collateral requirements, strong punishments for faulty blocks, and long vesting periods give stronger disincentives against bad behavior. However, they also make it harder for the average investor to participate, limit liquidity, and tend toward centralization where only whales can afford to have large amounts of funds staked and vested for longer periods.

Additionally, there’s something to be said for proof of work’s external locus of collateral. Proof of work miners invest in mining equipment and buy electricity in fiat currency. Some argue that this undermines the mission of cryptocurrency if it directs wealth outside the system. On the other hand, using real-world value as an anchor for your cryptocurrency makes it more secure. Proof of work systems have yet to be successfully attacked, and they’ve been around for a decade.

5. Hybrid Consensus

Hybrid Proof of work and stake consensus

Many have begun to advocate for hybrid consensus. Every round of consensus doesn’t need to be driven by proof of work in order to see the benefits of proof of work. One common proposal is securing one in every ten blocks using proof of work while the other nine use proof of stake. This brings the tested security benefits of proof of work alongside the energy and punishment controls of proof of stake. It also means that two distinct pools of users (miners and stakers) would verify blocks, making it more difficult to coordinate an attack.

Of course, such a shift would drastically undercut the profits miners currently enjoy. The switch is further complicated when you consider that any change to a blockchain network requires miners to update the software version themselves. If a majority of miners decide it’s against their interests to switch to proof of stake, then the change won’t go through or a hard fork of the blockchain is necessary.

As you can see, there’s history, politics, and economics tied up in the fight between proof of work and proof of stake. Proof of stake is better for energy efficiency and provides more options for punishing bad actors. However, that doesn’t mean it will win out against a group of miners who have a lot invested in proof of work.

Share now if you like the article!