Cryptocurrency consensus algorithm. Overview of the main negotiation mechanisms: Proof of Work (PoW), Proof of Stake (PoS) and others

281

The cryptocurrency consensus algorithm is a method of reaching agreement on a blockchain network. Agreement (consensus) is the basis of all chain work. Negotiation mechanisms are used to ensure the reliability of any network that includes multiple nodes. This is what makes blockchain networks so decentralized and secure.

Basically, consensus algorithms serve two functions: they protect the network from a powerful hacker attack that could damage it, and they guarantee the validity of a new block in the chain. In return for this benefit, many algorithms consume a lot of computational energy, but they are absolutely necessary for the full-fledged operation of blockchain technologies.

Today, there are many types of reconciliation mechanisms. The Btcnewsweb.com editors will review the main varieties, and then the rarer ones.

What is a consensus algorithm and why is it needed. The task of the Byzantine generals.

The reconciliation mechanism is essential. Individual parts of a peer-to-peer system, such as a public blockchain, must necessarily “negotiate” with each other how the chain’s history looks up to the present moment, and how to move forward – there is no central body that would control these aspects.

There is always a risk of accidental or deliberate misinformation or misunderstanding between network participants. In a public blockchain, a sufficient number of users must recognize the correctness of the transaction history up to a certain point. However, there is no guarantee that everyone will be honest – there are attackers who want to log fraudulent transactions or prohibit genuine ones.

The solution to this problem should be self-contained. No one can unilaterally declare a transaction correct or incorrect, this would be contrary to all the principles of decentralization. The term “Byzantine Generals Problem” appeared in 1982 and was immediately recognized as the best way to explain the complexities of achieving decentralization so that people can more easily understand the problem. Its essence:

  1. Imagine a military operation in Byzantium 1000 years ago.
  2. There are several generals whose armies have surrounded the city. Each army is in its own separate camp.
  3. Generals can communicate with each other using messengers.
  4. It is important for generals to act in concert in order to simultaneously attack the city or, conversely, retreat. If at least one army acts out of place, then the entire army will be destroyed.

And this is where the complexity comes in. You can send messengers on horseback, but they can be captured and killed. In addition, you must always send confirmation that the message has been received, but in this case, the messenger can also be killed. There are three types of difficulties:

✅  What if the messengers are constantly intercepted or altered messages to confuse the generals?

✅  How can a general know that he has received a genuine message?

✅  What happens if one or several generals go over to the side of the enemy and deliberately send incorrect information?

In the Bitcoin system invented by Satoshi Nakamoto, all these problems were solved. Distributed systems have the so-called “Byzantine fault tolerance”, that is, the BFT system is built into their protocol. The reconciliation mechanism produces new blocks every 10 minutes and rewards the node that formed the next block. All other nodes of the Bitcoin network can verify that the block was created correctly and thus reach an agreement on whether to put it in the chain that determines the operation of the system.

Key consensus algorithms in cryptocurrency blockchain networks

Consider the consensus mechanisms currently used in the blockchain sphere.

Proof of Work (PoW) Algorithm Review

Proof of Work is information that is difficult, time consuming or expensive to produce, but easy to verify for compliance with specified requirements. Obtaining a Proof of Work is usually a random procedure with an extremely small chance of success, that is, it takes a lot of attempts and wrong actions to achieve the goal. This is how Bitcoin works.

For a block to be validated by users of the system, miners must obtain a proof of work that covers all payments contained in the block. The complexity of the process is strictly regulated: the blockchain network can generate one block in an average of ten minutes. The chance of generating it correctly is extremely low, so it is impossible to predict which device on the network will generate it.

For a block to be considered valid, its hash must be less than the specified one. Each new block contains information about the hash of the previous one. It is impossible to change the block placed in the blockchain, since for this it would have come to change all the blocks that followed it.

The most common Proof of Work scheme called SHA-256, but besides it, there are also the following types:

