One of the most crucial aspects of blockchain technology is the consensus mechanism it uses. In the traditional financial system, the decision-making structure is centralized. There is no need to arrive at a common ground or consensus as decisions taken by an officeholder. But, in a distributed system like the blockchain system, all nodes in the network need to achieve a consensus or agreement on a single data value, checking for accuracy, before adding it to the block. A consensus mechanism ensures that no single party tampers with the records and that the information recorded is true and correct.
There are multiple ways through which a blockchain network can achieve consensus. In this blog, we will be examining the six popular types of consensus mechanisms used by various crypto projects.
- A consensus mechanism is a way to achieve agreement on a single data value in a distributed system.
- Proof-of-Work and Proof-of-Stake are the commonest consensus mechanisms used.
- Proof-of-Work, the first consensus mechanism, was invented by Bitcoin founder Satoshi Nakamoto and is extremely energy-intensive.
- Crypto projects can build their own consensus mechanisms based on their project type and requirements.
Crypto projects choose consensus mechanisms based on the project type and their requirements. They can also develop new consensus mechanisms if the existing ones don’t work.
The following are six common consensus mechanisms used widely by crypto projects.
Proof-of-Work (PoW), the first consensus mechanism to be used in the crypto world, was invented by the founder of Bitcoin. It is popularly known as mining and is extremely computation-intensive.
In PoW, in order to process a block of transactions, a miner—also known as a “specialized node”—needs to find the hash, a 64-digit hexadecimal number, by solving an extremely complicated mathematical puzzle. The miner who finds the hash first can add the new block of transactions to the blockchain, and a block reward is generated.
The puzzles require intensive computational power as it is not possible to decrypt them manually. The higher the computational power, the greater is the chance of creating the next block.
Cryptocurrencies that use a PoW consensus mechanism thus specify the hardware type for mining purposes. For example, Bitcoin uses Application-Specific Integrated Chips (ASICs), while Dogecoin can be mined using a Graphics Processing Unit (GPU). Compared to other consensus mechanisms, PoW is expensive because running the mining units needs expensive hardware and consumes a lot of electricity.
Top PoW Coins: Bitcoin, Dogecoin, Ethereum, and Litecoin.
Proof-of-Stake (PoS) is an inexpensive way to achieve consensus in blockchains and is widely used in crypto projects nowadays. Even Ethereum is migrating from PoW to PoS soon because of its many benefits.
In PoS, participants interested in validating transactions must stake or lock in a fixed minimum number of coins in a specific wallet. The network protocol then selects the validators on a random basis, with the staked coins acting as security/collateral, ensuring that the participant will remain honest. If the protocol detects any manipulation or fraud, the protocol forfeits the staked coins of the validator as a penalty.
PoS utilizes 99% less electricity compared to PoW, and one doesn’t have to invest in acquiring any hardware. The validator gets dual benefits: a reward for validating transactions, and a rise in the price of the token over the long term as the token sits in the wallet.
Top PoS Coins: AAVE, Binance, Cardano, and Algorand.
Delegated Proof of Stake (DPoS)
The concept of Delegated Proof of Stake (DPoS) has been borrowed from the PoS, as the name suggests. But, it has a few additional checks and is considered to be more democratic.
As mentioned before, in PoS, the protocol randomly selects the validator. By contrast, in DPoS, all token holders can select stakers and delegate the task to validate transactions. The mechanism remains truly decentralized, as all the token holders are fully authorized to select validators.
The DPoS consensus mechanism results in faster transaction verification, which ultimately results in the blockchain network achieving higher scalability.
Top DPoS Coins: Terra, Tron, Tezos, and EOS.
Byzantine Fault Tolerance
The Byzantine Fault Tolerance (BFT) mechanism solves what is known as the Byzantine Generals’ Problem, which has its origin in game theory. The problem describes how difficult it is to reach a consensus in a distributed system without a trusted centralized authority.
In the problem, a group of army generals are in a dilemma. They have surrounded a Byzantine city to besiege it. But they are all located far away from each other and there is no secure channel to communicate. Should they attack the city or retreat? How do they decide? And, if they choose to attack, when should they start? How can the generals make a decision?
Now let’s return to the subject of blockchains and their consensus problem. In the BFT mechanism, every node (miner) maintains an internal state. When a node receives a request to validate a transaction, all the nodes run a computation using the internal state to verify the transaction. Once all the nodes share their results, a final decision is made based on it. If the results of more than two-thirds of the nodes match, the transaction is added to the block.
One of the benefits of BFT is that the system doesn’t collapse even if a few of the nodes act maliciously.
Top BFT Coins: Polkadot, KEEP, and Chromia.
Proof-of-History (PoH) is a unique, hybrid consensus mechanism combining features of the PoS mechanism that ensures transaction processing on the blockchain is very fast while keeping it highly decentralized.
In PoH, every transaction is cryptographically hashed with the SHA256 function as and when it is received. It generates an output, which is different from the input value and usually hard to predict. The transaction output is used as the input for the next hash, building a sequence/chain of transactions into the hashed output.
This creates a chain of a verifiable sequence of transactions, which validators can add to the block, eliminating the need for a conventional timestamp. Every hashing function takes a fixed amount of time to be completed, and PoH makes it easier for validators to check how much time has passed.
Now let’s look at an example to make sure we understand.
Suppose there are three transactions: A, B, and C. Using the PoH consensus mechanism, every transaction is cryptographically hashed, which generates an encrypted version of the transaction with a timestamp. For instance, PoH (A, timestamp 1)–PoH (B, timestamp 2)–PoH (C, timestamp 3).
Thus, a chain of a verifiable sequence of transactions is generated, eliminating the need for manual validation. And if the timestamp of transaction B is recorded as 0, the whole blockchain will be affected.
Top PoH Coins: Solana
Directed Acyclic Graph
One of the biggest drawbacks of first and second-generation blockchain architectures is they cannot create blocks simultaneously. One needs to wait for their transactions to be added to the next blockchain. This means bottlenecks are created, the transaction processing time increases, and there will be scalability issues.
In Directed Acyclic Graph (DAG) consensus mechanism, transactions can be processed simultaneously in different blocks, increasing transaction throughput and resulting in high blockchain scalability. A DAG can become a crucial component in future blockchain networks, as it will enable instant transactions with a minimum fee.
Top DAG Coins: IOTA, and Nano.
Over the years, blockchain technology has evolved a lot, and so have the consensus mechanisms. Nowadays, because of environmental concerns, crypto projects are increasingly turning to consensus mechanisms that use significantly fewer resources but are highly efficient.
However, whatever type of consensus mechanism the project uses, the end objective is to ensure consensus among all participants in the network and secure the blockchain.
Download the CoinSwitch app and start exploring the world of cryptocurrencies.
Disclaimer : Crypto products and NFTs are unregulated and can be highly risky. There may be no regulatory recourse for any loss from such transactions. The information provided in this post is not to be considered as investment/financial advice from CoinSwitch. Any action taken upon the information shall be at user's own risk.
Table of content
Subscribe to Our Newsletter with exclusive content.