Consensus Mechanisms in Crypto

Consensus Mechanisms in Crypto

Table of Content

Introduction

Before diving into consensus mechanisms, let's understand what Consensus means. According to Google, Consensus refers to a general agreement being reached amongst a group.

Blockchain is a technology that allows for the creation of a secure and transparent record-keeping system. It uses a distributed ledger, which means that the record of transactions is stored on multiple computers or nodes in a network rather than being controlled by a single central authority.

To effectively manage and operate a decentralized system like blockchain, all participants must agree about the system's current state and the ownership of assets.

Types of Consensus Mechanisms

Proof of Work

Proof-of-work or PoW is the first type of consensus mechanism popularly used by the Bitcoin network to achieve distributed Consensus. In PoW, miners compete to solve a mathematical puzzle to validate transactions and create new blocks on the blockchain. The first miner to solve the puzzle adds the new block to the chain and receives a reward, typically in the form of a new batch of coins or tokens.

PoW has been used to secure many of the largest and most well-known blockchain networks, including Bitcoin and, previously, Ethereum. One of the main advantages of PoW is its robust security. The high computational power requirements keep the network secure since you would need 51% of the network's computational power to defraud the chain. However, PoW is also energy-intensive, as miners must use a large amount of electricity to power their computers and perform the computations required to solve the puzzle. It can lead to high costs and a large carbon footprint. Additionally, PoW can be less scalable than other consensus mechanisms, as the time required to process transactions and create new blocks may increase as the number of transactions on the network increases.

Proof of Work's mechanism visualized. Source: Medium

Proof of Stake

Proof-of-stake or PoS is a consensus mechanism used by some blockchain networks to achieve distributed Consensus. In PoS, the validators of transactions and creators of new blocks are chosen based on their stake in the network rather than their computational power, like in proof-of-work.

Validators must hold a certain number of coins or tokens on the network, known as their "stake." This process of locking their tokens to provide security to the network is known as staking. We have covered this in brief here.

PoS has several advantages over PoW, including greater energy efficiency, as it does not require miners to perform computationally intensive work to validate transactions and create new blocks. PoS can also be more scalable, as it allows for higher transaction throughput and can handle a more significant number of transactions per second. However, PoS can lead to centralization, as those with the most coins or tokens will have the most excellent chances of being selected to validate transactions and create new blocks. It can give more significant stakeholders an unfair advantage and leads to a lack of decentralization.

A few blockchains that use PoS mechanism are Solana, Ethereum and Polkadot

Proof of Stake mechanism visualized. Source: Ledger

Delegated Proof of Stake

Delegated Proof of Stake or DPoS is a consensus algorithm specific blockchain networks use to achieve distributed agreement. In DPoS, token holders can delegate their voting power to a group of "delegates" or "witnesses," who are responsible for verifying transactions and adding new blocks to the blockchain. Token holders select these delegates through a voting process, and the strength of each vote is based on the number of tokens held by the voter. DPoS systems usually have a set number of delegates, and the top delegates with the most votes are responsible for validating transactions and adding new blocks to the blockchain. These delegates also maintain the network's security and integrity and are compensated for their work with a portion of the transaction fees and new tokens created on the network.

DPoS aims to be more efficient and faster than Proof of Work and Proof of Stake, as it requires fewer resources to reach an agreement and add new blocks to the chain. It is more democratic than Proof of Stake, allowing all token holders to participate in the network's governance and select the delegates who represent them.

A few networks that use this mechanism are Eos, Steem, and Tron.

Delegated Proof of Stake mechanism visualized. Source: Medium

Practical Byzantine Fault Tolerance [PBFT]

Practical Byzantine Fault Tolerance or PBFT is a consensus algorithm used to achieve distributed Consensus in distributed systems, particularly in blockchain networks. It was developed to handle the problem of Byzantine fault tolerance, which refers to a system's ability to function correctly even if some of its components fail or behave incorrectly. In PBFT, a group of nodes called "replicas" works together to reach a consensus on the system's state. Each replica maintains a copy of the system's state, and they communicate with each other to reach an agreement on the state. PBFT uses a leader-based approach, where one of the replicas is selected as the leader and is responsible for proposing changes to the system's state. The other replicas then verify the proposed changes and vote on whether to accept or reject them. If most replicas agree on the proposed changes, they are applied to the system's state.

PBFT is designed to be highly fault-tolerant, as it can continue operating even if some replicas fail or misbehave. It is also efficient, requiring relatively few messages between the replicas to reach a consensus. PBFT is commonly used in distributed systems, including blockchain networks, to achieve distributed Consensus reliably and efficiently.

Some networks that use this mechanism or variations of it are Ripple, Tendermint, and Hedera (or Hashgraph).

PBFT mechanism visualized. Source: Bitnovo

Proof of Authority

