6 Feb, 23

The Different Categories of Consensus Algorithms

The Different Categories of Consensus Algorithms
Nathan Lenga

Innovation Lead

Blockchains have revolutionised the way data is stored and transferred through their provision of a secure, decentralised and transparent way to conduct transactions. At the heart of any blockchain system lies its unique consensus algorithm; these functions are responsible for ensuring that all participants in the network can agree on the current state of the network based on prior blocks and that transactions are processed in a secure and efficient manner. This article delves into the inner workings behind many popular and burgeoning consensus algorithms along with their purposes as well as use cases.

Purpose of Consensus Algorithms

In decentralised networks, reaching consensus across validators is crucial to ensure the integrity and security of the blockchain. The purpose of these algorithms is to reach an agreement on the state of the network as it relates to transactions among all participating nodes. Without consensus, the network would be vulnerable to malicious actors and double-spending attacks. An example of this would be a bad actor attempting to manipulate a blockchain by creating fraudulent transactions or altering the history of the blockchain. If an effective algorithm is not used to reach a consensus, users and validators will be unsure which transactions are deemed true, potentially leading to a fork of the chain and the resulting loss of trust in the chain. 

Consensus algorithms are also used to guarantee the efficient and secure transfer of value and information within the network. They enable trustless transactions, whereby parties can interact without the need for a central authority or intermediary that records and verifies all transactions. The ability for blockchains to reach consensus further ensures that once a transaction is recorded, it cannot be altered or tampered with, providing immutability to the network. This is especially important for decentralised applications (dApps) and protocols that rely on the integrity of the network for their functionality and usability. In the absence of consensus algorithms, a decentralised, distributed ledger would not be possible.

Proof of Work (PoW)

Proof of Work is currently the most popular consensus algorithm in the blockchain industry, with market capitalisation of networks utilising PoW equating to just under US$ 500 billion, making up 45% of the total cryptocurrency market capitalisation. It is the consensus mechanism that is used by the first and most well-known blockchain, Bitcoin. PoW functions by requiring network participants, known as miners, to perform a certain amount of computational work in order to validate and compete for the opportunity to propose new blocks of transactions on the blockchain.

The computational work required in PoW can be thought of as solving a complex mathematical puzzle. Miners use their computational power to repeatedly calculate cryptographic functions, known as hash functions, on a block of transactions until a specific target is met. Hash functions are algorithms that take an input of any size and produce a fixed-size output, known as a hash or digest, that is unique to the input. The deterministic nature of hash functions makes it easy to detect changes to the input and is crucial for maintaining the integrity and security of any blockchain. There are many hash functions used by PoW blockchains; for instance, Bitcoin utilises SHA-256. The first miner to solve the puzzle gets to propose the next block and earn a reward, typically in the form of cryptocurrency. This process is known as mining, and it is the key component of PoW consensus.

An analogy for PoW is a puzzle competition. Miners are like participants in a puzzle competition, solving complex mathematical puzzles to propose the next block of transactions on the blockchain. The first miner to solve the puzzle gets to propose the block and earn a reward in the blockchain’s native coin, similar to how a winner in a competition gets a prize. Just like in a competition, the puzzles become increasingly difficult as more miners join the network, making it more challenging for any single miner to propose a block and earn a reward.

Source: Dall-E

Miners sacrifice their computational power when seeking to solve a mathematical question in each block to earn a reward; this process is known as burning computational power. This ensures that the blockchain remains secure and tamper-proof, as it becomes increasingly difficult for malicious actors to compromise the network as it grows in size. Once the cryptographic problem has been solved and the block proposed, it is distributed and stored by all miners as part of the blockchain’s history, ensuring consensus between miners relating to the transactions has taken place. This guarantees that every miner has a copy of the entire transaction history of the blockchain, making it difficult for bad actors to tamper with the history without being detected.

Proof of Stake (PoS)

