More

    Types of Consensus Mechanisms: Why Do They Matter

    How can a network of nodes communicate efficiently if they are distributed? The decentralization of the blockchain urges the nodes operating the network to agree on the ledger’s state independently. Since there is no central governance operating the blockchain, the network’s participants might face communication problems that will lead to double spending. Hence, the blockchain is said to have reached a consensus if all nodes can agree on a single truth. So, what is a consensus mechanism? 

    The Byzantine Fault 

    Any distributed system needs to be fault-tolerant in order to be efficient. What does that mean? Well, a game theory problem known as the Byzantine generals problem suggests that distributed systems have difficulty agreeing on a certain reality. The theory makes an analogy of miscommunication happening between generals that are besieging Byzantium. If all generals attack at the same time, they win, if not, they lose. 

    The Byzantine Fault

    The same thing happens in distributed systems such as the blockchain. Nodes have to process and validate transactions correctly in order to avoid double-spending. Let’s better understand this idea. 

    Crypto mining or validation process takes place when a user conducts a transaction. Each node operating the blockchain receives the transaction and validates it. Then, each node adds the transaction to its own block. So, who gets to add the block to the blockchain? 

    If two nodes add their blocks with the same transaction, this means that the transaction is spent twice. So, there must be a system that prioritizes who gets to add his block. This is known as a consensus mechanism. 

    So, What Is a Consensus Mechanism? 

    A consensus mechanism is a system that dictates who gets to publish the subsequent block to the blockchain. Since there are thousands of nodes competing for a chance to add their blocks, a consensus mechanism will coordinate between them to avoid mishaps. Also, the node’s motivation to add blocks is usually monetary gains. That’s because the node that successfully mines a block gets block rewards

    That means, that most nodes’ motivation is not always the welfare of other nodes or the network. Therefore, consensus mechanisms allow people to cooperate despite their mutual mistrust. However, consensus mechanisms are not an easy thing to implement. 

    Consensus algorithms need to be immune to node failure, message delays, malicious nodes, corrupted message attacks, and much more mishaps. This has caused the emergence of several consensus mechanisms that address these issues. Some mechanisms prioritize efficiency and speed while others prioritize security. 

    These consensus mechanisms protect the network from attacks where one node can gain more than half of the hashing power. These are called Sybil attacks, and consensus mechanisms use chain selection rules to mitigate these attacks. For instance, in some blockchains, the network refers to the longest chain rule where the longest chain is the one that is considered valid. 

    Consensus Blockchain

    Here are some of the characteristics of consensus mechanisms: 

    • Security: An Efficient consensus would be one where all nodes produce the same valid output. 
    • Fault Tolerance: A consensus mechanism should mitigate the Byzantine fault by ensuring that all nodes continue to work together if one of them goes down. 
    • Liveness: Consensus mechanisms need to guarantee that they can exchange messages between nodes, allowing the network to reach a consensus.  

    Types of Consensus Mechanisms

    There are many types of consensus mechanisms with each their own principles. Although proof-of-work and proof-of-stake dominate the blockchain space, there are other mechanisms that are worthy to note. 

    Proof-of-Work (PoW)

    Proof-of-work is considered to be the father of all consensus mechanisms. Satoshi Nakamoto (the creator of Bitcoin) was the first to implement the algorithm for cryptocurrencies. Proof-of-Work blockchains operate through mining. 

    Nodes are incentivized to mine a block in return for block rewards and transaction fees. The higher the transaction fees, the more likely a node will verify it. PoW requires nodes to compete with each other to solve a complex computational problem. So, they are proving the amount of work they’ve put in. The winner will get to add thor block to the blockchain, and thus, a consensus would be reached that creates valid sequential blocks. 

    Proof-of-work-consensus

    The computational puzzle is basically miners looking for the right nonce to reach the target hash set by the protocol. Each block has a hash function, in order to become a valid block, a numeric value known as nonce has to be altered again and again to get the desired hash. This requires huge amounts of computational resources, and miners sometimes have to join a mining pool in order to use the resources efficiently. 

    Advantages:
    • Decentralization: The even distribution of the PoW consensus guarantees the decentralization of the network, eliminating the possibility of one entity’s selfish control. 
    • Security: PoW is extremely secure since it requires massive computational power. That means the chance of a single entity acquiring this much power is almost negligible. 
    • Scalability: Although not ideally scalable, PoW blockchains are scalable just enough to have them operating.
    Disadvantages:
    • Energy-intensive: Since PoW consensus requires huge amounts of computational power, that means that the mechanism is energy-hungry and inefficient. This can have major negative consequences on the environment
    • Hardware Dependency: Mining requires specialized hardware that can be very expensive. Since each year the mining difficulty increases, mining is no longer efficient on high GPU and CPU systems. It now requires specialized Application-Specific Integrated Circuits (ASICs). 
    • Slow Block Time: The process of validating a block can take a long time, which creates delays and ultimately a bad user experience.

    Notable Blockchains: Bitcoin (BTC), Dogecoin (DOGE), Litecoin (LTC).

    Proof-of-Stake (PoS)

    The second most famous consensus mechanism is Proof-of-Stake which came as a solution to PoW’s energy inefficiency. Although both mechanisms have the same goal, they approach validation in different ways. Miners in PoS blockchains are now Stakers or Validators. This is because mining is not a part of the PoS process. 

    Staking means locking up assets to get rewards. Validators are required to lock up their assets for a chance to add their blocks to the blockchain. Validators are then selected randomly by a staking function to confirm blocks. This eliminates the need for expensive sophisticated hardware that consumes a lot of energy. The new blocks in PoS blockchains are referred to as minted rather than mined. 

    Proof-of-stake-consensus

    If a validator wanted to abuse the network maliciously, they would be punished by losing their staked crypto. In an update known as the Merge, Ethereum shifted its consensus mechanism from PoW to PoS and reduced over 90% of its energy consumption. 

    It is important to note that not just anyone can become a validator. Each blockchain will have a minimum amount of staked crypto needed in order to participate in the validation process. For example, Ethereum’s required staked crypto is 32 ETH. The more a validator stake crypto, the higher its chance to be chosen by the algorithm. 

    Advantages:
    • Energy-Efficient: PoS uses 99% less energy than PoW consensus mechanisms, which means it is more eco-friendly. 
    • Independent to Hardware: It is easier to become a validator in PoS blockchains than PoW since there is no required hardware. 
    • Fast Block Time: PoS consensus can create blocks within seconds, which is much faster than PoW consensus. 
    Disadvantages:
    • Can be Centralized: It is hard to acquire more than half of the computational power in PoW blockchains, however, it is not that hard in PoS blockchains. That’s because a small entity can acquire a large amount of locked assets, and therefore influence the network. Which can lead to the ledger’s centralization. 

    Notable Blockchains:  Ethereum (ETH), Binance (BNB), Cardano (ADA). 

    Delegated Proof-of-Stake (DPoS)

    The delegated Proof-of-Stake is a consensus mechanism that improves upon the regular PoS consensus. Instead of having all stakers participate in the validation process, only a number of delegates get to do the job. Each validator would vote for a delegate by staking their tokens and associating them with a desired delegate. 

    The elected delegates will receive the transaction fees for validating a block, which they will share with the voters. The delegates are also referred to as witnesses. 

    Delegated Proof-of-Stake

    Advantages: 
    • Scalability: DPoS consensus is more scalable than regular PoS. That’s because not all stakers have to validate transactions, only a small number of delegates get to participate in the validation process. 
    • Energy-Efficient: Since it’s a variation of PoS, it does not require energy-intensive computational resources. 
    Disadvantages:
    • Can be Centralized: Since only a small number of delegates control the validation process, the mechanism is prone to centralization. 
    • Low-Security: The lack of decentralization makes the network prone to 51% attacks. 

    Notable Blockchains: Solana (SOL), TRON (TRX), EOS (EOS). 

    Proof-of-Weight (PoWeight)

    This consensus mechanism was first created for the Algorand blockchain. Basically, the PoWeight consensus gives the validator a certain weight based on how much cryptocurrency they’re holding. It’s important to note that PoWeight doesn’t require the lock-up of assets like it is in PoS. Validators only have to have tokens

    The weight of users is determined by how much cryptocurrency they own. The algorithm will then pick random validators depending on their weight. Honest users must have approximately around ⅔ of the network’s money.

    Proof-of-Weight

    Advantages:
    • Scalability: Since only the committee members participate in the validation process,  the confirming time is faster than other consensus algorithms. 
    • Energy-Efficient: The PoWeight consensus doesn’t require power consumption, only validators to hold cryptocurrencies. 
    Disadvantages:
    • No Rewards: Other consensus mechanisms such as PoW, PoS, and others give incentives to validators via block rewards and transaction fees. However, PoWeight validators don’t receive any monetary rewards. 
    • Can be Centralized: Just like DPoS, the committee can become centralized. 

    Proof-of-Authority (PoA)

    The Proof-of-Authority consensus mechanism utilizes the identity of validators. Instead of staking their crypto, validators are somewhat staking their reputation. The algorithm then selects a validator randomly based on their trustworthy aspect. This also makes it easier to detect any malicious player by referring to his identity. 

    Proof-of-Authority

    Advantages:
    • Security: This consensus mechanism ensures the network’s security by acknowledging the participants’ identities, which can make it easy to take legal action in case of an attack. 
    • Fast Block Time: PoA has few trustworthy participants which can make the verification process more efficient. 
    • Energy-Efficient: Although this consensus uses energy to operate, it is in no way near the energy consumed in PoW blockchains. 
    Disadvantages:
    • Can be Centralized: The consensus power is only concentrated in a few participants, which can put a threat to the network’s decentralization. 
    • No Anonymity: Although it is an obvious one, however, blockchains are data ledgers that protect the anonymity of the users. However, PoA exposes the identity of users. 

    Proof-of-Importance (PoI)

    Just like the Proof-of-Weight consensus mechanism, Proof-of-Importance ranks validators based on their importance in the network. The importance however is not only based on how much crypto they hold, nor on how much they’ve staked like in PoS consensus. Instead, PoI takes it to the next level. 

    This consensus was introduced for the NEM blockchain, where eligible validators have to have in their account at least 10,000 XEM. The criteria for deciding the importance of a validator are:

    • The amount of crypto in an account.
    • The amount of activity the account conducts.
    • The volume of each transaction. 

    Proof-of-Importance

    Advantages:
    • Security: It is unlikely for validators to corrupt the blockchain since it is very costly to be eligible in the first place. 
    • Rewards Participation: PoI rewards general participation and keeps everyone involved in the network. 

    Disadvantages:

    • Unfair: This consensus mechanism is unfair since it only favors the rich who are eligible to be validators. Which can keep people from participating simply because they don’t have the funds. 
    • Little Incentive: There isn’t much incentive that motivates validators to participate in the network. 

    The Bottom Line

    Consensus mechanisms are a vital element of the blockchain ecosystem. Without these algorithms, decentralized networks would ultimately fail from the lack of communication. Consensus algorithms provide a systemized way where all network participants agree on a certain truth. 

    The different types of consensus mechanisms offer blockchain a different approach to navigate scalability, security, and decentralization, in hopes of answering the blockchain trilemma

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    Stay in the Loop

    Stay in the loop with blockchain Witcher and get the lastest updates.

     

    Latest stories

    You might also like...