Blockgenic

@blockgenic

Different Blockchain Consensus Mechanisms

Most blockchains have a lot of things in common and function in similar ways, but one of the ways in which blockchains can be unique is the way consensus is reached. Which transactions are legitimate and which transactions are added to the blockchain? Blockchains do this using various consensus mechanisms, we will explain the most important ones and some others below.

What are consensus mechanisms?

In short, consensus mechanisms are protocols that make sure all nodes (device on the blockchain that maintains the blockchain and (sometimes) processes transactions) are synchronised with each other and agree on which transactions are legitimate and are added to the blockchain.

These consensus mechanisms are crucial for a blockchain in order to function correctly. They make sure everyone uses the same blockchain. Everyone can submit things to be added to the blockchain, so it’s necessary that all transactions are constantly checked and that the blockchain is constantly audited by all nodes. Without a good consensus mechanisms, blockchains are at risk of various attacks.

There are many ways to reach consensus, so we’ll jump right into the most popular ones.

Proof Of Work (POW)

Proof Of Work (POW) is the first blockchain consensus mechanism and was first used by Bitcoin. Many cryptocurrencies have followed Bitcoin’s example and have also adopted this consensus mechanism.

The Proof Of Work process is known as mining and the nodes are known as miners. Miners solve complex mathematical puzzles which require a lot computational power. The first one to solve the puzzle gets to create a block and receives a reward for creating a block. These mathematical puzzles have some interesting properties. 
First of all, they are asymmetric, meaning it takes a lot of time to find the answer, yet it’s easy to verify if an answer is correct. 
Secondly, the only way to solve these puzzles is to ‘guess’ the answer. It is not possible to solve the puzzles quicker using any other method than trial and error. This also means that the if one wants to find the solution to the puzzle faster, they would need more computational power, which can get very costly. 
Lastly, the difficulty of these puzzles changes depending on how fast blocks are mined. To maintain a consistent supply of new coins, blocks have to be created within a certain time frame. If blocks are created too fast, the puzzles get harder, and if they are created too slow, the puzzles get easier.

This process ensures that in order to be able to create a block, one will need a lot of computational to solve the puzzle first. But how are miners mining these blocks?

Miners can mine blocks using a lot of different hardware:

CPU Mining — Using a normal computer’s CPU to validate transactions in a proof of work consensus protocol.
GPU Mining — This is not dissimilar to CPU mining, however in this case a graphics card is used. Graphics cards are more powerful whilst relatively using less electricity.
FPGA Mining — Otherwise known as “Field-Programmable Gate Array mining”. An FPGA is a circuit tailored for a specific computing task, making them several times faster at mining than normal processors.
ASIC Mining — Is an “Application-specific integrated circuit”, a circuit customised for a particular use. ASICs easily outperform CPUs, GPUs and FPGAs in both speed and efficiency, they are generally only really used for Bitcoin mining.
Mining Pools — To increase the likelihood of successfully mining a block miners pool together their resources, sharing any potential rewards dependent on how much each miner contributed.
Cloud Mining — Some miners rent out their processing power to other miners for a allotted period of time.
Taken from lisk.io

There is a major drawback to this consensus mechanism though. Proof Of Work uses a lot of resources and is said to be unsustainable in the future, which is why some blockchains are moving to different consensus mechanism.

Bitcoin Energy Consumption index, https://digiconomist.net/bitcoin-energy-consumption

To give you an idea of just how much energy blockchains using Proof Of Work can consume we have included the above graph, which estimates how much energy Bitcoin has consumed over the past 2 years. Digiconomist estimates that just over the last year, Bitcoin consumed roughly 73.12 TWh, with an estimated cost of $3,656,073,069.

Proof Of Stake (POS)

Proof Of Stake (POS) is the more environmentally friendly brother of the Proof Of Work protocol. Proof Of Stake makes use of the premise that those who own most coins in a network have a vested interested in keeping the network maintained and the value of it’s coins high.

In a system that uses Proof Of Stake a randomized process is used to determine who gets to produce the next block. Users can stake their tokens to become a validator (someone who can produce blocks), which means they lock their tokens up for a certain time. After doing so they are eligible to produce blocks. The process that decides who gets to produce the next block takes a couple of factors into account, what these factors are depends on the design of the blockchain, but in general, the person who has the biggest stake has the highest chance to produce a block. An example of another factor that can be taken into account is how long the coins have been staked.

