What are the Proof-of-Work and Proof-of-Stake systems?

Blockchain and Proof of Work

0
27
Blockchain

Proof-of-Work and Proof-of-Stake are the two best-known consensus algorithms in cryptocurrencies. They offer different structural mechanisms for proving the operations executed.

 

What is the essence of the Proof-of-Work function?

Proof-of-Work (PoW) is an algorithm designed to protect distributed systems from abusive activity (DoS attacks, spam mailings, etc.), the essence of which comes down to two main points:

  • necessity to perform a specific fairly complex and time-consuming task;
  • ability to quickly and easily verify the result.

PoW tasks are not originally designed for human execution. They are always solved by a computer within a finite time. However, the process requires huge computing powers. In the meantime, much less time and fewer resources are necessary to verify the solution obtained.

 

Who coined the Proof-of-Work term?

For the first time, the Proof-of-Work concept was described in 1993 in the paper “Pricing via Processing, Or, Combatting Junk Mail, Advances in Cryptology” (by Cynthia Dwork and Moni Naor). Though there was no term itself in the article, the authors offered the following idea:

“The main idea is to require a user to compute a moderately hard, but not intractable, function in order to gain access to the resource, thus preventing frivolous use.”

In 1997, Adam Back launched the Hashcash project dealing with the same spam protection issue. The problem was stated as follows: “Find such x that hash SHA(x) would contain N high-order null bits.”

The system offered partial hash inversions when using email. To calculate the specific header, it is necessary to conduct about 252 hash value calculations, and this procedure is required before sending each separate email. Hence, while sending several ordinary letters, it is not a problem to conduct some additional calculations. On the contrary, constant recalculations make spam mailing a very resource-intensive process. At the same time, it takes little time to verify the correctness of the computed result: a single SHA-1 calculation is conducted, bearing a pre-prepared label.

In 1999, the Proof-of-Work term came out. It appeared in the article “Proofs of Work and Bread Pudding Protocols” (by Markus Jakobsson and Ari Juels) in the Communications and Multimedia Security Journal.

 

How is Proof-of-Work related to cryptocurrencies?

In the Bitcoin network, the PoW mechanism is utilized as a consensus algorithm (a common opinion on which version of the blockchain is considered valid). In fact, the creator of the first world cryptocurrency, Satoshi Nakamoto, borrowed the idea of ​​the aforementioned Hashcash project, adding a mechanism for changing complexity to it –  decreasing or increasing N (the required number of zero bits), depending on the total computing power of network participants. SHA-256 became the computing function.

Simply put, the PoW mechanism allows a network node to verify that a miner (who, in fact, operates the node adding the new block to the blockchain) has actually performed the calculations. The described process involves efforts of finding the block header hash (a blockchain part that contains a link to the previous block and the aggregated value of transactions recorded in it), the value of which will correspond to the current complexity level.

 

Is the calculation complexity really “difficult”?

It is possible to make these calculations exclusively in an interactive mode, and the complexity is set at a level making the problem really difficult to solve. Nevertheless, the calculation results verification remains a simple process. The network nodes are always able to make sure that a miner has found the correct value. However, since the block-finding process is very labor-consuming and random, it is impossible to exactly predict which miner will actually solve the problem and find a block.

For the system to recognize a block valid, its hash value has to be smaller compared to the current target. Consequently, each block shows that some work has been done to find it.

Each block contains the hash of the previous block, thus creating a chain. It is impossible to alter a block – it is only possible to create the same level block containing the hash of the previous block. To carry out such a process, it is necessary to work on finding all the previous blocks. The process complexity protects a blockchain from unauthorized access and double spending.

 

How has the Proof-of-Work function influenced mining?

The Bitcoin Proof-of-Work function implementation has resulted in a self-sufficient mining industry, boosting the specialized equipment development since the computing resources spent on hashing blocks are immense and far exceed the largest supercomputers’ computing power.