Proof of Authority or PoA is a consensus algorithm used by some blockchain networks to reach distributed Consensus. It is an alternative to PoW and PoS consensus algorithms. In a PoA system, nodes in the network are chosen based on their reputation and trustworthiness rather than their computing power (as in PoW) or the number of tokens they hold (as in PoS). These nodes, called "validators," are responsible for verifying transactions and adding new blocks to the blockchain.

PoA is designed to be more efficient and faster than PoW and PoS, as it requires fewer resources to reach a consensus and add new blocks to the chain. It is also more secure, as validators are carefully chosen and expected to act in the network's best interests. PoA is well-suited for use in private or consortium blockchain networks, where participants are known and trusted, and the focus is on efficiency and security rather than decentralization.

Several networks using the PoA Mechanism Ethereum Classic, VeChain, and a few Ethereum Test networks like pre-merge Goerli, Rinkeby, and Kovan.

Proof of Authority mechanism visualized. Source: Nadcab

Proof of Activity

Proof of Activity (Also referred to as PoA however we'll be denoting it as PoAc to differentiate it from Proof of Authority) is a consensus algorithm some blockchain networks use to reach distributed Consensus. It is a combination of PoW and PoS consensus algorithms, combining the security of PoW with the energy efficiency of PoS. In a PoAc system, nodes in the network must perform PoW and PoS tasks to verify transactions and add new blocks to the blockchain. The PoW tasks involve solving complex mathematical problems, while the PoS tasks involve holding and staking a certain amount of the network's native cryptocurrency.

PoAc aims to improve the weaknesses of both PoW and PoS, combining the security of PoW with the energy efficiency of PoS. It is also intended to be more decentralized than PoS, as it allows a broader range of participants to contribute to the security and integrity of the network. However, PoAc systems can still be vulnerable to certain types of attacks, such as "nothing at stake" attacks, which can undermine the network's security. Only a few blockchain networks use the PoAc consensus mechanism, a relatively new and experimental approach.

Some networks that use the Proof of Activity mechanism are Decred, and Espers.

Pros and Cons of Consensus Mechanisms:

On the whole, Consensus Mechanisms do achieve decentralization across networks; there are a few cons them that are worth considering:

  1. Centralization: While trying to achieve decentralized networks, a few of these mechanisms tend to lead to the concentration of power in the hands of a small group of entities. PoW and PoS are the most susceptible to this, thus undermining its decentralization.
  2. Energy Consumption: PoW networks require high computational power, leading to high energy consumption, which negatively impacts the environment.
  3. Vulnerability to attacks: Some mechanisms are susceptible to attacks, such as the 51% attack, Sybil attack, and "nothing at stake" attack. We'll be covering these attacks in the following article.

Now that we've covered the pros and cons on a broader level let's dive into each consensus mechanism and understand its pros and cons.

Proof of Work (PoW)

Pros

  1. While achieving decentralized networks, the PoW mechanism helps make the network more secure due to its high resistance to 51% attack. Any such attack would require high computational and power costs making it difficult for an attacker to pull off.
  2. PoW, like other mechanisms, allows for a permissionless network without having to depend upon any centralized authority for permissions regarding mining.

Cons

  1. As stated above, it has a higher energy consumption than other mechanisms due to the requirement of solving complex calculations.
  2. The high computational and energy costs also result in a high barrier of entry, making it difficult for small-scale miners to participate.
  3. Finally, this mechanism is generally slow due to the high requirements of solving a complex mathematical problem, making it difficult to quickly process large numbers of transactions.

Proof of Stake (PoS)

Pros

  1. Unlike the PoW mechanism, the PoS mechanism only requires a fraction of the energy to validate transactions and create new blocks making it energy efficient.
  2. It also has a low barrier to entry, given you don't require any considerable upfront capital and can start farming or mining rewards with small capital. It makes it easier to participate, unlike PoW networks.
  3. Unlike Bitcoin, which follows a PoW mechanism and has a transaction speed of only 3-7 TPS or Txn per second, PoS networks such as Solana and Ethereum have a transaction speed greater than 10,000 TPS. It also helps in solving any scalability issues with PoW mechanisms.

Cons

  1. Apart from being vulnerable to "nothing at stake" attacks and being susceptible to centralization due to fewer farmers with huge capital taking control of the network, there are also some disadvantages of the PoS mechanism. Firstly, blockchain behavior depends on the stakeholders, and there might come the point when they act in their interest rather than serving the needs of the whole network.
  2. Secondly, there is a lack of reward incentives in these mechanisms. Since there isn't any difficulty in staking your tokens, the rewards are significantly less than PoW mechanisms that require solving complex mathematical problems. It can, in turn, discourage participation and make it more challenging to secure the network.

Delegate Proof of Stake (DPoS)

Pros

  1. DPoS enables faster transaction processing and higher transaction capacity than other consensus mechanisms because it uses a smaller number of delegates, usually fewer than the number of miners in PoW or PoS systems. It also helps in increasing the scalability of any network.
  2. As the name suggests, DPoS networks allow the stakeholders to participate in the governance of the network and delegate their voting power to the delegate of their choice. It leads to more effective decision-making and responsive network and helps build a more diverse network.
  3. As opposed to PoS or PoW mechanisms, DPoS helps reduce the risk of centralization as delegates are mainly elected by the stakeholders and can be replaced if they don't act in the network's best interest.

Cons

  1. While it does help in reducing the risk of centralization, giving power to a few delegates makes it easier to sabotage the network. It is also known as collusion, a group of people teaming up to act for their interests. It can also lead to stagnation or inactivity where the delegates responsible for validating the transactions must actively participate in the network, thus slowing down the network.
  2. Like PoS networks, DPoS networks have lower rewards than PoW networks for validating transactions and creating blocks. It might discourage participation.

Proof of Authority(PoA)

Pros

  1. Like PoS and DPoS networks, PoA allows for faster processing speed as the number of validators required is much smaller than PoW networks. It also makes it more scalable compared to PoW networks.
  2. PoA allows a permission network, as only pre-approved validators or authorities can participate in the consensus process. It can help in supply chain management cases where there are known responsible authorities for participating in the consensus process. It also helps improve the governance process as the authorized entities' identities are known and can be held accountable for their actions.

Cons

  1. Like the DPoS network, the PoA network is also susceptible to collusion, making it highly dependent on validator behavior.
  2. It also has a high barrier of entry as only the pre-approved validators are allowed to participate in the consensus process, making it harder for new entities to get involved. It also brings a lack of diversity in the network.

Practical Byzantine Fault Tolerance (PBFT)

Pros

  1. Similar to the networks mentioned earlier, PBFT also allows for a fast processing speed allowing scalability. It is primarily because of how the network functions properly, even wh en a few nodes fail.
  2. Since PBFT can operate normally even if some nodes fail or become unavailable, it makes it highly available. The resistance towards Byzantine failures and detection and exclusion of faulty nodes from the network makes the network more secure than other mechanisms.

Cons

  1. Similar to PoA, it has a group of pre-approved entities running the nodes leading to a lack of decentralization and dependence on the entity's behavior.
  2. It also has a high barrier to entry, like PoA networks, as only pre-approved nodes are allowed to participate in the consensus process, making it lack diversity and hard to enter.
  3. While it is more scalable in terms of transaction speed, it can only scale up to a certain extent. In PBFT, we have each node communicating with every other node in the network. As the number of nodes increases, communicating with every other node in the network becomes more resource intensive and challenging. It can lead to a slower transaction time, thus making its speed slower.

Proof of Activity (PoAc)

Pros

  1. Like the mechanisms mentioned above, PoAc has a lower energy consumption than PoW. It is also more scalable and secure relative to PoW networks.
  2. PoAc combines PoW and PoS, offering a balance between the security provided by PoW and the scalability and energy efficiency provided by PoS.

Cons

  1. Since it's a combination of PoS and PoW mechanisms, making it is more complex than PoS or PoA mechanisms.
  2. As the rewards given are given in the ratio of the number of tokens staked, the rewards are less than the PoW mechanism, making participation discouraging.
  3. Lastly, like PoW, it has a high cost of entry due to the computational power required to solve complex problems.

Conclusion

In conclusion, consensus mechanisms play a vital role in the functioning of blockchain networks and are essential for achieving distributed Consensus. We covered several types of consensus mechanisms in this blog, including proof of work, proof of stake, delegated proof of stake, proof of authority, practical Byzantine fault tolerance (PBFT), and proof of activity, each with its own set of pros and cons.

Selecting a consensus mechanism can significantly impact a blockchain network's security, scalability, and energy efficiency. Users must understand the various consensus mechanisms and their advantages and disadvantages to make educated choices. As the blockchain ecosystem grows and changes, people may create new consensus mechanisms or modify existing ones. We still need to cover many more consensus mechanisms in this blog, as a group of entities or people can reach a consensus in many ways.

Overall, selecting a consensus mechanism is a crucial decision that can have long-term impacts on the success and sustainability of a blockchain network. It is crucial for users and developers to carefully consider the pros and cons of different consensus mechanisms and choose the one that best meets the needs of their specific use case.

Stay Tuned with #GooseAcademy

Website | Twitter | Telegram | Discord | Docs

Disclaimer: The statements, proposals, and details above are informational only, and subject to change. We are in early-stage development and may need to change dates, details, or the project as a whole based on the protocol, team, legal or regulatory needs, or due to developments of Solana/Serum. Nothing above should be construed as financial, legal, or investment advice.