✅  Scrypt;

✅  Scrypt-jane;

✅  Scrypt-n;

✅  Blake256;

✅  Crypto Night;

✅  SHA3;

✅  Quark;

✅  HEFTY1.

Periodically, new variations appear, which are somewhat improved in comparison with the classical ones. But the principle is always the same.

PoW advantages and disadvantages

The main advantage of the Proof of Work consensus algorithm is effective protection against DDoS attacks and the influence of miners with low hardware power. PoW imposes certain restrictions on the actions allowed to users, since completing a task requires a lot of computing power. To make an attack on a network, you need a huge amount of power, which in most cases will simply be economically unprofitable. Also, holders of large capital cannot influence the network, only the total capacity of the equipment used matters.

The main disadvantages are the impressive economic costs of mining and a lot of “useless” calculations. At the moment, the complexity of Bitcoin mining is so high that only large corporations that have the opportunity to invest a huge amount of funds in equipment can really make money on mining. As a result, the system is gradually becoming more centralized.

It is also sad that the mass of useless calculations performed by miners is not used anywhere – the results cannot be applied either in science or in business. The environment suffers from the consumption of thousands of kilowatts of electricity.

Which cryptocurrencies use the PoW consensus algorithm

To date, the following cryptocurrencies use Proof of Work in their work (a specific modification of the algorithm is indicated in brackets):

And many other less popular currencies.

Proof of Stake Algorithm Review (PoS, Proof of Stake)

Proof of Stake is a consensus mechanism for a public blockchain where the probability of success is related to the economic value of a node in the network. In PoS-based blockchains, the pool of validators in turn votes for the next block, and the importance of the vote of each validator depends on the total amount of its capital (the so-called share).

The general principle of Proof of Stake operation looks like this: anyone who has accumulated savings in the form of network coins can become a validator in the network. To do this, the owner of the node must transfer the desired part of his funds to a deposit using a special transaction. The further path can be one of two:

  1. In “chain” Proof of Stake, the system randomly determines the validator at the end of each time interval (for example, 10 seconds) and gives this validator the right to form a block. This block should contain indications of the previous one, thus gradually building an interconnected chain.
  2. In BFT-based Proof of Stake, validators are arbitrarily given the right to submit blocks for validation, but deciding which block is true is a multi-step process. Each node sends a “vote” for a specific block during each stage of voting, after which everyone gradually agrees on the truth of one or another block.

Pros and cons of PoS

The two main advantages of the algorithm are the absence of energy costs and a high level of security.

Proof of Stake does not need powerful equipment that is economically unreasonable to maintain and harmful to the environment. This also increases the decentralization ratio, as it is more difficult for large players to gain control of the network. To take over the chain, an attacker would have to buy 51% of all tokens on the market. Small-cap cryptocurrencies are indeed exposed to this risk, but this is not possible with top-end ones.

On the downside, in terms of revenue, PoS is now less profitable than PoW. In addition, when selling coins obtained through proof of work, a person only sells them. And by selling coins obtained through proof of stake, he sells his “miner”, that is, he loses the opportunity to earn even more.

Which cryptocurrencies use the PoS mechanism

Examples of popular currencies based on the Proof of Stake algorithm:

Review of the Leased Proof of Stake and Delegated Proof of Stake algorithms

Leased Proof of Stake, or LPoS, is a reconciliation mechanism based on Proof of Stake, but slightly improved. If in the usual version a node holds some amount of funds in order to be able to close a further block in the chain, then in LPoS the user can lease his funds to full nodes (main nodes).

As a result, a leasing wallet is formed, and the miners who use it to generate blocks pay interest to the real owner of the funds. Each user on the network can choose what to become – just rent out funds and receive interest, or become a full node (this is done for a fee, quite tangible).

The method is used, for example, in the Waves cryptocurrency.

