In a blockchain environment, transactions are grouped into blocks and added to the network. However, this only happens once the network participants have reached an agreement, or consensus, on the validity of the transactions. This ensures that all participants are working based on the same ledger containing the same set of historical transactions and the same rules.
Because blockchains are decentralized, and no single party is in charge, the consensus mechanism needs to fulfill several criteria. It enables the group to reach an agreement, without enabling parties to act in their own interests above that of the network. Therefore, parties should be incentivized to play by the rules.
One critical challenge is time. Obtaining consensus between hundreds or thousands of network participants isn’t necessarily a fast process. Therefore, over the years since the Bitcoin blockchain was launched, developers have proposed various alternatives for achieving consensus. Here are a few of the methods in use today.
Proof-of-work (PoW) is the consensus mechanism used by Bitcoin and many other public blockchains that came after it. In Bitcoin’s PoW method, the network operators are called miners, and the “work” refers to computational power.
Miners expend work in competing to become the first to solve a computational puzzle known as a hash, which takes all of the most recent unconfirmed ledger transactions as an input. The hash puzzle is asymmetric, meaning it’s difficult to solve, but quick and easy to verify if the solution is correct.
The miner who solves the hash puzzle mines a block of transactions and presents their solution to the network for verification. If it passes the verification, the block is added to the blockchain, and the miner receives a Bitcoin-based reward for their efforts.
The PoW mechanism is highly secure. Bitcoin has been running for nearly 11 years now, and the network hasn’t yet been compromised. This security is well-suited to a financial ledger, which is why so many cryptocurrencies adopt PoW.
However, it comes with the significant challenge of being highly inefficient. First of all, the process of solving the hash puzzle takes around ten minutes. Because Bitcoin has a fixed block size of 1MB, this limits the network to a processing speed of around 4–5 transactions per second, compared to the Visa network which processes 1,700 per second on average up to 50k per second at peak performance.
The PoW mechanism is also extremely energy-inefficient. On a per-hour basis, estimates suggest that Bitcoin transactions consume the same amount of electricity as a country of ten million people.
Proof-of-stake (PoS) has some similarities to PoW, in that those who produce blocks are competing for rewards. However, in a PoS blockchain, blocks aren’t mined. The principle of PoS is that those who hold the network tokens will have a vested interest, or a stake, in maintaining the integrity of the network. The forger will have no incentive to validate or to create fraudulent transactions because when the network detects the fraudulent transactions, the forger node will lose its stakes and also the right to participate as a forger in the future.
Anyone wanting to participate in block production for rewards must stake their tokens to become eligible. In general, those who stake the most tokens stand the best chance of becoming block producers, although the selection process can vary between different PoS designs.
PoS offers the advantage of being far more energy-efficient than PoW because it doesn’t require the same computational effort to operate. However, it isn’t necessarily quicker than the PoW mechanism.
Ethereum has long been promising a move from a PoW to a PoS consensus model; however, it has not yet made the full transition. It’s also worth noting that PoW and PoS aren’t necessarily mutually exclusive. Some blockchains operate a kind of hybrid model.
Delegated Proof of Stake
Delegated proof-of-stake (DPoS) was developed by Daniel Larimer, who has implemented this consensus model in two of his projects, Steem and EOS. DPoS is similar to a model of representative democracy. Token holders on the network have the right to vote for those who they wish to become block producers. Voting is weighted according to the number of tokens staked, so those who stake more have a bigger share of the vote.
The fact that there are fewer participants in the block production process overcomes the speed issue. Fewer participants means they can reach consensus far more quickly. Therefore, EOS is capable of handling many more transactions per second than Ethereum.
However, there are tradeoffs. DPoS relies on far fewer block producers than PoW or PoS, meaning it has been criticized for promoting centralization. Furthermore, the voting mechanism can be subject to manipulation, if token holders form groups to try and influence the election.
Proof of Authority
Proof-of-authority (PoA) was proposed in 2017 by a group of developers including Ethereum co-founder Gavin Wood. It operates in a similar way to PoS, except that rather than staking tokens, those in the network stake their own reputation, or authority. The underlying principle is that if they prove to be unreliable, they lose their authority and can no longer produce or validate blocks.
PoA consensus generally uses fewer block validators and has proven to be faster than PoW and PoS. PoA is well-suited to permissioned blockchains, as it doesn’t necessarily need to rely on a reward mechanism. Microsoft Azure and VeChain Thor have both implemented versions of the PoA consensus model.
This list isn’t exhaustive, but it covers the consensus models used by the main public and permissioned blockchains.
There is no absolute best consensus mechanism which serves all business models at this moment. As a business, you need to consider various factors which correspond to your products or services, such as: what transaction speed do you require, how decentralized or stable does the network need to be and what is the corresponding gas cost, if any, to make transactions.
Opting to build the system on a fixed blockchain with a certain consensus mechanism can present some risks. For instance, if a better mechanism surfaces in the future, your whole infrastructure would need to be rebuilt, which costs time and money. As such, a better alternative would be to use a blockchain-agnostic infrastructure, allowing you to move your system from one blockchain to another if the current one becomes outdated or no longer suitable for the changing business processes.
There is no one-size-fits-all solution but by understanding the consensus process and the tradeoffs, you can make a better-informed decision. Let us know which consensus mechanism you prefer and why. Or if you are still not sure, please consult a technical partner from our team.
This article is brought to you by CoreLedger.
As a prominent blockchain infrastructure provider, CoreLedger is making blockchain technology simple for businesses to use. With CoreLedger’s offerings, clients can readily tokenize their offerings with fast-to-implement resources that will allow them to modernize their services. Thanks to our in-house developed software solutions and experienced blockchain specialists, CoreLedger is ready to help you make your next move with blockchain technology.