PoW vs PoS — the debate defined

in #bitcoin7 years ago

Often overlooked in any discussion about cryptocurrencies, is the critical importance of consensus algorithms and how fundamental they are to the application and potential of any blockchain coin or token. Determining everything from network security, to confirmation speed, to environmental friendliness — consensus algorithms dictate how transactions are ordered and verified in a distributed ledger — and ultimately deliver a record of truth over a period of time.

Without a central intermediary, the network of participating users (nodes) that make up a blockchain have to agree on the validity of what’s being added to the ledger, using a set of predefined rules. A consensus needs be reached for the majority of the nodes. While nobody disagrees with the general concept of consensus agreement being fundamental to the legitimacy of a blockchain, debate continues, however, around what is the best process by which to achieve that consensus.

Option 1: Proof of Work
The problem of ensuring reliability in decentralized systems was first formalized in the 1982 paper “The Byzantine Generals’ Problem”. Here, a Byzantine army is attacking a city and has it encircled. To proceed, the generals who are dispersed around the city’s periphery must agree on a battle plan; but while some generals want to attack further, others want to retreat. And to complicate matters, the generals are so far apart that messengers are required to deliver communications between them, and one or more generals may also be traitors. To execute a move, a majority (i.e. 51% or more of the generals) must agree on a chosen strategy.

This Byzantine Generals’ Problem is analogous to solving consensus issues on the blockchain. The nodes must all agree on a certain set of rules, and be able to move forward by agreeing on a particular assessment of transaction information before it is added onto the chain. This is not easy – thousands of people use the network and must ensure that they agree on the validity of new information that is to be added, and prevent bad actors from sabotaging the ledger and rewriting history. So, a specific type of consensus mechanism/algorithm must be adopted. This protocol enables a coherent group of network entities to work together in order to update the ledger in a secure fashion.

“... no single actor, or colluding subsets of actors, can take up the majority of the set, even if the actor has a fairly large amount of capital and financial incentive."

— Vitalik Buterin, Co-Founder, Ethereum

In the words of Ethereum founder Vitalik Buterin, the purpose of a consensus algorithm is to “allow for the secure updating of a state according to some specific state transition rules, where the right to perform the state transitions is distributed among some economic set”. Buterin identifies this set as one containing users who can “be given the right to collectively perform transitions via some algorithm” and who “must be securely decentralized – meaning that no single actor, or colluding subsets of actors, can take up the majority of the set, even if the actor has a fairly large amount of capital and financial incentive”. The consensus algorithm, therefore, ensures that through decentralization, the next block to be added to the chain is the one and only version of the truth in the system.

The first consensus protocol to emerge in the crypto era via the Bitcoin blockchain was “Proof-of-Work”. PoW requires that each validating user proves that they have performed a computational action as a way to prevent the network from being attacked by such forces as spam and denial of service. Each node (commonly known as miners) tries to solve complex cryptographic problems using its own computational resources – the one who eventually finds the solution confirms the transactions and writes the block onto the chain. This winning miner receives cryptocurrency tokens as a reward for the time and energy spent generating the solution (a Bitcoin miner, for example, will receive Bitcoin as his reward). This reward system incentivizes miners to generate the right solution and ensures the network remains secured. It also means that the miners are competing with each other to create the next block of transactions.

The problem with Proof of Work
Given the heavy utilization of computational resources involved in mining, PoW is considered to be costly, wasteful and inefficient. Having thousands of miners working on just one solution each time is an excessive use of resources, especially as the only block that has any value thereafter is the one that is solved. With each new block being mined, therefore, there’s a heap of effectively useless bi-product. And it’s costly. In fact, one study has equated the power consumption of Bitcoin mining to Ireland’s average electricity consumption. And that doesn’t include all the newer cryptocurrencies that utilize some form of PoW algorithm.

The hardware used in the mining process, moreover, is usually an advanced and expensive piece of proprietary equipment. Take Application Specific Integrated Circuits (ASICs) as an example, which have been designed to exclusively mine Bitcoin and other cryptocurrencies. Most of the research and development of ASICs currently originates in China, a country where electricity is also comparatively cheap. So, given that Chinese ASICs manufacturers have considerable incentives to simply mine bitcoins for themselves – and indeed do so – this has led to an estimated 60-70% of Bitcoin’s total hashing power congregating in China. As such, the problem of excessive centralization of power emerges – something that is antithetical to the founding tenets of blockchain.

