Consensus mechanism in blockchain?

Posted on

In a blockchain, a consensus mechanism blockchain is a protocol through which a network of computers reaches agreement on the state of the blockchain. I believe it’s necessary to establish a consensus mechanism because different computers in the network might possess varying versions of the blockchain. The specific way in which the network reaches consensus can vary depending on the blockchain in question. Some common consensus mechanisms include proof of work, proof of stake, and delegated proof of stake. In this article I am going to talk about the different mechanisms you can see.

Here are some common types of consensus mechanisms:

  1. Proof of Work (PoW): In a PoW system, miners compete to solve a complex mathematical problem, and the first one to solve it gets to add a new block to the blockchain and receive a reward. This process consumes a lot of energy, as miners have to perform a large number of calculations in order to find a solution.
  2. Proof of Stake (PoS): In a PoS system, the creator of a new block is chosen in a deterministic way, depending on their stake (how many coins they hold) in the network. This means that the more coins a miner holds, the more likely they are to create a new block and receive a reward.
  3. Delegated Proof of Stake (DPoS): In a DPoS system, token holders can vote for “delegates” who are responsible for creating new blocks and adding them to the blockchain. The delegates are chosen based on the number of votes they receive, and they receive a reward for their work.
  4. Proof of authority: In proof of authority, a set of pre-selected nodes (called “validators”) are responsible for creating new blocks and maintaining the integrity of the blockchain. This is often used in private or consortium blockchains, where the validators are known and trusted entities.

Proof of Work Consensus (PoW)

Proof of Work (PoW) is a consensus mechanism used by many blockchain networks such as Bitcoin, before Ethereum (you can check our post about the merge of Ethereum as now uses PoS which I will be talking later), Litecoin, and others. The main idea behind PoW is that it allows for distributed consensus by making it computationally expensive for a malicious actor to take control of the network. In this consensus what it needs is a proof that the network invest certain amount of work.

Just for reference I will be taking the example of the Bitcoin consensus.

In PoW-based networks, a group of users called “miners” compete to solve a complex mathematical puzzle. The miner who solves the puzzle first adds the next block to the blockchain and receives a certain number of coins from the cryptocurrency that the blockchain is based on as a reward.

Miners need to solve a “hash puzzle” by finding a specific number called a “nonce” that, when combined with the data in the block and a cryptographic hash function, produces a specific output. This process is computationally expensive and consumes a lot of energy, making it difficult for a single miner or group of miners to control more than 50% of the mining power (also known as the “hashrate” ) and take over the network.

Benefits

One of the main benefits of PoW is that it provides an inherent mechanism for security, as it makes it difficult and expensive for a malicious actor to take control of the network. However, PoW also has some downsides, such as high energy consumption and the potential for centralization of mining power.

Proof of Stake Consensus (PoS)

Some blockchain networks use Proof of Stake (PoS) as an alternative consensus mechanism to Proof of Work (PoW). Unlike PoW, where miners compete to solve complex mathematical puzzles to add new blocks and earn rewards, PoS networks choose the creator of a new block deterministically based on their stake (ownership) in the network. In a PoS-based network, a user’s chances of creating a new block and receiving the block reward increase with the number of coins they hold.

A PoS-based network uses validators instead of miners to create new blocks. In a PoS-based network, validators create new blocks through a process called “staking” where they must lock up some of their coins as a stake, demonstrating their commitment to the network’s security. The validators’ selection is based on their stake in the network.

See also  Crypto Year 2023 Summary

Benefits

The main benefit of PoS over PoW is that it is less energy-intensive, as it doesn’t require miners to perform complex computations to create new blocks. This makes it more environmentally friendly and cost-effective.

However, PoS also has some downsides, such as the risk of a “nothing at stake” problem, where validators have no economic penalties for supporting multiple chains, and the risk of centralization through concentration of wealth.

Delegated Proof of Stake Consensus (DPoS)

Delegated Proof of Stake (DPoS) is a variation of the Proof of Stake (PoS) consensus mechanism. .

DPoS-based networks also use a deterministic method to select the creator of a new block, which depends on their stake or ownership in the network, similar to PoS. However, in DPoS, instead of choosing validators through a random process, the network’s stakeholders vote for a group of delegates, who are responsible for creating new blocks and maintaining the network.

Delegates in a PoS-based system are elected by stakeholders, who have the power to vote them out if they fail to perform adequately. To become a delegate, an individual or organization must win the election and be willing to operate a node and actively participate in the network.

Many consider DPoS to be a more democratic version of PoS since it lets all stakeholders participate in the network’s governance and operations. It also has faster block times and lower transaction fees, since only a small number of trusted delegates are responsible for creating new blocks.

Benefits

One of the main benefits of DPoS over PoW is that it is also less energy-intensive, as it doesn’t require miners to perform complex computations to create new blocks. It is also more resistant to centralization than PoW, as it is less likely that a small number of large players can control the majority of the network’s hashrate.

However, like PoS, DPoS also has some downsides, such as the risk of centralization through concentration of wealth and the potential for collusion among delegates. It also requires a certain level of voter turnout to ensure the integrity of the network, otherwise, the network may become vulnerable to a 51% attack.

Proof of Authority Consensus (PoA)

PoA (Proof of Authority) is a consensus mechanism that blockchain networks use as an alternative to PoW and PoS. In private or consortium networks, known and trusted participants use it. A group of authorized individuals, known as validators or authorities, maintains the network and creates new blocks based on their identity, rather than their computational power or stake in the network. The network’s stakeholders pre-select these validators, and they must undergo identity verification before participating.

Basics

PoA enables a more efficient and secure network by relying on trusted validators selected by the network’s stakeholders, eliminating the need for complex computations or large stake amounts to secure the network.

One of the main benefits of PoA is that it is more efficient and faster than PoW, as it doesn’t require miners to perform complex computations to create new blocks. It is also more resistant to centralization, as it is less likely that a small number of large players can control the majority of the network.

However, PoA also has some downsides, such as the reliance on a small group of trusted validators, which can create a single point of failure, and the potential for collusion among validators. In addition, validators play a critical role in PoA, and the consensus mechanism is generally used in private or consortium blockchain networks where the participants are familiar with and trust one another.

The main difference between PoA against PoS is that PoA is a consensus algorithm that uses a set of trusted and known validators, while PoS is a consensus algorithm that uses validators chosen based on the amount of cryptocurrency they hold. PoA is more suitable for private blockchain networks and PoS is more suitable for public blockchain networks.

Posted in Bitcoin, Blockchain, Ethereum, TechnologiesTagged

Martin Liguori
linkedin logo
twitter logo
instagram logo
By Martin Liguori
I have been working on IT for more than 20 years. Engineer by profession graduated from the Catholic University of Uruguay, and I believe that teamwork is one of the most important factors in any project and/or organization. I consider having the knowledge both developing software and leading work teams and being able to achieve their autonomy. I consider myself a pro-active, dynamic and passionate person for generating disruptive technological solutions in order to improve people's quality of life. I have helped companies achieve much more revenue through the application of decentralized disruptive technologies, being a specialist in these technologies. If you want to know more details about my educational or professional journey, I invite you to review the rest of my profile or contact me at martin@infuy.com