Consensus Mechanism Overview
A decentralised system implies that no single participant has control over the system’s rules, inputs and outputs. Security therefore becomes the biggest challenge to any decentralised system. This is especially true when participants don’t trust each other, and the system provides a record of transactions that ascribe value (like on a public blockchain).
Without third-party verification, how can participants validate transactions and prevent malicious actors from imposing fake and fraudulent information?
Satoshi Nakamoto provided a solution to this question by combining various ideas to create a distributed, immutable, and cryptographic ledger of transactions .1 At its core is the proof-of-work consensus mechanism – a way to verify transactions by proving to others that considerable computing efforts were spent for the information to be appended to the ledger.
What’s a Consensus Mechanism?
A consensus mechanism is an algorithm to approve transactions or records onto a decentralised ledger such that fake or fraudulent records are rejected.
The algorithm is run when new blocks are being appended to the existing chain of blocks, which is how the blockchain gets updated as an append-only ledger.
The idea is that by imposing a requirement of certain effort spent (or risk taken), malicious actors would refrain from tempering with the ledger as they deem the effort (or loss) to be unprofitable. The very first purpose of proof of work’s invention was to filter email spam.
Hashcash, a proof-of-work system proposed by Adam Back in 1997, requires email senders to create and attach stamps on email headers to prove to receivers that they spent central processing unit (CPU) power to generate emails. These stamps are one-way encryption algorithms that are easy to verify by the receiver but hard (in computing terms) to generate by the sender. In this model, spammers would be reluctant to send out large quantities of email as it becomes unprofitable to use a large amount of CPU power to create stamps. However, the price of sending a single email is still affordable by regular users.
Since consensus mechanisms in the blockchain world are generally referred to as activities of “mining” and “staking,” they are frequently regarded as methods to issue new coins. However, their primary purpose is to secure the decentralised network, whereas rewards in the form of coins are an added economic incentive for workers to maintain the network.
Source: Zhanga, Shijie and Lee, Jong-Hyouk. Analysis of the main consensus protocols of blockchain. Science Direct Vol. 6, Issue 2. June 2020.
Major consensus mechanisms include proof-of-work (PoW), proof-of-stake (PoS), delegated proof-of-stake (DPoS).
PoW is the oldest consensus mechanism. It accounts for more than 75% of the market cap of blockchain protocols. It is used by Bitcoin, Ethereum (up to Serenity), and Litecoin etc.2
In PoW, miners append new block with transaction information to existing blocks (called mining), via finding a random number (called nonce) that can be run through a universal encrypting function to the network (called hash) and can satisfy a difficulty requirement. This consists of the process of “solving” the mathematical task, which demands considerable energy and effort.
PoS, on the other hand, doesn’t require participants to use computing power to hash blocks and solve a mathematical requirement, but it requires them to stake ether. Participants are randomly selected to become block validators based on their wealth, and validators need to stake an amount of cryptocurrency that covers the transaction fee and their potential reward until the block is successfully appended. If inconsistent, absent, and abnormal behaviors are detected, dishonest participants could lose their stakes and be banned from the network.
DPoS is a variation of PoS. It changes the selection process in PoS from randomised algorithms to a more democratic approach, allowing stakers to vote for their representatives, who would carry out the validation act.
Besides PoW, PoS, and DPoS, there are many proof-of-X mechanisms that try to establish a decentralised and secure network. They include proof-of-capacity, proof-of-elapsed time, proof-of-importance, etc.
Another major family of consensus mechanisms is Byzantine Fault Tolerance; this is the feature of a distributed network to reach consensus(agreement on the same value) even when some of the nodes in the network fail to respond or respond with incorrect information. It has several variations such as practical Byzantine Fault Tolerance (pBFT), which is currently used by Hyperledger Fabric, and its improved version is used by the People’s Bank of China (PBoC) to develop its Central Bank Digital Currency (CBDC). Another variation is called delegated Byzantine Fault Tolerance (dBFT), which is used by Neo. The Stellar network’s model of consensus leverages a federated Byzantine agreement (FBA) model, and it seeks to build upon these models to build an open network for storing and moving money.
Source: Zhanga, Shijie and Lee, Jong-Hyouk. Analysis of the main consensus protocols of blockchain. Science Direct Vol. 6, Issue 2. June 2020. This chart summarizes the differences of discussed consensus mechanisms. Finality type refers to the model of how committed blocks are confirmed and irreversible. Probabilistic finality means that blocks are increasingly difficult to be reverted as the blockchain gets longer. Absolute finality means that blocks are finalized as soon as they are appended to the blockchain. Fault tolerance refers to a system's tolerance of malfunctioned or malicious components that would prevent it from operating. Power consumption refers to if the system consumes large amount of energy. Scalability refers to how easy the system can grow and expand. Application refers to the ideal type of blockchain the consensus mechanism should be utilized in. Public refers to blockchains that can be accessed to everyone. Private refers to blockchains that require permissions to join.
Source: Zhanga, Shijie and Lee, Jong-Hyouk. Analysis of the main consensus protocols of blockchain. Science Direct Vol. 6, Issue 2. June 2020. This chart summarizes the differences of discussed consensus mechanisms. Finality type refers to the model of how committed blocks are confirmed and irreversible. Probabilistic finality means that blocks are increasingly difficult to be reverted as the blockchain gets longer. Absolute finality means that blocks are finalized as soon as they are appended to the blockchain. Fault tolerance refers to a system's tolerance of malfunctioned or malicious components that would prevent it from operating. Power consumption refers to if the system consumes large amount of energy. Scalability refers to how easy the system can grow and expand. Application refers to the ideal type of blockchain the consensus mechanism should be utilized in. Public refers to blockchains that can be accessed to everyone. Private refers to blockchains that require permissions to join.
Conclusion
The consensus mechanism is a key component to a decentralised network. It not only secures the system but also affects its efficiency and scalability.
Since Bitcoin’s birth there have been many other consensus mechanisms created. Each of them has its own characteristics that determine the associated network’s attributes. To learn more about them and how they differ, you can read more here.
Sources
1 https://queue.acm.org/detail.cfm?id=3136559
2 As of 7/23/2021. Calculated using CoinMarketCap data.