What is a consensus algorithm?
21.05.2022

What is a consensus algorithm?

By bit.team

If we start studying blockchain projects on Coinmarketrate.com, then among the most important features of the blockchain is decentralization: this technology allows you to irrefutably confirm that the data contained in its register (ledger) is correct, unchangeable and protected from fraud, and does this without the need to involve a third party as a guarantor. To make it easier to understand this concept, imagine that a current account functions without a bank, an insurance policy – without an insurance company, the purchase of real estate – without a notary. In blockchain technology, all these actions (and many others) are possible thanks to a “certifying mechanism” called a consensus algorithm.

The consensus algorithm is a set of rules that, without referring to the central certifying authority, guarantees the correctness of data in blockchain accounting.

This set of general rules allows those involved in the creation of the blockchain to record data in a certain, precise and unchangeable way.

In practice, the consensus algorithm is the basis of the blockchain system, since it allows network users to interact with each other in a trusting manner.

The first consensus algorithm was invented Satoshi Nakamoto, who used it for the Bitcoin blockchain. Subsequently, many other algorithms were created, mainly aimed at improving some of the limitations of the first algorithm and ensuring ever higher quality standards.

Let’s now look at what the main consensus algorithms are:

Proof of Work – PoW

This is one of the first consensus algorithms and the most famous. Created by Satoshi Nakamoto on a par with Bitcoin. This system includes mathematical questions of varying complexity. Participants who participate in the creation of blocks of the chain (more precisely, the blockchain) are called miners.

The miner who first found the solution to the problem (technically Hash) sends it to the network. When 50%+1 nodes in the network confirm the decision, the block is created and the reward is paid to the miner.

PoW consumes a lot of resources in the form of computing power and electricity. Bitcoin blockchain nodes consume as much electricity annually as the whole of Switzerland. (This, among other things, is the “cost” of the BTC, but we will discuss this another time).

This algorithm favors miners with higher computing power on a par with nodes in countries where electricity is cheaper, and underlies Bitcoin, Litecoin and Ethereum 1.0.

Proof of Stake – PoS

This algorithm states that the probability of creating a blockchain is directly proportional to the amount of currency that the player invests in the blockchain (technically making a bet). The miner is no longer a miner, but a validator.

The more currency he has, the more chances the validator has to add a block and get rewarded.

Unlike PoW, this algorithm does not use a large amount of energy, and is accepted by most crowdfunding cryptocurrencies, since it distributes rewards proportionally to investments.

Ethereum 2.0 is moving from PoW to PoS.

Delegated Proof of Stake – DPoS

This consensus works exactly the same as PoS, with the difference that validators with large resources have to vote and choose delegates.

This system was created in order to prevent the concentration of power in the hands of very rich validators, since this is exactly what is a risk for PoS systems.

Some cryptocurrencies use DPoS, including Decimal Chain, EOS and LISK.

Leased Proof of Stake – LPoS

Further variation of PoS. In this case, the improvements are aimed at allowing entities with fewer resources to lend their funds to validators with more resources, competing with them in creating blocks and receiving a percentage of income directly proportional to the loan issued.

It has low power consumption and is used by Waves cryptocurrency.

Proof of authority – PoA

This mechanism is aimed at solving the three main problems of the blockchain related to scalability, decentralization and security. In such an algorithm, the bet is not the currency, but the identity of the nodes that contribute to the functioning of the blockchain. This approach, which should be completely democratic, seeks to reduce the risks of bets based on how network participants evaluate the node.

In fact, validators deposit their reputation in this system. As a reward, the only nodes selected to receive block creation rewards are validator nodes.

For this system to work properly, validators must be selected strictly, fairly and with the help of iron selection systems, since these characteristics tend to keep a small number of nodes active.

The property of PoA, which is that very few nodes are required to maintain the network, makes it very scalable and especially suitable for private blockchains, such as those used in logistics.

Microsoft Azure uses PoA to provide IT solutions to its customers.

  1. Proof of the past tense – PoET

This consensus mechanism was developed by Intel and is based on two principles:

  • each node in the system must be identifiable;
  • each node must be accepted by the system before participating in it.

After checking these conditions, the mechanism randomly assigns each node an amount of time to work. The node that gets the least amount of time starts building a new block first.

This algorithm is extremely fast and scalable, it saves time and energy. Unfortunately, it only works with Intel hardware.

Practical Byzantine Fault Tolerance – pBFT

This consensus is one of the oldest. First appearing in 1999, it is named after the Byzantine Generals Problem, when some generals did not know whether to attack or not, due to conflicting data received from the commander. The task assumed that some generals were traitors, and its solution depended on a large number of messages between the participants. The correct order is the one whose version the majority adheres to.

Applied to distributed networks such as blockchain, practical Byzantine fault tolerance groups nodes into smaller networks. Within each group, the majority of nodes vote for the lead node, which validates blocks based on information received from related nodes. The purpose of the system is to prevent malicious nodes from participating in the creation of blocks, which makes the blockchain less susceptible to attacks and much faster, since it does not require, as Proof of Work, block verification.

The Achilles heel of this consensus algorithm is that it consumes a significant amount of resources, since there are many communications within each group, and this becomes more and more burdensome as networks grow.

This type of algorithm is adopted by Zilliqa

Simplified Byzantine Fault Tolerance – sBFT

Like the previous one, with the only difference that transactions and new blocks can be offered by one node.

Delegated Byzantine Fault Tolerance – dBFT

With such a consensus, the verification of blocks by the nodes of the group is carried out through a kind of game in which voting is delegated.

Proof of Activity – PoA

Proof of activity is used to ensure that all transactions in the block are correct and that all validators simultaneously approve the block at a certain time. In fact, it is a mixture between PoW and PoS.

Proof of Importance -PoI

With this type of consensus, the nodes most involved in network activity are rewarded. The most important nodes are determined by:

  • the amount of currency spent in 30 days
  • the amount of productivity contributed to the blocks
  • mass of nodes

This is a PoS option, but since there is no currency in the bets, this excludes the possibility of accumulating resources.

Proof of capability – PoC

In Proof of Capacity, consensus is based on a system called drafting, which determines possible solutions to mathematical questions before they are formulated. The miner who has chosen the fastest solution launches a new block.

It is an efficient, cheap and distributed consensus algorithm.

Proof of Burnout – PoB

The main purpose of this type of consensus is to create long-term loyalty among miners by forcing them to participate in future earnings in exchange for more money in the short term.

In Proof of Burn, miners are asked to send currency to addresses that are not subject to long-term use, where the received currency can no longer be used. They burned down. The miner who sent more economic resources wins the right to start a new block, receiving a reward. Eventually, the amount of available currency will become less and less, creating a deflationary system that in the long run will lead to an increase in the value of the cryptocurrency.

Proof of weight – PoWeight

The Proof of Weight consensus algorithm is a fairly new concept that is used in one of the most promising third-generation blockchains – Algorithand.

This is a mehanism that combines many features of its predecessors and is designed to solve all the limitations of the first and second generation blockchains. Silvio Micali, the founder of Algorand and the father of PoWeight, claims that with this algorithm he will be able to solve the trilemma of the blockchain: scalability, decentralization and security.

It uses Byzantine fault tolerance for block approval, PoS and introduces the concept of node weight, which will be more reliable the more economic resources it invests in the network.

Currently, it is accepted only by the company Algorand.