The consensus mechanism is a component without which a blockchain cannot exist. It powers blockchain ecosystems and keeps them secure. But what other purposes do consensus algorithms serve, and which one is best?
Decentralization, transaction security, and trust between unknown peers — all these features are made possible by the presence of consensus algorithms.
Since the most popular blockchains to date are Bitcoin and Ethereum, you may have heard of the Proof of Work (PoW) consensus model that these two rely on. Although this algorithm is one of the most discussed, it is far from ideal, so it is currently being replaced by more advanced and environmentally friendly mechanisms.
Why do you need to know about the differences between blockchain consensus algorithms? The reason is that these mechanisms are truly the core of blockchain technology and your future platform’s most important performance indicators — such as the security, speed and finality of transactions — will depend on the type of consensus algorithm.
Let’s dive into various algorithms, learn about their strengths and weaknesses, and find out which one will be a good fit for your particular case.
What are consensus mechanisms in blockchain?
A consensus algorithm, also called a consensus mechanism, model, or protocol, is a system that is used to achieve a common agreement about the blockchain’s true state in real time.
In a nutshell, such a system ensures that all nodes of the blockchain network are synchronized, and that transactions are authenticated and secured. Once the nodes agree on the legitimacy of the transaction, it gets approved and then recorded on the blockchain. After that, the block remains there forever.
In addition to guaranteeing the security of the entire blockchain, the consensus algorithm also helps establish trust between strangers in the decentralized network. This is achieved because it is the algorithm that decides which nodes to trust in order to validate and enable transactions.
What types of consensus algorithms are out there?
The most widely used consensus mechanisms are Proof of Work, Proof of Stake, Delegated Proof of Stake, Proof of Authority, and Proof of History. We’ll now look at how they differ from each other, and how they affect the work of blockchain-powered platforms.
Proof of Work (PoW)
Proof of Work is the oldest algorithm, having emerged alongside the very first blockchain created by Satoshi Nakamoto.
This consensus mechanism relies exclusively on miners who act as nodes. They compete to solve complex cryptographic puzzles and the one who does it first receives the right to mine the next block. In addition, the “winner” gets rewarded with newly minted crypto.
The most obvious benefit concerns the miners themselves. Although the puzzles they have to solve are extremely complex and only the first miner “wins”, they still have a chance to outpace others and earn crypto rewards.
Another major advantage is the protection against hacking. Since this consensus model requires a lot of computing power and effort, it is difficult for hackers to alter the system. Even if they try to do so, the cost of equipment, electricity and effort will exceed the profit gained.
Since the Proof of Work consensus makes it almost impossible to alter any block, you can be sure that it maintains the authenticity and traceability of each transaction.
As blockchain technology is getting more advanced, and it’s becoming more difficult to solve a hash, the whole process needs more and more computational power. Consequently, miners have to use specialized hardware that is expensive and consumes a lot of energy.
Just look at this statistic: it takes at least 13 years of regular household electricity to mine only one Bitcoin. When you consider how many miners participate in the race, it’s hard to wrap your head around these figures.
Clearly, then, the PoW protocol is bad for the environment and can be financially costly for miners acting as network validators.
Another problem is that this consensus mechanism is associated with slow transaction speeds. It may take more than ten minutes to validate a block and approve one transaction. Meanwhile, transaction fees are pretty high too.
In addition to Bitcoin and Ethereum, blockchains such as Litecoin, Monero, and Vertcoin also rely on the PoW algorithm.
It is worth noting that Ethereum is currently in the process of moving from Proof of Work to the Proof of Stake consensus model in order to make the blockchain faster, cheaper, and greener.
Ethereum, Litecoin, Bitcoin Cash, Ethereum Classic, Monero, Zcash, Dash, Decred, and Dogecoin are also in the top 10 PoW-based cryptocurrencies by market cap. As it happens, Dogecoin will migrate from PoW to PoS very soon.
Find out how PixelPlex creates fast and secure decentralized applications
Proof of Stake (PoS)
The PoS consensus algorithm is the most popular alternative to the PoW model. This mechanism does not involve mining but it requires you to stake coins to participate in the network.
So, how does Proof of Stake work?
PoS chooses validators randomly, but it takes into account the size of their holdings in crypto. If there is no problem with the transaction, a block is added to the blockchain, and the validator receives network fees for their contribution. However, if a validator proposes to add a block with false data, they face a penalty and, as a result, lose part of their staked assets.
In Proof of Stake, validators don’t need to buy expensive hardware and can simply use their regular PCs. Consequently, more people can afford to become nodes. In addition to this, the more nodes, the stronger the decentralization.
Here comes another advantage — without mining, the consensus process is much more energy-efficient. To understand how environmentally friendly the PoS consensus is, we can compare Proof of Stake vs Proof of Work.
Currently, when Ethereum is running on the PoW model, it consumes 113.01 TWh of electrical energy per year, which is equivalent to the energy usage of the Netherlands. By switching to PoS, its energy consumption will drop by 99.95%.
Proof of Stake also provides faster transaction speeds. For example, Ethereum’s transaction speed averages 15 transactions per second (tps), while PoS-based Flow manages over 1,000 tps and the Avalanche blockchain — more than 4,500 tps.
It’s worth noting that when Ethereum is upgraded and completely migrates to PoS, it’s expected to reach the transaction speed of 100,000 tps.
Flow and Ethereum have more differences than similarities. Learn about them in more detail
Although each PoS-powered blockchain protocol has different rules and conditions, most of them require validators to lock up a minimum amount of crypto for a certain period of time. During this period, no matter what happens to the cryptocurrency — it may drop or skyrocket in price — you will not be able to “unstake” and trade it.
Another problem is that validators with larger staked funds have more weight on the network, so they may have an excessive influence on transaction validation. It also leads to cryptocurrency hoarding.
Since blockchains operating through the PoS algorithm are not as big as Bitcoin and Ethereum yet, it’s possible that we will learn about new vulnerabilities when other networks grow to match the scale of these large blockchains.
Flow, Cardano, Avalanche, Polygon, and Tezos are among blockchains that use the Proof of Stake consensus protocol. These platforms are quite popular in the crypto community as they are designed to be scalable and sustainable.
Some commentators are calling Cardano a sleeping giant or Ethereum killer. At the moment, Cardano processes 250 tps on average and one transaction costs less than $1. It is expected that, after the release of the Hydra scaling solution, the Cardano system will be able to process up to 2 million tps, which is a very high bar.
Polygon and Tezos, for their part, are considered energy-efficient and environmentally friendly blockchains — a big plus.
NBA Top Shot is probably the most popular project powered by the PoS-based Flow blockchain. The platform, which showcases and sells NFT collectibles featuring famous basketball players, has made $961 million in sales to date.
If you are wondering which cryptos are Proof of Stake, some of the most successful ones include Cardano, Avalanche, Cosmos, Qtum, and Celo.
Check out xtingles — an NFT marketplace for ASMR-tists based on the Flow blockchain
Delegated Proof of Stake (DPoS)
The Delegated Proof of Stake algorithm can be considered an enhanced version of the Proof of Stake mechanism.
The concept of staking coins and selecting validators in proportion to their funds is still the same here. The main difference lies in the implementation of the new democratic voting system that has two actors: voters and delegates. The voters are the ones with staked tokens, and the delegates are the ones who are elected by voters to validate transactions.
The delegates’ participation in the voting system is directly related to their reputation. If an elected delegate performs inefficiently or makes a mistake, they are expelled and replaced.
One of the major advantages of the DPoS system is that real-time voting allows for continuous monitoring of network security. Once voters detect malicious activity, they vote out the suspicious delegate right away. Even if the delegate has always acted perfectly, they can be expelled from the network at any time.
As for energy consumption, DPoS is even more energy efficient and affordable than PoS.
The use of Delegated Proof of Stake mechanism also has a positive effect on the speed of transaction confirmation and execution. DPoS-based blockchains conduct from 2,000 to 8,000 transactions per second.
While the DPoS system is praised for its decentralized features and democratic approach, there’s still a chance that the network could be made more centralized. This could happen if the delegates decided to combine their efforts by creating so-called cartels. In this case, transaction verification would rely on a small circle of people, which would make the network biased and vulnerable to malicious actions.
Another issue is related to network security. It’s quite obvious that a good blockchain network needs a large number of engaged users. The fewer people responsible for maintaining the network, the easier it is to organize a 51% attack — the attack that is possible when one person or group of people gains control over more than 50% of the blockchain hash power.
And, finally, a problem that is also inherent to the PoS consensus: voters with a larger number of staked tokens have more power. If they decide to abuse their power, it will negatively affect the operation of the entire network.
Blockchains such as Tron, Steem, EOS, and WAX are operating on top of the DPoS consensus mechanism. All these blockchains are highly sustainable and high-performing in terms of transaction speed.
Often used to create NFT marketplaces and run blockchain-based games, the WAX blockchain performs around 8,000 tps. Thanks to the underlying DPoS algorithm, WAX consumes 125,000 times less energy than Bitcoin and Ethereum.
As for EOS, this blockchain can perform up to 4,000 transactions per second. EOS is also considered a carbon neutral blockchain as it consumes 17,236 times less energy than Ethereum and is 66,454 times more energy-efficient than Bitcoin.
Bitshares, Steem, and Lisk are among the most well-known projects using the DPoS consensus algorithm.
Bitshares is a DeFi platform that offers an in-built DEX, cryptocurrency minting through smart contracts, participation in liquidity pools, and more besides.
The Lisk blockchain platform, in turn, is important for developers because it gives them the ability to build customizable dApps that are scalable and energy-efficient.
Dive deeper into DeFi and find out how it’s transforming the financial world
Proof of Authority (PoA)
Proof of Authority is an algorithm that is more suitable for private blockchain networks. In this mechanism, instead of staking coins, validators are staking their own identity and reputation.
Since people have to earn the right to become validators and need to prove their real identity, they have an interest in keeping their reputation healthy by working effectively and adhering to strict rules.
The algorithm selects just a limited number of nodes, which become the only ones responsible for validating transactions, building blocks, and maintaining the network. At the same time, validators don’t need to constantly monitor the network, as they use special software instead.
The PoA algorithm doesn’t require high computational power either, so there is no need to buy expensive hardware, and this consensus remains energy-efficient. Another benefit for validators is that while they must reveal their identity and provide documents, participation in the network gives them real power and rewards.
For business owners, this consensus algorithm is also quite a secure option as they rely on real people whose reputation is at stake. There is a low possibility of attacks as well because all the validators are checked before gaining authority and becoming validators.
Fast and predicted transaction times are yet another advantage that PoA offers. On average, it takes about five seconds to create and add a new block of information.
The first disadvantage is actually a benefit for platform owners but a drawback for validators. PoA-based systems only allow people with an established reputation to participate in the network, so becoming a validator is not so easy and probably even impossible for an ordinary person.
The level of decentralization is also questionable. A PoA-based system implies that the network is maintained by a small and limited number of validators, which is contrary to the idea of decentralization. This is why the Proof of Authority consensus is mainly used for private blockchain networks.
POA Network is the first public platform with the Proof of Authority consensus based on the Ethereum protocol. This network offers an open-source framework for smart contracts.
VeChainThor is another notable example of the PoA-powered blockchain. Its creators are promoting the idea of mass public adoption of blockchain for business purposes and have made this tech unarguably suitable for enterprises. The two most common use cases are blockchain-based supply chains and NFT marketplaces.
Part of the Hyperledger project, Hyperledger Besu makes use of both Proof of Work and Proof of Authority algorithms. This enterprise-friendly blockchain is a good fit for any industry working with supply chains.
Microsoft Azure is using the PoA mechanism in its Ethereum-powered cloud computing system. Azure’s blockchain is implemented in the solution for GE Aviation. The solution aims to streamline tracking of aircraft parts and reduce inefficiencies typical of the supply chain management.
Speaking about this collaboration, David Havera, Blockchain Leader at GE Aviation’s Digital Group, explained,
“Before, we had to manually pull historical documentation on where a part was manufactured and who repaired it, which took months to years. Now we just scan a part and have that story in real time at our fingertips.”
Another example is Walmart’s collaboration with VeChain in China. Items at Walmart are tracked using the VeChainThor blockchain to help address food safety issues and optimize product recalls.
Learn more about the consulting process for a blockchain project in logistics and transportation
Proof of History (PoH)
PoH is one of the youngest consensus algorithms. This mechanism can literally be called a clock for blockchain. But how does Proof of History work?
PoH represents an in-built synchronization mechanism that addresses the infamous clock problem. The point here is that nodes in many decentralized networks have to rely on external sources of information to assign a “median” timestamp when validating transactions. The PoH algorithm offers an internal clock that always displays the same time for all the nodes in the network.
In a typical blockchain infrastructure, blocks are connected sequentially and it takes time to wait for confirmation before moving on. With PoH, there is no need to wait for sequential block production, which greatly speeds up the transaction verification process.
Consequently, Proof of History also enables high transaction throughput — up to 65,000 transactions per second. Meanwhile, the transaction cost is low — only $0.00025.
What’s more, the PoH algorithm does away with the need to turn to external sources for timestamps. The elimination of third party services is good for any distributed system as it saves operational time and costs.
If we compare Proof of History vs Proof of Stake, for example, we can see that in order to become a validator in the PoS-based network you only need a regular PC. However, when using PoH, your hardware needs to meet strict specifications described in the documentation by the PoH-based Solana. This means that becoming a validator in the PoH network is a bit harder and quite expensive.
There are also concerns that Solana — so far the only PoH-based blockchain — may not be as decentralized as it seems. It has 1,670 validators on its network to date. The problem is that there are 21 validators who together control more than 33% of the total stake. If they collude and decide to shut down the entire network, they can do so pretty easily.
As we’ve just mentioned, Solana is so far the only blockchain using the PoH consensus mechanism. This algorithm was developed by Anatoly Yakovenko, co-founder of the Solana project.
The Solana blockchain can already boast several big wins. For instance, its SOL token is in the top 10 cryptocurrencies by market cap, and its 24-hour trading volume is over the $3 billion mark. Another achievement is the ever-increasing number of projects built on Solana. There are 350 solutions in its ecosystem and it is expanding every day.
The PoH-based Solana blockchain is often used to build DeFi platforms as well as NFT marketplaces and games.
Let’s consider Serum, a Solana-powered decentralized exchange. On the one hand, it resembles a centralized exchange in terms of matching buyers and sellers and maintaining a high transaction speed. But at the same time, it’s a DEX that is completely transparent and does not require the participation of any third parties.
Another example of a PoH-based project is SolChicks. This is a play-to-earn game where you can win NFT collectibles. Players also use SolChicks as their characters in the game’s metaverse.
Interested in developing your own Solana-powered application? Check out how we can help
What about other consensus algorithms?
The list of blockchain consensus mechanisms does not end here. There also exist other algorithms such as Practical Byzantine Fault Tolerance (pBFT), Proof of Elapsed Time (PoET), Proof of Activity (PoA), Proof of Weight (PoWeight), Proof of Importance (PoI), Leased Proof of Stake (LPoS), Proof of Capacity (PoC), and Proof of Burn (PoB). They are less widespread, but you should still bear them in mind when choosing the consensus mechanism for your application.
In addition, remember that it is possible to create your own consensus mechanism if your business goals cannot be reached through the existing ones.
For example, there is a new consensus algorithm called Proof of Ethic (PoE)™. It was invented by Nathan Trudeau, Founder & CTO at NuPay Technologies and PRISM. NuPay Technologies is a blockchain corporation that has exclusive usage rights to this patent-pending algorithm.
The algorithm is based on the principle that all nodes have an equal opportunity to create the next block; at the same time, they don’t need to invest large sums to become nodes. Thus the given consensus is more accessible and egalitarian.
The corporation is using this consensus algorithm to build the HELO blockchain, which is expected to be highly functional and environmentally friendly.
One further relatively new consensus algorithm is Proof of Weighted Randomness (PoWR), developed by PixelPlex for its own Echo blockchain ecosystem. This mechanism, based on the Byzantine Agreement protocol, randomly selects a small number of block validators from the entire set of network participants.
The probability of becoming a validator also depends on the user’s token balance. What is interesting here is that for each individual block, a new so-called committee of validators is selected. The network remains secure as long as at least 33% of the tokens are owned by honest entities.
What are the risks of picking the wrong consensus protocol?
Since a consensus algorithm is the integral, essential component of the blockchain, choosing the wrong one will lead to serious consequences. Here are several of the risks:
- Poor performance
An incorrectly chosen consensus mechanism negatively affects the nodes’ work and the speed of the entire network and transaction processing. If you plan to attract a large audience to your app, you need to consider algorithms that can provide you with a high transaction speed and scalability.
- System failure
Imagine you have chosen a consensus algorithm that is not suitable for public blockchains. You successfully launch an application, attract a lot of users to your platform — and then it turns out that there are not enough nodes to maintain the network or the way they verify transactions is not very efficient and secure. Once nodes stop working or experience some serious problems, the whole network will crash.
- Blockchain forking
Blockchain forking can cause problems unless the fork was created intentionally to implement new consensus rules.
When a fork appears, there are fewer miners and nodes in the network, which leads to vulnerabilities. A group of attackers will successfully interfere with a network when they control more than 50% of the computing power. The more nodes the system loses, the more chances hackers have to get additional power in the network.
Which consensus algorithm is right for your application?
Now that you know what consequences you might face if you choose the wrong consensus algorithm, it’s time to find out how to select the most suitable one. To get closer to the answer, consider the following questions:
1. Are you planning to launch a public or enterprise application?
If you are planning to create an application for a wide audience, you can consider implementing PoW, PoS, DPoS, or PoH. These algorithms imply that anyone can participate in block validation as long as they meet the requirements of the network (e.g. have the necessary hardware or the specific number of coins staked).
Although Proof of Authority also suits public blockchains, this mechanism is a better fit for private, enterprise-scale, applications.
2. Is sustainability your primary concern?
If your company is looking to create an environmentally friendly solution, the Proof of Work-based blockchain is definitely not the best choice, as it is the most energy intensive.
Instead you might consider PoS or DPoS options. The PoS mechanism is 2,000 times greener than PoW, and DPoS-based blockchains are 125,000 times more energy efficient than PoW. PoA could also be a good choice.
3. Do you want your app to handle a large number of users and process thousands of transactions per second?
If the answer is yes, then you should think of using PoS, DPoS or PoH. At present, PoS-based blockchains can perform up to 4,500 tps, DPoS — more than 8,000 tps, and PoH — up to 65,000 tps. Evaluate how many transactions your app will need to process and make a decision.
4. Do you need your application to be fully decentralized or would you consider limited decentralization?
PoW and PoS algorithms provide complete decentralization and high network security, while DPoS is more centralized than those two. As for PoA, it has limited decentralization as it requires a small amount of nodes to validate transactions and maintain the system. When it comes to the PoH protocol, the degree of decentralization of this consensus is a matter of controversy in the blockchain community.
5. Who will act as block validators?
Who do you see as nodes of your future application? If these are miners, then you should return to the PoW algorithm. If you want your nodes to be ordinary users who only need to stake coins and don’t need to buy specialized hardware, then PoS or PoA are reasonable options.
Still in two minds about which algorithm to pick? Reach out to our blockchain consultants and get your questions answered
There is nothing perfect in this world, and technology is no exception. Each consensus algorithm has its benefits and drawbacks that need to be carefully analyzed. However, despite the shortcomings, all the mechanisms we’ve considered serve as a basis for thousands successfully launched applications.
Whether you need help with the development and implementation of your own consensus algorithm and want to build a blockchain from scratch, or you are planning to build a new blockchain-powered solution with existing consensus mechanisms, we’ve got you covered.
Our PixelPlex blockchain development team has experience of working with numerous consensus algorithms and blockchains. Having dealt with more than 80 blockchain projects, we’ve acquired rock solid skills and will do everything we can to make your project achieve your business goals.