Learn Crypto Blog
Learn Crypto
2 months
2,018

Ultimate guide to crypto consensus mechanisms

Ultimate guide to crypto consensus mechanisms
  • Why achieving consensus is so hard
  • Bitcoin's approach to consensus
  • Alternatives to Proof of Work

Believe it or not, human beings are good at cooperation. That is how we have survived and evolved as a species, but the more evolved society has become, the more centralised the institutions needed to reach consensus on how to get things done - like controlling money. That all changed in 2008 with the invention of Bitcoin and its unique blockchain-based consensus method - Proof of Work - that requires no authority. But how does it work and what other approaches have emerged? To answer that we've produced the ultimate guide to crypto consensus mechanisms.

Imagine being part of a group of people (a network) spread worldwide, who you don't know or necessarily trust, that has been set the challenge of agreeing on the accuracy of a constant flow of data, such as daily temperature. How would you achieve consensus on the accuracy of the data?

What comes to mind is that for orderliness and progress to be achieved, there has to be some  framework for collecting and validating data, and an organisational structure, with administrators to ensure there’s the unity of purpose and way of double-checking the accuracy of the data; otherwise, there is chaos, right? 

The problem is particularly challenging when participants in the group have an incentive to cheat. This might be the case with temperature data (given how political that subject is) and is definitely the case with money.

Huge institutions, with massive workforces and processes - and the ultimate backing of the law - control that framework, which issues and manages money, trying to maintain its value and usefulness for trade. The system is centralised, which means central points of weakness that you simply have to trust, and is ultimately backed with the threat of violence.

The beauty of Bitcoin as a monetary system is that through the blockchain that supports it, found a framework to achieve a fixed supply and consensus on bitcoin balances within a ledger, without the need for trust in a central authority or enforcement. Just economic incentive and code. 

The problem of finding consensus

A consensus method is essentially a set of rules that all the participants in a group or network agree is the only way to reach agreement. 

Consensus is derived from the Latin for agreement. Societies have developed various models for  making decisions when opinions are diverse and the points of discussion are subjective - there is no absolute right or wrong.

Each consensus method will consist of specific objectives, or terms of operations, such as coming to an agreement, collaboration, co-operation, equal rights to every participant, and mandatory participation in the consensus process. 

Democratic governments are designed with various stages of decision making for new laws, such as the Senate and House of Representatives in the USA or the House of Lord and Parliament in the UK; the process they use for creating new laws are consensus mechanisms. They are complex and slow, with no one ideal approach; they are all open to abuse and influence.

It is a little easier when you are trying to agree on a very specific objective, which can expressed purely in mathematic terms - like money - but it is still a remarkable achievement for Satoshi Nakamoto to have built a system that achieves consensus without trust or threat of violence.

Bitcoin's approach to consensus

Bitcoin (as a monetary system) is designed to achieve consensus on the unspent balances of bitcoin (the monetary unit) within a ledger that exists across a network of computers - Nodes - using a set of rules defined in code, and economic incentives (rewards of new bitcoin) rather than being maintained by a central authority.

That ledger is what is known as the Bitcoin Blockchain. Blocks of transaction data, chained together cryptographically - secured by complex maths.

Each Node in the network acts independently of every other node. But as they all follow the same rules, the system is built to ensure that new data (added to the Blockchain as new blocks), proposed by participating nodes, is the only version of the truth, which is agreed by all the nodes in the distributed/decentralised computing network.

The key element of the rules of the Bitcoin blockchain which ensures consensus is reached, and cannot be compromised is something called Proof of Work. 

Bitcoin has inspired other consensus methods, with different rules, the most common being Proof of Stake (PoS). The way in which consensus methods work  is now becoming the yardstick to judge how fast and significant a market share these blockchains, and the applications they support, will capture. for decentralised services.

Proof-of-Work (PoW)

PoW is the adopted consensus protocol for the Bitcoin network. It is the process of producing cryptographic hash (Hashing is the process of inputting an item of variable length to give an output item of a fixed length in the blockchain) by decentralised ledger networks.

Typically, in a PoW system like the Bitcoin network, miner nodes take data from a blockchain header and continuously run it through a cryptographic hash function using a slightly varied input called the nonce. 

A nonce is an arbitrary number that can only be used once, after which it is discarded if it doesn’t produce the hash. Hence, miners in a PoW system are always in a frantic race to solve for the hash and get rewarded in the network token by iterating over several nonces. 

This computation consumes a high amount of electrical energy. Unlike the earlier days of Bitcoin, where personal computers are employed for the mining process, and later GPUs, specialised computers called ASICs are now required to compute these complex mathematical problems needed for the PoW system. 

Pros:

  1. Iron-clad resistant to 51% attack which is perhaps the biggest threat to blockchain networks.
  2. Allows network participants who can’t afford to run full nodes to run light nodes requiring a lesser amount of resources.

Cons: 

  1. Harshly criticised for its energy-hungry characteristics and that it adversely contributes to climate change.
  2. Requires enormous resources for setup, making it not within reach of retail entrants but large corporations
  3. Criticised as prone to centralisation, which negates the original tenets of a decentralised network.
  4. Most PoW blockchains grow linearly in data size over time, making it difficult to run a full node. The other option would be to run a light node which has to trust the full nodes. 

Proof-of-Stake (PoS)

Like PoW, proof-of-stake has the same objective of validating transactions on the network; PoS employs a different approach. Rather than run complex hash functions, in PoS, validation of new blocks on the blockchain network is done by randomly selecting validators who stake (lock-in) their resources in the form of digital money or network tokens. 

