Blockchain: Consensus Algorithms

6 minutes

As the cryptocurrencies are commonly decentralised and anonymous in nature, networks require various mechanisms in order to ensure that transactions are authentic and data stored within the network is secure. A consensus mechanism is a fault tolerance process that is designed to bring all of the network's nodes into agreement, which is required within trustless environments with no intermediaries.

Proof of Work

An idea developed in the early 90s, Proof-of-Work (PoW) consensus was established by Satoshi Nakamoto's Bitcoin in 2008. It has since become the mechanism of choice for the majority of cryptocurrencies currently in circulation such as Bitcoin and Litecoin.

The process of adding a new block to the chain involves processing transactions into a list, miners then validate whether these transactions are legitimate by solving a complex mathematical puzzle. The solving of the puzzle is the “work” element in Proof-of-Work. As time goes on the problems become more complex, with increasing amounts of computation power required. Miners are incentivized to solve these cryptographic equations as they are rewarded with Bitcoin themselves. Currently at 6.25 BTC at the time of writing, the reward has been halved a number of times since its inception, starting out at 50 Bitcoins per block in 2009. This is also the method of distribution for currencies using Proof-of-Work.

One notable drawback with the PoW mechanism is the high degree of energy consumption required. Completing the “work” is requiring increasingly more energy, causing some to question whether its benefits outweigh its environmental impacts. According to the Cambridge Center for Alternative Finance (CCAF), Bitcoin currently uses around 115 TWh. That is around 0.55% of global electricity produced, or approximately the annual energy usage of a country like Chile or Austria.

Despite this seeming like an extraordinary use of energy, computational output is only going to become cheaper and more efficient reducing energy consumption across networks.Many prominent mining firms are also looking to sustainable energy sources to support their operations and reduce environmental impacts. Bitcoin miners believe that they can offer power networks with stability by absorbing excess energy supply. Australia is leading the charge, with the country's largest Bitcoin mining site to be built in Byron Bay, it is set to be powered by 100% renewable energy.

Proof of Stake

Whilst developed to improve upon the problems discovered in Proof-of-Work, the goal of total consensus on the blockchain remains the same. Proof-of-Stake adds new blocks to the chain via a combination of factors that include: node wealth, length of time staked and randomisation.

Proof-of-Stake does away with mining altogether. Blocks are now “forged” and participating users known as “validators”, these validators are required to hold an amount of a certain coin within the network as a stake. The amount staked will generally determine the chances of a node being selected to forge the next block in the chain. The greater the amount staked, the higher the chances of selection. However, there are processes in place to ensure that it is not only the wealthiest nodes being selected. A number of randomization measures have been set, the two most commonly used are: 'Randomized Block Selection' and 'Coin Age Selection'. Random Block Selection chooses validators by searching for the node with the lowest hash rate and the highest stake. While Coin Age Selection picks the next forger based on the length of time they have staked their tokens. Once a node has been selected to forge a new block, all transactions within the block are checked to ensure they are valid, then added to the chain. Validators then receive the fees for all transactions associated with that block as a reward. In order to keep validators accountable, there is a mechanism known as “Slashing”, it is designed to discourage any rule breaking. Misbehaving nodes will have part of their stake or rewards removed as a penalty.

Proof-of-Stake does not require the enormous amount of energy used by PoW, as there is no need for it's validators to solve complex equations. This allows for networks using PoS to validate transactions much faster, while also being much more energy efficient. Ethereum, which is the biggest proponent of Proof-of-Stake, boasts an average block time between 12-14 seconds, while Bitcoin's block time is currently around ~7.6 minutes at the time of writing.

Proof of Authority

Proof-of-Authority can be considered as an evolved version of Proof-of-Stake. Rather than coins, users will leverage their identity and reputation. This mechanism is designed to suit private enterprise or organizations that want to build their own blockchains that are not used by the general public.

Proof of History

Another diversion from PoS is Proof-of-History. Proof-of-History is essentially a cryptographic clock that enables nodes to agree on the time order of the events on the chain, without having to communicate directly with each other. This means that blocks can reach validators in any order and still be accurately verified due to its cryptographic timestamp. This allows for a greater level of efficiency and transaction speed within the network.

Ripple's Consensus Protocol

Ripple's protocol consensus algorithm recommends users with a list of trusted participants to authorise and validate transactions, also known as the Unique Node List (UNL). Each server contains a set of trusted nodes that are voted on by other members of the UNL, ensuring that each node is trusted not to conduct fraudulent activity.

As with most things, each blockchain mechanism and protocol have their own strengths and weaknesses. Some are much more adaptable than others, some are much faster, and some have lower transaction fees. Each however works toward the same goal, to ensure that transactions are authentic and data stored within the network is secure. If you are interested in this topic and do not yet have a CoinSpot account you can sign up here, and start trading today!

Share this article