Proof of Stake is a consensus algorithm that aims to address energy consumption and scalability issues associated with Proof of Work (PoW). Instead of using computational power, validators put their own cryptocurrency as collateral to be put in the running to propose and validate new blocks of transactions on the blockchain. The more cryptocurrency they stake, the higher the chances of being chosen to propose the next block and the more they stand to lose if they engage in malicious behaviour. Hash functions are still used in PoS to ensure the integrity and security of the network; all transaction data is hashed before being immutably stored on the blockchain. This includes making it difficult for malicious actors to compromise the network and ensuring that it can continue to operate even in the face of attacks. 

Unlike the fast-paced nature of PoW blockchains where miners battle to correctly guess the cryptographic puzzle, PoS networks often utilise a pseudo-random function to arbitrarily select the validator that will propose the subsequent block. This results in participation in PoS blockchains being significantly cheaper given the absence of the constant energy expense for miners. As such, these networks have become more popular, evidenced by Ethereum‘s shift in consensus algorithms from PoW to PoS in September. Presently, with a combined market capitalisation of around US$300 million, PoS chains contribute 28.5% of the total cryptocurrency market cap.

An analogy for PoS is a lottery, where participants buy tickets with their cryptocurrency. The more tickets a participant has, the higher the chances of winning. However, if a participant is found to cheat, they will lose their tickets as a penalty, similar to how validators can be “slashed” for malicious activity. These events can include double signing, equivocation, and censorship. These events will lead to the validator losing a portion of their stake, which acts as a deterrent against malicious behaviour. This slashing possibility provides a negative consequence to validators looking to cheat the network – much like the energy expense when mining blocks; if miners seek to act maliciously, they will not receive the proposer reward, despite the computation contributions.

Source: Dall-E

Other Consensus Algorithms

Whilst PoW and PoS are undoubtedly the most popular consensus algorithms, given the ongoing innovation in the blockchain and cryptography industries, many other solutions to reaching consensus have been proposed. 

Delayed Proof of Work (dPoW)

Delayed Proof of Work (dPoW) is a consensus algorithm that merges the features of both Proof of Work PoW and PoS. It was first introduced and implemented by the Komodo Platform, which uses dPoW as its mechanism to reach consensus. This algorithm functions by first mining new blocks using miners and energy contributions, just like in a traditional PoW blockchain. However, once a block is mined, it is not immediately added to the main blockchain. Instead, it is added to a secondary blockchain, known as a notary chain, which uses a different consensus mechanism, typically PoS. The notary chain then periodically adds the blocks from the PoW chain to the main chain, providing an extra layer of security and immutability. In this way, the notary chain acts as a checkpoint, providing an unchangeable record of the state of the PoW chain. This increases the difficulty of altering the history of the PoW as any changes would be ascertained by the notary chain given the existence of a discrepancy between the two ledgers.

dPoW also allows for integrating different blockchains, enabling cross-chain transactions and sharing security between various networks. This feature is particularly useful for smaller PoW chains that may not have enough hashing power to secure their network adequately. By connecting to a more secure PoS chain, these smaller PoW chains can benefit from the added security provided by the notary chain. Additionally, by having a notary chain, it allows for the interoperability between different blockchain platforms and cross-chain atomic swaps.

Delegated Proof of Stake (dPoS)

Delegated Proof of Stake (DPoS) is a consensus algorithm that is directly based on the principles of Proof of Stake (PoS). In DPoS, token holders act as the native network participants, using their own cryptocurrency to vote for a limited number of validators, known as delegates. These delegates are responsible for reaching a consensus by proposing, disseminating and validating new blocks on a blockchain. In DPoS, the process of validating transactions is done by a limited number of elected delegates, rather than all token holders. These delegates are elected by the token holders, who use their tokens as a vote. The more tokens a delegate has, the higher the chances of being elected as a validator. For this reason, DPoS brings along many centralisation risks given the barriers to entry for becoming a validator. Accordingly, few chains leverage this consensus algorithm, one example being the EOS network.

