What Is a Consensus Algorithm?
The 6 Top Blockchain Consensus Algorithms Explained
Today we’re going to explore six of the most popular blockchain consensus protocols: Proof of Work (PoW), Proof of Stake (PoS), and Delegated Proof of Stake (DPoS), Proof of Authority (PoA), Proof of Capacity (PoC), and Proof of Reputation (PoR). We’re also going to introduce a new consensus protocol we’re developing at Blockchain Zoo called Proof of Participation (PoP).
If you’ve ever wondered about consensus mechanisms or how they work, this article is for you!
In this article, we will cover:
- Why are blockchain consensus protocols needed?
- How each consensus protocol works
- Pros and cons of each consensus protocol
- Current debates about protocol development
- Examples of projects that have implemented each consensus protocol
Why are blockchain consensus protocols needed?
Cryptocurrencies and blockchains are decentralized networks without a central authority. Decentralization is what enables the unique, desired features (censorship resistance, seizure resistance, trust minimization, etc.). However, decentralization comes at a cost: how do we ensure the network participants agree on the “truth” when no one is ”in charge?”
Without a central authority, trust is initiated through “consensus protocols.” In a given network, human referees are replaced by algorithms (protocols).
You can think of protocols as a set of rules that incentivize actors to generate a record of the truth, including but not limited to which funds belong to which addresses in a public based ledger system that allows everyone else to verify the truth. When this agreement of the truth is verified, the consensus is created without a central authority.
Before we get into specific consensus algorithms, it’s important first to understand the “scalability trilemma.” (scalability tradeoff)
Blockchain systems can be evaluated along three dimensions:
Under most circumstances, all three properties are desirable. However, it’s not that simple. Blockchains easily achieve high levels of two of these three properties but always at the cost of the third.
For example: Bitcoin uses Proof of Work (PoW), which has high levels of decentralization and security, but scalability is limited.
Depending on the consensus protocol you choose, you can alter the balance of these three properties to maximize your desired outcome.
Each mechanism has the same goal of reaching consensus in the network, but they go about it in very different ways.
Consensus Algorithms in Context
Over 90% of the cryptocurrency market cap is running on the main three consensus algorithms: PoW, PoS, and DPoS. However, it’s important that technologists continue innovating in the space.
In this article, we’re also going to examine four other consensus algorithms. Although they have not been adopted by many projects, they are very interesting to explore and may play a big role in our future.
Proof of Work (PoW)
A “Proof of Work” is a piece of data which is difficult (costly, time-consuming) to produce but easy for others to verify. PoW based blockchains leverage specialized computers (called miners) which consume energy resources in order to perform accounting and security services for the network. Miners are paid in newly minted coins in exchange for their services.
PoW seeks to ensure that attacking the network is prohibitively expensive. There is no way to “fake the work,” as real resources must be consumed in order to change the ledger. From a game theory perspective, Bitcoin’s implementation of PoW is a very elegant balance of incentives. Humans are driven by incentives.
The idea of PoW was originally published by Cynthia Dwork and Moni Naor in a 1993 paper titled “Pricing via Processing or Combatting Junk Mail.”
However, the term “Proof of Work” wasn’t coined until 1999, when Markus Jakobsson and Ari Juels published a document formalizing PoW:
Adam Back used Pow as a mechanism to prevent email spam with Hashcash. Later, Satoshi Nakamoto, the pseudonymous creator of Bitcoin, modified and repurposed the general concept for the Bitcoin Network.
Examples of PoW based Blockchains:
- Ethereum (Planning to transition to Proof of Stake)
- High Security → a 51% attack is very expensive to maintain
- Longest proven track record (other consensus methods are mostly unproven)
- Fair method of distributing newly minted coins (Cantillon effect)
- Supports Simplified Payment Verification (SPV)
- Limited scalability on layer one→ layer two scaling being explored (i.e.: Lighting Network)
- Costly to maintain → both in capital costs and energy usage
Let’s examine some considerations of PoW
The energy consumption of Bitcoin is high. Does that mean PoW is bad?
It’s true that Bitcoin uses a lot of energy in absolute terms. However, the energy consumption of Bitcoin is a nuanced issue worth exploring.
Just because bitcoin use a lot of energy doesn’t mean it’s “bad.” We would need to compare how much energy is currently being used for our current financial system. Although the number is hard to calculate, it’s safe to assume our current system uses orders of magnitude more resources than bitcoin.
Coinshares released a report estimating that 77% of bitcoin’s energy consumption came from renewable energy sources. They also noted that mining is very competitive, which drives miners to find “stranded” energy assets. In other words, Bitcoin miners are buying energy that no one would otherwise use (wasted energy).
Carlos Domingo argues that Bitcoin is actually more efficient than our current banking network here.
Should there be only one PoW system?
PoW is a very secure way to protect a network, but due to high resource costs and lack of scalability on the base layer, you can argue that we should only have one PoW system. If this is true, then scalability would be addressed by building “layer two solutions” that live on top of the blockchain, such as the Lightning Network. The Lightning Network is only a couple years old and shows some promise. However, it has a long way to go before it’s ready for mass adoption.
Proof of Stake (PoS)
PoS was first officially proposed in 2012 by Sunny King and Scott Nada as an attempt to solve the problem of high energy costs required for Bitcoin mining. PeerCoin was the first blockchain to implement PoS, followed by Blackcoin and NXT.
When exploring PoS, it’s useful to explore mining vs. staking. Rather than using the energy costs of computational work to secure the network (mining), nodes in a PoS system contribute computing resources and “randomly” take turns validating transactions (staking).
In order to prevent cheating, each node must put some tokens at risk (stake), and if they cheat, their tokens are lost. This mechanism for penalizing bad actors is often called “slashing.” In exchange for supporting the network, these “miners/stakers” are paid out in newly minted tokens.
Interestingly, unlike PoW currencies, which can begin with 0 coins, a PoS currency must start with some or all of the tokens already in existence. This makes wide distribution of PoS tokens very challenging which leads to the consolidation of wealth and power (oligarchy). This criticism of PoS does not affect Ethereum as they started as a PoW chain and are only now attempting to transition to PoS. The first 4+ years as a PoW chain enabled a fairly wide distribution of the ETH tokens.
Proof of stake based blockchain examples:
- Ethereum 2.0 (still being built)
- Increased scalability on the base layer (due to compatibility with sharding schemes)
- Potential energy savings over PoW
- Tends to form an oligarchy – “the rich get richer”
- The “nothing at stake” problem
- Cannot support Simplified Payment Verification (SPV)
Let’s examine some considerations of PoS
Ethereum is planning to transition from PoW to PoS
In order for the second-largest blockchain (Ethereum) to succeed as a fully programmable blockchain “state machine” – they believe it’s crucial to leverage PoS. Interestingly, Ethereum 2.0 will be an entirely new blockchain.
This “transition” is not fully designed and, if successful, will take several years to complete. There is a lot of uncertainty on the horizon. However, lots of smart people are dedicating their lives to making this happen. You can learn more about the Ethereum 2.0 specs from their GitHub.
Does PoS provide enough security?
PoS is an endogenous/intrinsic commitment system. Meaning: stakers are risking the currency inside the network in order to validate the same network. By cheating the system, bad actors may lose their staked coins, but theoretically, they could profit in an external, larger way. Compare that to PoW, which requires external energy cost to do the computational work and secure the network.
Is it possible to achieve a high level of security under these conditions?
There are many ways to implement Proof of Stake
Before we can evaluate PoS, it’s important to realize that there are countless ways to design the system. In the last 5 years alone, PoS implementations have diverged down many different paths.
We also see more exotic blockchain implementations such as Tezos, Cardano, and EOS. These are often called “generation 3 blockchains.” They boast more complicated forms of PoS protocols (such as DPoS), which have “on-chain” governance. While they may sound promising at first glance, they are still very experimental.
In fact, we still don’t know if “on-chain” governance is a feature or a bug. As soon as a system implements a governance process into the protocol, it opens the system up for new attack vectors. Why build decentralized systems if they drift into the same political machines we currently use in society?
Delegated Proof of Stake (DPoS)
DPoS is an evolution of PoS and would be considered a relatively new consensus algorithm. Instead of individual nodes being selected randomly to perform validation, the token holder community uses their “stake” to vote on a select number of “trusted” nodes often called delegates. These delegates get paid for their services with freshly minted coins.
DPoS can be compared to representative democracy – participants vote on a trusted representative to secure the network on their behalf. Voters can replace “delegates” if they act against the interest of the majority stakeholders.
Delegated Proof of Stake was originally proposed by Dan Larimer in 2014. You can read some of the early discussions on Bitcointalk.org here.
Examples of DPoS based Blockchains:
- Increased scalability on the base layer (due to fewer validators with more powerful hardware)
- Wider distribution of inflation
- Real-time voting (on-chain governance)
- Less Secure (easier to organize an attack)
- More Centralization
- Witnesses cartels
Relevant discussions being had about DPoS
- Design tradeoffs make DPoS platforms compete in a different niche
The design tradeoffs of DPoS deliberately sacrifice security and decentralization in favor of faster throughput. Compared to Bitcoin, a DPoS blockchain cannot possibly compete for the use case of “decentralized money.” Along the same lines, blockchains like EOS are much better suited to power a decentralized social media or gaming platform. In these examples, it’s reasonable to give up some security/immutability in order to gain some efficiency.
Trending towards centralization/efficiency comes with a risk of making yourself obsolete. If a DPoS chain becomes too centralized, it starts to resemble Amazon Web Services (AWS). Blockchains will never out-compete the efficiencies of AWS. Instead, they must carve out their own niche.
- How do you find the sweet spot for # of delegates?
Bitshares started with around 100 delegates, but this is an arbitrary number. EOS has 21 delegates (called block producers). How do you know the right amount? Luckily shareholders can vote to increase or decrease the # of delegates, which theoretically increases or decreases the decentralization.
Proof of Authority (PoA)
Proof of Authority (PoA) is a reputation-based consensus algorithm that leverages the value of identity and reputation of block validators. In March 2017, a group of Ethereum developers led by Gavin Wood proposed PoA as a solution to the spam attacks on the Ropstein Ethereum test network.
PoA is similar to PoS, except validators stake their reputation instead of staking coins. Trusted nodes/validators are selected by the network leaders, which makes PoA is only useful for private blockchain networks.
Typically, PoA networks rely on a small number of validators, which enables higher throughput on layer one. PoA is generally considered a good option for semi-trusted supply chain management scenarios. Ideally, various entities in a supply chain could maintain their data privacy while still benefiting from a shared network.
Proof of Authority vs. Proof of Stake
“Some consider PoA to be a modified PoS, which leverages identity instead of coins. Due to the decentralized nature of most blockchain networks, PoS is not always suitable for certain businesses and corporations. In contrast, PoA systems may represent a better solution for private blockchains because its performance is considerably higher.”
Examples of PoA based Blockchains:
- Koven Testnet
- VeChain Thor
- Microsoft Azure
- Faster transaction time
- Inexpensive network
- Forgoes decentralization
- Reputation doesn’t systematically prevent malicious behavior
Proof of Capacity (PoC)
Similar to Proof of Work, but instead of computing resources, Proof of Capacity leverages available disk space (storage). This offers a more environmentally-friendly alternative to Proof of Work and is less vulnerable to specialized hardware allowing mining groups to centralize the network.
The concept for PoC was originally formulated by Dziemboawski in 2015 and with a slightly different formal definition by Ateniese in 2014. Although so, people consider Proof of Capacity the same as Proof of Space, which was originally proposed in a 2013 whitepaper.
PoC projects make use of a hashing function called Shabal, which is harder to compute than SHA 256, which is used by Bitcoin. Interestingly, instead of solving for nonces in real-time like is done with Bitcoin, PoC miners solve the hash function ahead of time and stores on the nonces on their hard drive. By using storage instead of computing with ASICS, PoC blockchains are much more energy efficient.
Examples of PoC based Blockchains:
- Energy efficient
- Anyone can be a miner
- Mining device can be used for multiple purposes
- Less secure
- Increased space requirements
- Susceptible to grinding attacks
Proof of Participation (PoP)
Proof of Participation combines a few elements of Proof of Stake and some elements from the Federated consensus mechanisms along with a novel algorithm designed to prove a node is performing useful work for the network.
The PoP protocol maintains a federation of nodes called the “Node Registry.” Anyone can apply to become a node, and the decentralized protocol determines who gets admitted. This is a huge advancement over federated chains like Ripple, where the centralized party determines who can be a node.
Only the nodes in the Node Registry are permitted to create blocks, and each node has roughly the same chance to create the next block in the chain. Nodes must stake tokens to participate, and this staking mechanism is used to prevent Sybil attacks.
PoP is designed to reward a wider base of contributors with new issuance, which should reduce the centralizing forces present in PoS and PoW.
PoP is a new protocol designed in 2019 to counter some of the weaknesses of the current consensus mechanisms. The protocol is currently being developed by our team at Blockchain Zoo, a Gartner-listed blockchain consulting company headquartered in Bali.
Based on the pros and cons of the existing consensus algorithms detailed above, we are working on this novel protocol, which we believe takes the best of each.
Examples of PoP based Blockchains: NA
- More energy efficient than PoW
- Less risk of miner centralization due to open participation and random block producers
- Reduced time for initial block download
- Untested algorithm as it’s brand new
- Relatively unknown which makes bootstrapping adoption a challenge
Prioritized Decentralization over Scalability
Proof of Participation is more scalable than PoW/PoS networks but not quite as scalable as DPoS networks. As part of the scalability trilemma, we decided to prioritize decentralization (more than DPoS networks) at the expense of some scalability. We believe these tradeoffs make for a compelling consensus protocol with many use cases.
Let’s Wrap Up
Protocol design is all about tradeoffs. Each design has its own strengths, weaknesses, and potential use cases. When viewed in this light, it’s reasonable to assume that they aren’t actually competing against each other.
For example, Bitcoin’s implementation of PoW is very secure and decentralized. PoW is a great consensus mechanism for cryptocurrencies. However, it would be a terrible choice for social media on a blockchain.
With an industry as nascent as blockchain, it’s important we continue our research in an effort to discover novel blockchain architectures. New consensus mechanisms will unlock new use cases for blockchain technology. The sky’s the limit.