Another option is called the Delegated Proof of Stake, or dPoS, and is a voting process through elected delegates. This is preceded by the selection of block producers; the whole set of network participants is divided into validators and voters. As a result, coin holders with voting rights are unable to confirm transactions. But they have the right to choose a certain number of participants who will be involved in the formation of blocks.

A prerequisite for those wishing to become validators is disclosing their identity and confirming their readiness to be constantly online, to maintain the normal functioning of the node, and to continuously confirm transactions. Those who voted for these nodes receive a percentage of the block reward as a reward.

The option is used in the work of the BitShares cryptocurrency.

Other algorithms

Several rare but inherently interesting negotiation mechanisms.

Proof of Importance (PoI)

Proof of Importance is an algorithm first introduced in the NEM cryptocurrency. Used to determine which members are allowed to add new blocks to the chain; this process is called harvesting (an analogy is drawn to “harvesting”, harvesting in English). In exchange for closing a block, a node can collect a percentage of the transaction fees for that block. To be eligible for harvesting, you must have a minimum of 10,000 XEM coins.

Proof of Burn (PoB)

The concept behind this method is that miners must prove that they burned coins. Incineration is the sending of funds to a specific non-consumable address. This method is used in the Slimcoin system. The network allows full node owners to earn coins by looking for proof of burning, which is determined by the amount of money sent to the correct verified address.

Proof of Capacity (POC)

Proof of Capacity is a reconciliation mechanism that allows computations to be performed using hard disk resources rather than video cards, ASIC miners or processors. The method appeared as an alternative solution to the problem of high energy consumption in PoW. POC makes it possible to use unallocated hard disk space for cryptocurrency mining. The larger the hard disk, the more possible solution values ​​can be stored on it, and the more chances of getting a reward for finding a block.

Examples of currency that can be mined in this way are SiaCoin.

Proof of Authority (PoA)

In PoA-based networks, blocks and transactions are verified by approved accounts called validators. Validators maintain software on their devices that automatically validates transactions and places them in blocks. A node with high reliability and good reputation can become a validator.

The method has been successfully applied in the VeChain network.

Proof of Brain

Proof of Brain is described in the Steem Bluepaper and has two main properties:

  • a pool of tokens designed to stimulate the creation of data and the implementation of their supervision;
  • a voting system that uses the power of the crowd to determine the value of content and the distribution of coins.

These two properties allow the blockchain to distribute most of the rewards through the application of human opinion rather than automatic processes.

Byzantine Fault Tolerance (BFT)

This designation makes it clear that the network uses a system for solving the tasks of Byzantine generals described in detail above. The most striking example of the use of such technology is Bitcoin. Although now it seems slow and ineffective, but among all existing cryptocurrencies, it is the most honest and reliable, which Bitcoin evangelists never tire of repeating.

Proof of Elapsed Time (PoET)

The strategy of this consensus algorithm looks like this: each user of the blockchain network expects a certain amount of time, determined randomly; the first user to finish waiting closes the block and receives a reward. Proof of Elapsed Time was developed by Intel and runs on a special set of instructions for the Software Guard Extensions (SGX) processor. The main purpose of the algorithm is to run trusted applications in a secure environment.

Proof of Activity (POA)

PoA is a hybrid block generation process that combines the principles of PoS and PoW. First, the miners do their work, then the holders (coin holders) come into play. The project is still purely theoretical and is not used in cryptocurrencies.

Proof of Weight (PoWeight)

Proof of “weight” is the consensus mechanism used in the Algorand model from MIT researchers. Allows you to conduct very fast transactions using BFT and successfully scale to a large number of users. Each participant in the network is assigned a certain “weight”, which determines his honesty and the level of the user’s contribution to the development of the network.

Now you know which algorithms are capable of maintaining the performance of blockchain networks in one way or another. All of them have their advantages and disadvantages, but they are aimed at one goal – to ensure maximum security and decentralization.

Leave A Reply

Your email address will not be published.