DPoS aims to address some of the scalability issues associated with traditional PoS. By limiting the number of validators, DPoS blockchains can process transactions at a faster rate than traditional PoS. Additionally, DPoS also provides a more democratic way of reaching consensus, as token holders have the power to vote for their preferred delegates. Nonetheless, similar to PoS, users delegating their tokens to certain individuals bear the risk that the delegate they selected are slashed. For instance, if a delegate is found to have double signed, it means they have proposed the same block to different parts of the network, this can be seen as an attempt to create conflicting versions of the blockchain and will lead to their stake being slashed. Clearly, slashing is a critical mechanism in DPoS, as it ensures that delegates have a financial incentive to act in the best interest of the network. As a delegate’s stake is at risk, along with their voters, they have a strong incentive to follow the rules and act honestly

An analogy for DPoS could be a voting system for a parliamentary system, where the populace are the token holders and the electorates are the delegates. Individuals in society use their votes to elect representatives who will reflect their values and views in the parliament when making decisions on their behalf. In DPoS, the elected delegates have the power to validate transactions on the blockchain.

consensus algorithms
Source: Dall-E

Proof of Authority (PoA)

Proof of Authority (PoA) is an algorithm that leverages a set of pre-approved, known and reputable identities or validators to reach consensus on the blockchain. In PoA, network participants, known as validators, must prove their identity and reputation in order to propose and validate new blocks of transactions on the blockchain. In this sense, validators are pre-approved and vetted by the network, and must meet certain requirements to maintain their status as validators. This includes maintaining their reputation, disclosing their identity, and adhering to a strict set of rules and guidelines. Blockchains like VeChain which have a small population of validators securing the chain utilise the PoA consensus algorithm.

PoA is a suitable consensus algorithm for permissioned networks, where the network participants are known and trusted, and the network requires a high degree of security and efficiency. Further, this consensus function is frequently used by private or consortium blockchains where the participants are known and trusted given the need for faster transaction processing and lower latency whereby the number of validators is limited. PoA is also more energy-efficient compared to PoW as it doesn’t require computational power to validate transactions, and it is also more secure than PoS as it is based on identity rather than just holding tokens.

Proof of History (PoH)

Proof of History (PoH) is a consensus mechanism that makes use of cryptographic methods to establish the veracity of events that have occurred at a certain point in time. In PoH, validators must create a cryptographic commitment of a specific event such as the current state of a database, before they are able to participate in the network by proposing and attesting to blocks. This consensus mechanism was developed and is currently being leveraged by the Solana blockchain. 

The process of creating a cryptographic commitment involves taking a hash of the current state of the database and including it in the next block that is mined. This creates a chronological chain of hashes that can be used to prove that a certain event occurred at a specific point in time. These hashes are stored on the blockchain to act as a reference point, or history, that can confirm the legitimacy of transactions that occur in the network’s future. Furthermore, another key feature of PoH is that it allows for the efficient, cost-effective and secure verification of historical data, which can be particularly useful in a variety of industries such as supply chain management and financial services.

Proof of Burn (PoB)

Proof of Burn (PoB) is a consensus algorithm that utilises the act of “burning”, that is, destroying a certain amount of cryptocurrency as a way to achieve consensus on the blockchain. In PoB, network participants, known as “miners,” must prove that they have burned a certain amount of cryptocurrency to propose and validate new blocks of transactions on the blockchain. The process of burning cryptocurrency involves sending it to an unspendable address, effectively making it unusable and removing it from circulation. By burning their own cryptocurrency, miners demonstrate a long-term commitment to the security and integrity of the network and subsequently become involved with reaching consensus to earn rewards.

Conclusion

