Blockchain consensus algorithms

Blockchain technology is a new shift in the world of information that has led to changes in many areas. Many industries have begun to implement blockchain solutions into their applications and services. A consensus algorithm is required among the peer-to-peer nodes on the blockchain to ensure its correct operation.

In this article, we will focus on popular consensus algorithms to determine their functions and factors that affect performance and security.

A brief review of consensus mechanisms

Image for post
Image for post

The consensus mechanism is a protocol that allows all peers of a network to reach a common agreement on the current state of a distributed ledger. It is important that consistent algorithms provide reliability in the blockchain network and establish trust between unknown partners in a distributed computing environment. Basically, a consensus protocol guarantees that every new block added to a blockchain is the only version of the truth that is agreed upon by all the nodes in the chain. The consensus models of the blockchain are based on specific goals, such as achieving an agreement, cooperation, equality of nodes, and the compulsory participation of each node in the approval process. Thus, the consensus algorithm aims to find a common agreement, which would be a win-win for an entire network.

The main types of consensus algorithms

Over 90% of the cryptocurrency market is based on three primary consensus algorithms:

• Proof of Work (PoW)

• Proof of Stake (PoS)

• Delegated Proof of Stake (DPoS)

Nevertheless, apart from the three common ones, we will also review some other mechanisms. Despite the fact that many projects have not accepted them, these mechanisms are still exciting to learn about, as they could play an essential role in the future.

  1. Proof of Work (PoW)

This consensus algorithm is used to select the miner who will generate the next block in the chain. Bitcoin, Litecoin and many other blockchain industry mastodons use PoW as their base. The main idea of ​​this algorithm is to solve a complex random math problem generated by the blockchain and provide a solution. A peculiarity of this algorithm is the relative difficulty to solving the problem and the ease of cross-checking the result. This math puzzle requires significant computing power; thus, the node that solves the puzzle first gets to add the next block to the blockchain. PoW tends to make network attacks overly expensive and requires high electricity costs since miners consume energy to compute the next block, while providing accounting and network security services. The disadvantages of this mechanism are limited scalability and low bandwidth.

2. Proof of Stake (PoS)

PoS is perhaps the most prevalent alternative to PoW. Even Ethereum, the largest altcoin in the cryptocurrency universe, plans to move from PoW to PoS consensus in the near future. In this type of consensus algorithm, instead of investing in expensive equipment to solve complex puzzles, validators invest their coins in the network, blocking the movement of them (known as ‘staking’). The next step of all the validators is checking the blocks, speculating on the block that, in their opinion, should be added to the chain. Based on the actual blocks added to the blockchain, all validators receive a reward proportional to their stake, and their coin stack increases accordingly. Eventually, the validator to generate a new block is selected based on its economic share in the network. In this way, the PoS algorithm encourages validators to achieve consensus by utilizing an incentive mechanism. The advantages of this mechanism are increased scalability at a base level and potential energy savings compared to PoW. The disadvantages include the risk of centralization, which in turn leads to a lower security level. Peercoin, Lisk, PIVX, and other blockchains utilize the PoS algorithm.

Image for post
Image for post

3. Delegated Proof Of Stake (DPoS)

The DPoS mechanism is a development of PoS, yet it has grown into a separate type of consensus algorithm, based on voting systems. Instead of randomly selecting individual nodes to perform verification, the token holders use their share (stake) to vote on a selected number of trusted nodes that are often called delegates. They are responsible for verifying transactions and maintaining the network. As a result, they receive rewards in exchange for transaction fees. DPoS can be compared to a representative democracy where participants vote for a trusted representative to protect the network on their behalf. Voters can replace representatives if they perform against the interests of the majority. The DPoS algorithm was invented by Dan Larimer and is used in projects that he initially led, such as BitShares and EOS. Moreover, it is also utilized by other networks, like Tezos and Ark. The advantages of DPoS are high scalability and broader spread of inflation (a more even distribution of freshly minted tokens between validators), and disadvantages are the lack of security and a tendency towards network centralization.

4. Proof of Elapsed Time (PoET)

PoET is one of the fairest consensus algorithms that selects the next block by using only honest assets. It is widely used in many private and corporate blockchains, with Hyperledger being a prime example. This algorithm provides each validator in the network with a real chance to create its own block. All nodes are involved in the process, generating a random waiting time and going to sleep for the specified duration. The node to wake up first gets to generate a new block. Created blocks are transferred to the network for consideration by other participants. The winning block is then added to the blockchain. There are additional checks in the algorithm to prevent the nodes from repeatedly winning the election, generating the lowest timer indication. Of all the advantages, we can highlight high efficiency and low consumption of resources. At the same time, the disadvantages would be a low level of security, and a dependence on a third party developing a set of instructions for the processor.

5. Proof of Authority (PoA)

PoA is a reputation-based consensus algorithm that leverages the block validators’ value of the identity and reputation. In March 2017, the Ethereum protocol development team led by Gavin Wood proposed PoA as a solution to spam attacks on the Ropstein Ethereum test network. PoA is similar to PoS, except that validators stake their reputation instead of coins. Trusted nodes/validators are chosen by the network leaders, which makes PoA useful solely for private blockchains. It is used by VeChain Thor, Microsoft Azure, and others. Pros of such an algorithm are high transaction speed, scalability, moderate cost of network maintenance. Cons are the rejection of decentralization and the possible malicious behavior of network participants that is almost impossible to prevent.

6. Proof of Capacity (PoC)

Validators working with Proof of Capacity consensus algorithms invest their hard drive space instead of expensive computation equipment or burning coins. The more means of checking the hard drive space the validators control, the more likely they are to mine the next block and receive a reward. Using storage instead of ASICs, PoC blockchains are much more energy-efficient. Projects like Filecoin, Storj, and Burstcoin are based on PoC. The apparent advantage of this approach is energy efficiency, while the disadvantage is inadequate security due to vulnerability to attacks.

There are also other consensus algorithms, such as:

• Proof of Activity

• Proof of Weight

• Proof of Importance

• Proof of Participation

• Proof of History

• Leased Proof of Stake

• Proof of Burn

• Practical Byzantine Fault Tolerance

However, at the moment, the use of these can rather be attributed to individual cases and innovations and may become a heading for a separate article.

Let’s summarize

Each of the presented algorithms has its strengths and weaknesses, as well as possible use cases. When viewed in this light, it is reasonable to assume that they do not actually compete with each other. It is important to choose one of them according to the requirements of the business network. The PoW implementation stands out due to its security and decentralization. PoW is an excellent consensus mechanism for cryptocurrencies. However, it is utterly inappropriate for social networks and blockchain-based games. In the growing blockchain industry, it is essential to continue research to discover new blockchain architectures. New consensus mechanisms will open new options for blockchain technology use overall and cryptocurrencies in particular.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store