Although the selection of validators in the PoS blockchain is random, validators have a greater chance of being selected to propose the next block based on the size of their stake. 

In a technical sense, validators in the PoS network validate blocks by placing a bet on them as soon as they discover a block that they think can be added to the chain. Cardano, Mina Protocol, and Ethereum (when it fully transitions to Eth 2.0) are examples of blockchain networks running on a proof-of-stake consensus algorithm.


Pros:
1.  PoS doesn't require hard computing work; hence it comes with the potential to massively reduce the energy needed to add blocks to a cryptocurrency's blockchain.

2. Comes with the ability to scale incrementally compared to its PoW counterpart as sharding allows a PoS chain to create multiple blocks at the same time, increasing transaction throughput.

Cons:

  1. Not an easy consensus method mechanism to implement as it appears in theory. 
  2. PoS protocols can suffer from the nothing-at-stake problem, where validator nodes validate multiple conflicting copies of the blockchain because there is minimal cost to doing so.
  3. Also susceptible to centralisation, especially in newer blockchain protocols.

Delegated Proof-of-Stake (DPoS)

DPoS is a consensus algorithm based on a voting system. Here, network participants called “delegates” elect validators saddled with the responsibility of proposing blocks. For their actions, validators earn network fees which they share with delegates who voted them in. 

As a delegate, your voting power is proportional to the amount of stake you hold. This is a widely popular consensus method created by Daniel Larimer and now adopted by top blockchain networks like EOS, Tezos, Steem, Tron, Lisk etc.

Pros:

  1. It’s an easier consensus mechanism to scale. 
  2. Widely popular among most blockchain platforms as well most sidechains implemented on base layer networks

Cons:

  1. Prone to validator-cartel collusion
  2. Most network participants are relegated to delegate roles that do not actively involve in block proposals or validation. 

Proof-of-Burn (PoB)

As the name suggests, in the proof-of-burn network, participants send their coins (could be the network’s native token or other coins like Bitcoin) to a burn address where they can never be retrieved rather than investing in expensive hardware like ASIC miners. 

And for this, they earn the privilege of being selected to propose the next block in the network. Burning coins in this context mean that validators have a long-term commitment in exchange for their short-term loss - a clever auction-like logic that, with enough participants settles on an optimal Burn rate. The more coins validators burn, the better their chances of being selected to mine the next block. 

Pros:
1. Widely popular and growing interest has seen it been implemented by dlt networks

Cons:

  1. Seen as wasteful as most resources are burned
  2. Considered prone to centralisation as only those who are willing to spend more by burning stands better chances of being selected as validators

Proof-of-Elapsed-Time (PoET)

PoET algorithm randomly generates elapsed time to decide mining rights and block winners on a blockchain network.

Like a typical fair lottery system where each party has the same probability of getting selected, the PoET mechanism is based on spreading the chances of winning fairly across the largest possible number of network participants.

In a PoET network, each participating node generates a randomly assigned wait time after which it becomes inactive. The node with the shortest wait time wakes up as soon as its wait time elapses to commit the next block which is broadcasted to other peers in the network.  This consensus method also employs additional measures in the algorithm to stop nodes from always winning the election, and stop nodes from generating a lowest timer value.

Pros:

  1. Although similar to Bitcoin’s PoW consensus model, it’s not resource intensive but rather allows miners processors to switch to other tasks while waiting for its turn to be selected based on the “Random Leader Selection Problem”.
  2. It is a good option as a consensus model for permissioned or private blockchains like Hyperledger Fabric.

Cons:

  1. It is too specialised as it was developed and released as part of the Software Guard Extensions (SGX) programming reference manual. This may mean that it will require necessary reliance on specialized hardware’s security as SGX is manufactured solely by Intel.

Proof-of-Authority (PoA)

Ethereum’s former co-founder and CTO, Gavin Wood conceptualised PoA in 2017 where network validators do not need to stake their resources but their identity and reputation. The Proof of Authority model works on a fixed number of block validators that are arbitrarily chosen as trustworthy parties, making it an easily scalable blockchain system because transactions are checked by already-approved network participants. 

Pros:

  1. Requires extremely low computing power hence does not produce any significant strain on the electricity required to keep the network operating.
  2. Scales faster than traditional consensus models like PoW and PoS. 

Cons:

  1. Lacks any semblance of decentralisation as only a limited number of validators who are not even necessarily democratically elected are allowed.
  2. Dapps built on a PoA consensus-driven blockchain are not entirely censorship-resistant as the limited number of identified validators can collude to censor transactions
  3. Risk of reputation damage of any validator may not be weighty enough to deter validators to act in a malicious way compared to the gains they make.

The race for a dominant consensus method

The race is on as to which blockchain network will command the strongest market share for the Web3 economy and the primary determining factor is rooted in the consensus algorithm adopted by the respective blockchain networks. 

While Bitcoin's proof of work may currently command the largest share as of today, its controversial energy consumption has driven innovative new solutions to the age-old problem of achieving consensus without centralising power.

Rival networks with novel approaches to consensus are trying to build momentum. Ethereum has committed to switch from Proof of Work to Proof of Stake, but there are a whole list of other challengers like Solana, Algorand, Binance Smart Chain, Polkadot, and Cardano all in a frantic race to dethrone the dominant approach. 

In truth, none can make a clear case for their consensus method to become the new standard. That might simply be because they are new and untested, or more fundamentally, because the basic problem of achieving consensus with centralisation just isn’t possible without compromise.

Tune feed