Ultimately, consensus algorithms are the backbone of any blockchain network, allowing for the existence of a decentralised, distributed ledger that does not rely on monolithic, centralised servers. They ensure that all participants in the network can navigate towards a common goal, and that transactions are processed in a secure and efficient manner. While many consensus algorithms were discussed in this article, there are even more in use within the blockchain space; the choice of which one to use will depend on the specific purpose of a given blockchain network. As this technology and the underlying cryptography continues to evolve, we can expect to see new and improved consensus algorithms emerge that offer increased scalability, security and decentralisation.

DISCLAIMER

Zerocap Pty Ltd carries out regulated and unregulated activities.

Spot crypto-asset services and products offered by Zerocap are not regulated by ASIC. Zerocap Pty Ltd is registered with AUSTRAC as a DCE (digital currency exchange) service provider (DCE100635539-001).

Regulated services and products include structured products (derivatives) and funds (managed investment schemes) are available to Wholesale Clients only as per Sections 761GA and 708(10) of the Corporations Act 2001 (Cth) (Sophisticated/Wholesale Client). To serve these products, Zerocap Pty Ltd is a Corporate Authorised Representative (CAR: 001289130) of AFSL 340799

All material in this website is intended for illustrative purposes and general information only. It does not constitute financial advice nor does it take into account your investment objectives, financial situation or particular needs. You should consider the information in light of your objectives, financial situation and needs before making any decision about whether to acquire or dispose of any digital asset. Investments in digital assets can be risky and you may lose your investment. Past performance is no indication of future performance.

FAQs

What is the role of consensus algorithms in blockchain systems?

Consensus algorithms are crucial in decentralized networks to ensure the integrity and security of the blockchain. They enable trustless transactions, where parties can interact without the need for a central authority or intermediary that records and verifies all transactions.

How does Proof of Work (PoW) consensus algorithm work?

PoW functions by requiring network participants, known as miners, to perform a certain amount of computational work in order to validate and compete for the opportunity to propose new blocks of transactions on the blockchain. The first miner to solve a complex mathematical puzzle gets to propose the next block and earn a reward, typically in the form of cryptocurrency.

What is the difference between Proof of Stake (PoS) and Delegated Proof of Stake (dPoS)?

In PoS, validators put their own cryptocurrency as collateral to be put in the running to propose and validate new blocks of transactions on the blockchain. In contrast, DPoS is a consensus algorithm where token holders act as the native network participants, using their own cryptocurrency to vote for a limited number of validators, known as delegates. These delegates are responsible for reaching a consensus by proposing, disseminating, and validating new blocks on a blockchain.

What is Proof of Authority (PoA) consensus algorithm?

PoA is an algorithm that leverages a set of pre-approved, known, and reputable identities or validators to reach consensus on the blockchain. Validators must prove their identity and reputation in order to propose and validate new blocks of transactions on the blockchain.

What is unique about Proof of History (PoH) consensus mechanism?

PoH is a consensus mechanism that makes use of cryptographic methods to establish the veracity of events that have occurred at a certain point in time. Validators must create a cryptographic commitment of a specific event such as the current state of a database, before they are able to participate in the network by proposing and attesting to blocks. This consensus mechanism was developed and is currently being leveraged by the Solana blockchain.

Like this article? Share
Latest Insights
Weekly Crypto Market Wrap: 23rd December 2024

Zerocap is a market-leading digital asset firm, providing trading, liquidity and custody to forward-thinking institutions and investors globally. To learn more, contact the team at

6 Feb, 23

What are Liquidity Providers in Crypto

In the rapidly evolving world of cryptocurrencies, liquidity is a fundamental component that ensures the seamless exchange of digital assets. Liquidity providers (LPs) play a

Weekly Crypto Market Wrap: 16th December 2024

Zerocap is a market-leading digital asset firm, providing trading, liquidity and custody to forward-thinking institutions and investors globally. To learn more, contact the team at

Receive Our Insights

Subscribe to receive our publications in newsletter format — the best way to stay informed about crypto asset market trends and topics.

Want to see how bitcoin and other digital assets fit into your portfolio?

Contact Us
Ready to sign up?
Create an Account