Option 2: Proof of Stake
The emergence of PoS in 2012 was an attempt to solve the problems of cost, inefficiency and the susceptibility towards centralization associated with Proof-of-Work. The basic premise is that instead of purchasing costly equipment to mine blocks ahead of one’s competitors, each ‘validating’ node (miner) in the network purchases the coins used in the specific blockchain system.

Under the PoS algorithm, tokens are issued to the validating nodes in the network from the very beginning of the network’s existence, which means that unlike PoW, tokens are not concurrently minted as new blocks are added to the ledger (although some blockchains employ a hybrid PoW/PoS algorithm which allows PoW minting to take place before switching to PoS). A specific node is then selected to commit the new block every few seconds or minutes. But if a node holds more coins, it retains greater power over what is considered to be the truth on the ledger. As such, the selection is strongly influenced by those with the most coins – the more they have invested in the network, the more they have to lose in the event of any mishaps.

Another influencing factor is the time period that coins have been held by users, which indicates whether they are invested for the long-term – clearly a more desirable position than someone who just purchased their coins yesterday. So, those with more stake are deemed to be more trustworthy, and considered less likely to attack the network. Indeed, in order to mount an attack, a user would have to buy 51% of the coin value of the entire network. This would be expensive, as well as nonsensical – there is no incentive for a user to attack a network in which they have so much invested.

In addition, PoS is often preferred over PoW because it requires considerably less computational work, meaning that it is less wasteful and the cost of executing PoS is substantially lower. This removes a major barrier to entry for those wishing to become block validators. The lack of mining requirements removes the need for specialist hardware to be developed; indeed, the technology can easily run on consumer-grade computers.

The problem with Proof of Stake
One of the most cited issues with Proof-of-Stake is known as the “Nothing-at-stake” problem. Under PoW blockchains, there is an incentive to keep on mining the longest chain on the ledger, as this chain will be considered the primary version of the truth and the one that earns the miners their rewards; so miners are clearly incentivized to mine only that chain.

But with PoS, there is little to prevent a miner from mining on numerous PoS chains, especially given the fact that there is negligible computational expense to the miner under this algorithm. Hypothetically speaking, a bad actor PoS miner operating on various chains could make it difficult for the network to reach consensus, and could attempt to rewrite history.

This problem is particularly pertinent when a fork in the chain transpires (as happened with Ethereum, which then produced Ethereum Classic); in such a situation, validators using PoS could place stakes on both blockchains which makes it easier to alter the truth in their favor and earn profit. Indeed, partially as a way to solve this problem, Ethereum is in the process of making the transition from PoW to a new consensus strategy called Casper, which will employ a PoS algorithm. The move is intended to make the processing of new blocks onto the chain significantly more efficient, while Casper will also punish those who attempt to stake on two different chains.

The outlook for consensus
Further enhancements to the PoS model are currently being revealed by many of the biggest cryptocurrencies. Among the most popular is the Delegated Proof of Stake (DPoS) algorithm which was championed by Dan Larimer, the driving force behind several high-profile blockchain projects including BitShares, Steemit and EOS. DPoS differs from PoS by having the validating process conducted by a group of delegates who are selected by the network users, and who have separate nodes for mining the blocks. Because these delegates are deemed to be trustworthy, this partially solves the nothing-at-stake problems.

The popular Chinese platform NEO employs an algorithm called Delegated Byzantine Fault Tolerance, which employs a delegated voting process in order to prevent the chain from forking in two. Ripple meanwhile, utilizes its own “consensus ledger” which allows the participants and history to define truth in the system, as opposed to the technology. And many more consensus algorithms continue to surface, each solving problems unique to a particular application of blockchain:

Clearly, the search for the ideal consensus mechanism remains unfinished business at this stage. One expects that it will be an ongoing process to improve such factors as cost, efficiency and scalability, which will lead to some intriguing advancements during the coming months and years. Achieving a balance between the trade-off of decentralization, processing speed and efficiency will likely remain at the heart of further development. And as more use cases for blockchain continue to emerge, it seems probable that the range of consensus mechanisms will also grow and evolve in tandem. This will also likely spark further novel applications of blockchain.

Sort:  

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://www.cryptoninjas.net/2018/02/27/blockchain-consensus-algorithm-pow-pos-beyond/