However, there is an all-too-common “reverse side of the coin”: soon enough, PoW turned into a monster, consuming large amounts of electricity while racing for mining profitability. In 2012, the Bitcoin network’s total computing power already exceeded the most powerful supercomputer in the world in performance, and the first alternative to PoW – Proof-of-Stake – loomed on the horizon.

 

What is Proof-of-Stake?

This is an alternative consensus mechanism, first implemented in 2012 in the PPCoin (now known as PeerCoin) cryptocurrency ledger. The idea is to use a “stake” as a resource determining which node receives the right to mine the next block.

In the Proof-of-Stake system, nodes also try to hash the data searching for the result which is less than a specific value, but in this case, the complexity is distributed proportionally and in accordance with the account balance of the particular node, otherwise speaking, according to the number of coins (tokens) on the user’s account.

Consequently, a node with a larger balance has better chances of generating the next block. The pattern looks attractive enough because of the small requirements for computational resources in the first place and also because there is no “wasted” energy issue.

 

What are the pros and cons of Proof-of-Stake?

In general, the following arguments speak in favor of using PoS:

  • Hacker attacks require considerable funds to be spent, making such actions impractical from a financial point of view.
  • At the same time, if an attacker possesses a large number of tokens at their disposal, they will suffer from the attack as well because such actions will disrupt the stability of a cryptocurrency.

Arguments of concern:

  • The PoS system provides additional motivation to accumulate funds in a single account, which can negatively affect the network decentralization idea.
  • If a small group with fairly large funds is formed, its members can impose their own network rules to other participants.

Additionally, we can mention the Nothing-at-Stake (an empty stake) issue, which makes any PoS system inherently unstable in the opinion of many cryptocurrency enthusiasts. A hacker can try to create a blockchain fork – a longer alternative chain by spending “non-existent” resources. Furthermore, other miners can support them since they do not spend “actual” resources either. Using a fork, a hacker can reject specific transactions and conduct a double-spending attack.

 

Which side does the balance tip?

PoW and PoS supporters have had their differences for a long time. However, the nature of these disputes is to a greater extent theoretical. As experience shows, a developer still plays a significant role in security matters.

However, many consider the hybrid version of PoS and PoW systems to be the safest solution. This approach is currently actively used: multiple cryptocurrencies have a PoW stage – the currency is emitted using a classic mining procedure, and the PoS stage which comes into effect after the mining is complete.

Nonetheless, despite the fact that PoS systems will always remain easier to implement and generally the same secure, most serious cryptocurrency ledgers will apparently keep using the PoW protocol.

 

Where else can I read about Proof-of-Work and Proof-of-Stake?

Back in our day, ForkLog prepared an adapted translation of a whitepaper, written by BitFury Group, which compares PoW and PoS systems’ security operational principles.

 

What other proofing mechanisms do cryptocurrencies support?

Proof-of-Work and Proof-of-Stake can be considered the two most popular consensus algorithms in the world of cryptocurrency, but besides those two, there are more mechanisms having their own subtle details and features.

Their list can be quite lengthy, so we will highlight a few of the most famous:

  • Proof-of-Activity is a standard hybrid function combining PoW and PoS;
  • Delegated Proof-of-Stake is a general term which describes the evolution of basic consensus protocols based on stake confirmation. DPoS is utilized in BitShares and in proposed algorithms like Slasher and Tendermint;
  • Proof-of-Burn – the “burning” is enacted by sending coins to an address where they in no way can be spent. Disposing of their coins like this, users receive the right to lifetime mining, which is arranged like a lottery among all burnt coins owners as well;
  • Proof-of-Capacity (proof of resources) is the implementation of the popular idea called “megabytes as resources”. To be involved in mining, it is necessary to allocate a significant amount of your disk space;
  • Proof-of-Storage is a concept similar to the previous one, where the allocated space is used by all participants as shared cloud storage.