A dive into consensus mechanisms

Distributed Ledger Technology (DLT), more commonly known as blockchain, is a series of verifiable publicly shared ledgers that are distributed across a worldwide network i.e. there is no central server point; the entire system is decentralised.

At the core of this technology is a mechanism created to ensure that the network collectively agrees on the validity of added content and records, while rejecting invalid data and preventing fraudulent transactions (generally referred to as ‘double spend’).

This is referred to as a ‘consensus mechanism’. The original and most well known consensus mechanism is called Proof of Work (PoW) and it powers the Bitcoin protocol. Other common mechanisms are Proof of Stake (PoS), and CasinoCoin’s mechanism of choice, Proof of Consensus (PoC).

For any consensus mechanism to work, the network must have participants who empower this network by means of employing labor (servers/computers/networks) and/or capital (investment and operational expenses). These participants are then rewarded for verifying and maintaining the ledgers.

Proof of Work

In a PoW consensus mechanism, transactions on the blockchain are bundled together into blocks of data.

Each block of transactions is sent out to the network where miners (using very high computing power) compete to solve a complex mathematical algorithm. The first one to do so is rewarded in that blockchain’s cryptocurrency. When each algorithm is solved, it creates a new block.

Once the algorithm of a given block is solved, it’s turned into a 64-digit hexadecimal number (known as a cryptographic hash or a digital fingerprint) and is then communicated to the rest of the network, and an entry on the ledger is created.

This cryptographic hash is of utmost importance to PoW as it acts as a link between new and previously solved blocks, thus creating an immutable blockchain ledger that is tamper proof.

With PoW, the level of difficulty for solving the mathematical algorithm increases as more blocks are added to the network. This means that the marginal cost of mining is always increasing.

Proof of Stake

To tackle the increasing difficulty, cost and energy inefficiency associated with achieving consensus using the PoW mechanism, a new method emerged.

The Proof of Stake (PoS) consensus mechanism was built with efficiency and cost-effectiveness in mind.

With PoS, there is no mining of complex algorithms that require high and expensive computational power (since cryptocurrency in this case is pre-mined); instead, validators (sometimes referred to as ‘forgers’) are selected to validate the next block of transactions.

To become a validator, a person would have to deposit a certain amount of cryptocurrency to the network – a form of security deposit, known as a stake.

The higher a validator stake in the network is, the higher the chances are that he/she would be selected to validate the next block.

As the selected validator adds valid blocks onto the blockchain, he/she is rewarded with the transaction fees associated with all the transactions in the given block.

The stake that the network holds from the validator is a financial motivator for the stakeholder to validate correct data and add it to the blockchain. Validating incorrect or fraudulent transactions will lead to the validator losing all of his/her stake.

Because holders of the largest stakes have the highest chances of validating the next block, several different methods of selecting the next validator have been added to the mechanism to avoid centralisation among the highest stakes. To name a few:

1. Randomised Block Selection – where validators are selected based on the lowest hash value in relationship with the size of stake

2. Coin Age-Based Selection – where older and larger stakes would have a higher probability of validating the next block

Proof of Consensus

As the name proposes, this mechanism is based on obtaining consensus from various servers on the network to validate a set of transactions in order to add it to the ledger.

Like PoS, Proof of Consensus (PoC) is a transaction verification mechanism that does not involve mining new cryptocurrency; however, unlike PoS the consensus is reached at an increasing validation rate and is assigned to the network as a whole instead of selection of validators. With CasinoCoin, consensus is reached at 80% validation.

The ledger in a PoC network is shared and runs on a number of servers, generally referred to as nodes. Every few seconds, a new ledger is created and shared across all the nodes on the network. This verified ledger is called the ‘Last Closed Ledger’ (LCL) and is considered to be the reference of all correct transactions on the network.

Any new transaction that comes into the network through any of its nodes is considered to be a proposed change to the LCL. Such transactions directly go to the nodes (rather than a selected validator as is the case in PoS) for validation.

If the network reaches consensus on the valid transactions, a new LCL is created on the blockchain.

Even though the ledgers in this process are decentralised and public, the validation of transactions within such networks are limited to a number of servers.

Summary

To sum it up, while PoW seems to be a costly and complex method; it may be the preferred method for blockchain projects that aim to hold future value. On the other hand, PoS and PoC may be most suitable for blockchain projects that aim to provide utility and high liquidity, such as CasinoCoin.

A successful blockchain project is not the one that uses the most complicated, or commonly used consensus mechanism. A successful blockchain project is one that understands exactly what purpose it is trying to achieve, and combines it with the most suitable consensus mechanism.

Learn more about:

Double Spend: https://bitcoin.stackexchange.com/questions/4974/what-is-a-double-spend

The Cost of Mining Bitcoin: https://www.marketwatch.com/story/heres-how-much-it-costs-to-mine-a-single-bitcoin-in-your-country-2018-03-06

Proof of Stake – How it Works:

The Consensus Mechanism of Ripple: