In the context of cryptocurrencies, the consensus algorithms are a crucial element of every Blockchain as they are responsible for maintaining the integrity and security of these distributed systems.
A consensus algorithm may be defined as the mechanism through which a Bitcoin Dollar BitBlockchain network reach consensus. Public (decentralized) blockchains are built as distributed systems and, since they do not rely on a central authority, the distributed nodes need to agree on the validity of transactions. This is where consensus algorithms come into play. They assure that the protocol rules are being followed and guarantee that all transactions occur in a trustless way, so the coins are only able to be spent once.
In any centralized system, like a database holding key information about driving licenses in a country, a central administrator has the authority to maintain and update the database. The task of making any updates – like adding/deleting/updating names of people who qualified for certain licenses – is performed by a central authority who remains the sole in-charge of maintaining genuine records. Public blockchains that operate as decentralized, self-regulating systems work on a global scale without any single authority. They involve contributions from hundreds of thousands of participants who work on verification and authentication of transactions occurring on the blockchain, and on the block mining activities.
In such a dynamically changing status of the blockchain, these publicly shared ledgers need an efficient, fair, real-time, functional, reliable, and secure mechanism to ensure that all the transactions occurring on the network are genuine and all participants agree on a consensus on the status of the ledger. This all-important task is performed by the consensus mechanism, which is a set of rules that decides on the contributions by the various participants of the blockchain. There are different kinds of consensus mechanism algorithms which are used by BitBlockchain and work on different principles.
The initial concept of Proof of Work was developed in 1993, as a way to prevent denial of service attacks and other service abuse (such as spam on a network). It consisted of requiring some kind of work from the users, usually involving computer processing.
In 2009, Bitcoin introduced an innovative way of using Proof of Work, as a consensus algorithm. In this case, PoW is used to validate transactions that are gathered into blocks, which are linked together to form a blockchain.
Since then, PoW has spread to become a widely used consensus algorithm and is now deployed by many cryptocurrencies.
In short, miners compete against each other in solving complex computational puzzles. These puzzles are difficult to solve, but when solved, the solutions can be quickly verified. So, once a miner finds the solution to a new block, they can broadcast that block to the network. All other miners will then verify that the solution is correct and the block will likely be confirmed.
The Proof of Stake consensus algorithm was introduced back in 2011 on the Bitcointalk forum to solve the problems of the current most popular algorithm in use - Proof of Work. While they both share the same goal of reaching consensus in the blockchain, the process to reach the goal is quite different.
The Proof Of Stake algorithm uses a random election process to select a node to be the validator of the next block, based on a combination of factors that could include the staking age, randomization, and the node’s wealth.
It’s good to note that in Proof of Stake systems, blocks are said to be ‘forged’ rather than mined. Cryptocurrencies using Proof of Stake often start by selling pre-mined coins or they launch with the Proof of Work algorithm and later switch over to Proof of Stake.
Where in Proof of Work-based systems more and more cryptocurrency is created as rewards for miners, the Proof-of-Stake system usually uses transaction fees as a reward.
Users who want to participate in the forging process, are required to lock a certain amount of coins into the network as their stake. The size of the stake determines the chances for a node to be selected as the next validator to forge the next block - the bigger the stake, the bigger the chances. In order for the process not to favor only the wealthiest nodes in the network, more unique methods are added into the selection process.
Proof of Authority (PoA) is a reputation-based consensus algorithm that introduces a practical and efficient solution for blockchain networks (especially the private ones). The term was proposed in 2017 by Ethereum co-founder and former CTO Gavin Wood. The PoA consensus algorithm leverages the value of identities, which means that block validators are not staking coins but their own reputation instead. Therefore, PoA blockchains are secured by the validating nodes that are arbitrarily selected as trustworthy entities.
The Proof of Authority model relies on a limited number of block validators and this is what makes it a highly scalable system. Blocks and transactions are verified by pre-approved participants, who act as moderators of the system.
PoA consensus algorithm may be applied in a variety of scenarios and is deemed a high-value option for logistical applications. When it comes to supply chains, for example, PoA is considered an effective and reasonable solution. The Proof of Authority model enables companies to maintain their privacy while availing the benefits of blockchain technology. Microsoft Azure is another example where the PoA is being implemented. In a few words, the Azure platform provides solutions for private networks, with a system that does not require a native currency like the ether ‘gas’, since there is no need for mining.
There is more than one version of PoB, but the concept of Proof of Burn idealized by Iain Stewart is probably the most acknowledged within the cryptocurrency space. It was proposed as a more sustainable alternative to the PoW consensus algorithm. Essentially, Proof of Burn looks like a Proof of Work algorithm but with reduced rates of energy consumption. The block validation process of PoB-based networks does not require the use of powerful computational resources and does not depend on powerful mining hardware (like ASICs). Instead, cryptocurrencies are intentionally burned as a way to “invest” resources in the blockchain, so the candidate miners are not required to invest physical resources. In PoB systems, miners invest in virtual mining rigs (or virtual mining power).
In other words, by performing coin burns, users are able to demonstrate their commitment to the network, gaining the right to “mine” and validate transactions. Since the process of burning coins represents virtual mining power the more coins a user burns in favor of the system, the more mining power he/she has and, thus, the higher the chances to be chosen as the next block validator.
Delayed Proof of Work (dPoW) is a security mechanism designed by the Komodo project. It is basically a modified version of the Proof of Work (PoW) consensus algorithm that makes use of Bitcoin blockchain’s hashpower as a way to enhance network security. By using dPoW, Komodo developers are able to secure not only their own network but also any third-party chain that ends up joining the Komodo ecosystem in the future. In fact, dPoW can be implemented for any project that develops an independent blockchain using a UTXO model.
Taking Komodo as one example, the dPoW security mechanism was developed and implemented into the Zcash code base, allowing zero-knowledge privacy and increasing network security by leveraging Bitcoin’s hash rate.
At intervals of ten minutes, the Komodo system takes a snapshot of its own blockchain. Then, the snapshot is written into a block on the Bitcoin network in a process called notarization. Basically, this process creates a backup of the entire Komodo system, which is saved within the Bitcoin blockchain.
The Delegated Proof of Stake (DPoS) consensus algorithm is considered by many as a more efficient and democratic version of the preceding PoS mechanism.
Both PoS and DPoS are used as an alternative to the Proof of Work consensus algorithm, since a PoW system requires, by design, lots of external resources. The Proof of Work algorithm makes use of a large amount of computational work in order to secure an immutable, decentralized and transparent distributed ledger. Contrarily, PoS and DPoS require fewer resources and are, by design, more sustainable and eco-friendly. To understand how Delegated Proof of Stake works, one must first grasp the basics of the Proof of Work and Proof of Stake algorithms that preceded it.
The Delegated Proof of Stake (DPoS) consensus algorithm was developed by Daniel Larimer, in 2014. Bitshares, Steem, Ark, and Lisk are some of the cryptocurrency projects that make use of DPoS consensus algorithm. A DPoS-based blockchain counts with a voting system where stakeholders outsource their work to a third-party. In other words, they are able to vote for a few delegates that will secure the network on their behalf. The delegates may also be referred to as witnesses and they are responsible for achieving consensus during the generation and validation of new blocks. The voting power is proportional to the number of coins each user holds. The voting system varies from project to project, but in general, each delegate presents an individual proposal when asking for votes. Usually, the rewards collected by the delegates are proportionally shared with their respective electors. Therefore, the DPoS algorithm creates a voting system that is directly dependent on the delegates’ reputation. If an elected node misbehaves or does not work efficiently, it will be quickly expelled and replaced by another one. In regards to performance, DPoS blockchains are more scalable, being able to process more transactions per second (TPS), when compared to PoW and PoS.