Validators are also rewarded for their work. The reward that the validator receives for creating the next block depends on the design of the blockchain yet again. Usually, they either receive all, or part of, all the transaction fees of all the transactions in the block they created, or they receive a fixed amount of coins (generated through inflation).

Proof Of Stake is not only much more energy efficient than the Proof Of Work system, it also has another major distinction. In a Proof Of Work system a miner may own none of the coins they are mining, meaning they only seek to maximize their profits without actually improving the network. In a Proof Of Stake system validators have a much bigger incentive to actually maintain the network as they actually hold the coins of the blockchain on which they are validating.

Delegated Proof Of Stake (DPOS)

Delegated Proof Of Stake (DPOS) is a very fast consensus mechanism and most known for it’s implementation in EOS and is often referred to as a digital democracy, thanks to it’s stake-weighted voting system.

In a Delegated Proof Of Stake system users can stake their coins to vote for a certain amount of delegates. The weight of their vote depends on their stake, for example, if A stakes 10 coins for a delegate and B stakes 1 coin for a delegate, A’s vote weighs 10 times heavier than B’s vote.

But what is a delegate? A delegate is a person or organisation that wants to produce blocks on the network. The delegates that receive the highest amount of votes get to produce blocks and are rewarded for creating these blocks. Just like with Proof Of Stake, they are either paid from the transaction fees or they are paid a fixed amount of coins, which are created through inflation. How many delegates get to produce blocks depends on the design of the blockchain, generally, this is either a fixed amount or all delegates above a certain pay grade. Who the top delegates are can constantly change.

Rather than simply taking a pay cut to be a delegate, delegates may get voted in because they use the delegate pay on other tasks like marketing, legal work, or lobbying. They can thus perform some of the duties that employees of other types of companies would do.
Thus, there are strong incentives for all delegates to not just secure the network, but also to provide value to shareholders in other ways.
-Daniel Larimer

Since delegates want to receive as much votes as possible, they are constantly incentivized to create things valuable to the community, as they are likely to receive extra votes for doing so.

Blockchain activity index including consensus mechanisms, blocktivity.info

The Delegated Proof Of Stake protocol is also much more efficient at processing transactions than the above protocols. As you can see in the image above, the most active blockchains, ordered by the amount of transactions in the last 7 days, all use the Delegated Proof Of Stake protocol, or a variant of it. You can also see the CUI index on the right of the image, which shows how well a blockchain is handling the amount of transactions it’s receiving. The blockchains that use the Delegated Proof Of Stake protocol are having no trouble handling all the transactions they are receiving, yet the blockchains that are using the Proof Of Work protocol have a very hard time handling a relatively small amount of transactions compared to the amount of transactions the bigger blockchains are handling.

Other consensus mechanisms

Now you have read about the 3 most popular consensus mechanisms, you might be wondering what other consensus mechanisms exist. We have explained some of these below.

Proof Of Capacity (POC)

Proof Of Capacity is a consensus mechanism that uses a process called plotting. With Proof Of Work miners use computational to guess the correct solution, with Proof Of Capacity however, solutions are pre-stored in digital storages (like hard disks). This process is called plotting. After a storage has been plotted (meaning it has been filled with solutions) it can take part in the block creation process.

Whoever has the fastest solution to the puzzle of a (new) block, gets to create the new block. The more storage capacity you have, the more solutions you can store, the higher your odds of creating a block are.

Proof Of Elapsed Time (POET)

Proof Of Elapsed Time is a consensus mechanism that aims to randomly and fairly decide who gets to produce a block based on the time that they have waited. To decide who gets to produce a block, the process assigns a random wait time to each node. The node whose wait time finishes first gets to produce the next block.

This consensus mechanism can only work if there is a system in place to verify that nobody can run multiple nodes and that the assigned waiting time is actually random. Without a system like this in place the consensus mechanism has major flaws.

At the end of the day all of these mechanisms have the same goal: reaching consensus in a decentralized network. Though, despite these mechanisms having a common goal, they vary wildly in their approach to reaching consensus. While the perfect consensus mechanism does not exist yet, it’s interesting and inspiring to see how consensus mechanisms have evolved and adapted over time to the ever changing needs of a protocol like this, and it will certainly be enthralling to watch new ideas materialize.

About us

We are Blockgenic, a network of world class technology entrepreneurs and investors looking to make a positive impact on blockchain technology. You can find us here:
EOS Block Producer name: ‘blockgenicbp’
Website
Twitter
Youtube 
Reddit

More by Blockgenic

Topics of interest

More Related Stories