Inside The Blockchain: Advanced Consensus Mechanisms

In blockchain, where recorded data is stored, managed and distributed across several computers in a peer-to-peer network scattered across the globe, there needs to be a way to resolve disputes when participants in the network disagree. Enter consensus mechanisms — the common ground foundational to decentralized platforms that hold nodes in the net.

What Is a Consensus Mechanism?

A consensus mechanism is a self-regulatory stack of software protocols written into a blockchain’s code that synchronizes a network into agreement about the state of a digital ledger. This is done by upkeeping a single data set — the mutually agreed-upon version of a blockchain’s transaction history — rather than employing each node, or in-network computer, to individually maintain their own copy of the database in its entirety.

Although there are a variety of consensus mechanisms to consider when programming a network’s standard for verification, each approach is wired to discredit cheaters in their attempts to contradict the record.

How Does a Consensus Mechanism Work?

Nodes input data from a pending transaction, then report back with an approval or disapproval status once the request is cross-checked with its records. For example, if a user is trying to process a transaction using previously spent coins that have already been accounted for, this request would easily be denied against an immutable ledger, confirmed by majority disapproval. Users that fail to adhere to consensus are often banned from a network.

In the event a node wanted to challenge the record, they would have to request a network-wide recall. If more than two thirds of their peer nodes approve, then the transaction is confirmed, distributed and permanently written into the blockchain.

“One of the most helpful examples of consensus mechanisms in action is the way that humans agree on the rules of a game.”

“‘Consensus’ simply means an agreement between a group of people, and in the world of blockchain it is an important concept,” said Nick Ranga, a senior cryptocurrency analyst at watchdog agency Forex Fraud.

Consider a consensus mechanism’s role in decentralized finance. The core centralized framework built into most institutions, such as banks, rely on a decision-making authority to approve or reject transactions between two parties. Cryptocurrencies, however, don’t have this option since they are typically operating on decentralized platforms. Instead, they have consensus mechanisms, Ranga explained, which validate live copies of a transaction history network-wide. This keeps everyone in the blockchain accountable to whether a transaction should be approved or not.

Common examples of consensus mechanisms in blockchain include proof of work, in which crypto miners are handsomely rewarded with newly generated tokens in exchange for authenticating transactions by way of solving arbitrary computational puzzles, and proof of stake, where users put up a certain amount of tokens for a chance to earn rewards through transaction verification in a raffle. Staking more tokens gets the owners more lottery tickets.

“One of the most helpful examples of consensus mechanisms in action is the way that humans agree on the rules of a game,” said Zeeshan Arif, founder of software development company Whizpool, pointing to a game of Monopoly as an example.

“There are a lot of different ways to win the game. You could buy all the properties. You could end up with a lot of money in your bank account. Or you could bankrupt all your opponents and win that way,” Arif said. “But no matter what strategy you use to win, everyone playing has agreed that it is a fair way to end the game.”

Just like your dad can’t unilaterally declare eminent domain in Monopoly, nodes in a blockchain can’t reassign ownership of tokens without getting the majority of other participants in the network to agree.

Why Are Consensus Mechanisms Important in Blockchain?

Aside from their technical application — a fail safe for blockchain or widely distributed networks and systems — consensus mechanisms serve as incentive programs for good behavior. They are not only a decentralized fail-safe that ensures a system stays up and running; they are what create trust in a trustless environment.

Consensus mechanisms prevent double spending, when a digital token is spent more than once either intentionally, such as in fraud, or unintentionally, perhaps due to a glitch in the system.

“Without consensus, I could spend money in one place and then spend that same money again before the first transaction settles,” said Nicholas Edmonds, head blockchain engineer at impact tech company Topl.

With a debit card, he explained, this phenomenon usually results in an overdraft fee, ending with the user having to settle the difference with their bank. In contrast, consensus keeps track of network activity in real time, disallowing a user from double spending that money in the first place.

“Without consensus, I could spend money in one place and then spend that same money again before the first transaction settles.”

“Ultimately, this means that we can cultivate trust in the blockchain itself and it can operate in a truly decentralized manner,” Edmonds said.

For all the same reasons, these verification protocols protect networks against malicious activity.

“Without a consensus mechanism, it would be very easy for bad actors to corrupt the blockchain,” said Web3 builder Aaron Rafferty, the CEO of political NFT project BattlePACs and co-founder of impact investing collective StandardDAO.

Taking blockchain’s most popular verification model — proof-of-stake — for example, hackers would have to not only garner the lion share of validation power by the numbers, but they would also need to somehow hold half of the platform’s coins in order to verify a false transaction. This is because a proof-of-stake consensus mechanism authenticates by way of staking, where users lock their digital assets to participate and earn rewards.

“Bad actors are always a threat to any system,” Rafferty said. “But consensus mechanisms help to make it very difficult for them to corrupt a blockchain.”

More on Blockchain’s Role in Cyber Attack Prevention20 Blockchain in Cybersecurity Examples

Types of Consensus Mechanisms

Blockchain platforms have written and rewritten the rules of consensus in their search for the holy grail — a perfect equilibrium of decentralization, scalability and security. Because of this, a small library of methodologies have been developed for Web3 applications. Here are the five most common consensus practices.

Proof of Work

The genesis of all consensus mechanisms, proof of work depends on an army of miners, or validators, to verify transactions through solving arbitrary mathematical problems in the race for a block prize. Essentially, the energy-intensive process hires a network of specialized computers to solve for x, with x being a 64-digit hexadecimal number, known as a hash, which is encoded by cryptography. Crypto mining, the block generative process described above that can reap thousands in rewards in the form of new crypto tokens, is a popular use case for proof-of-work systems.

Pros: Arguably the most decentralized and secure of all verification mechanisms. Lauded as extremely reliable. In the case of Bitcoin, a generous bounty for block validation — currently valued at around $16,800 — has resulted in high engagement on the platform.

Cons: Slow transaction rates, expensive gas fees, expensive operational fees and eco-hazardous energy usage summarize the inefficiency associated with a proof-of-work system. Bitcoin’s average block time — the time it takes to process a transaction — is 10 minutes, and the process requires a staggering amount of electricity.

Examples: Bitcoin, Dogecoin, Litecoin

Proof of Stake

In a proof-of-stake model, users pledge a designated number of tokens in a process known as staking to receive validator privileges. When a user’s coins are staked, this means that they are locked away for the time being. Staked coins passively earn rewards and contribute to the network until the user unfreezes them, most often for the purpose of trade. Validating opportunities are rewarded at random, in a sort of lottery pool, to eligible validators. The more tokens staked, the likelier a users’ chances are to win the raffle. In addition to processing trades and adding blocks to the blockchain, validators stand in as active community members responsible for storing data. If any user breaks consensus, their stake is forfeited.

Pro: The optimal method of consensus in Web3 for scalability. It’s both energy efficient and inexpensive, in respect to both gas fees and equipment.

Cons: Not as decentralized or secure as proof of work. Power is delegated by wallet size.

Examples: Ethereum, Cardano, Tezos, Algorand

More on Blockchain’s Two Most Popular Consensus MechanismsProof of Stake Versus Proof of Work: Understanding the Differences

Delegated Proof of Stake

Imagine proof of stake, but with an electoral process. In this approach to determining consensus, network participants cast votes via staking pools for their favored delegate, those who are presumed to be best equipped to protect the network, based on reputation. As a result, validating privileges are reserved and awarded at random only to a team of top tier candidates. At any point in time, a validator can be surpassed by someone deemed more trustworthy.

Pros: This system is efficient and democratic. It improves from the original proof-of-stake method by being more financially inclusive to users and provides incentive for validators to remain accountable in keeping the network alive.

Cons: While there is an obvious tradeoff of decentralization, a delegated proof-of-stake protocol may be considered too high maintenance for some users as it requires a healthy level of engagement. Appointing network control to a few over many also increases its vulnerability to malicious actors, such as in a 51 percent attack.

Examples: EOS, Lisk, Ark, Tron, BitShares, Steem

Proof of Authority

Favored by private or permissioned blockchains, a proof-of-authority consensus mechanism selects validators based on reputation rather than a user’s digital assets. In this system, a group of validators are pre-approved in a vetting process that often includes a background check.

Pro: This method is highly scalable and requires virtually no computing power.

Con: Any structure designed to concentrate power compromises decentralization. Additionally, a validator’s pseudo-anonymity is forfeited, as public identifiability is part of the deal.

Examples: Xodex, JP Morgan (JPMCoin), VeChain (VET) and Ethereum Kovan testnet

Proof of History

Proof of history integrates the element of time into a blockchain’s protocol. During the verification process, timestamps are embedded into the hash of each generated block, chronicling a network’s transaction history in a singular, unbroken chain. It’s important to note that this verification method is only viable as a supplement to another protocol. The hybrid consensus algorithm is most often seen working in tandem with a proof-of-work or proof-of-stake system.

Pro: It’s fast and secure without negating a platform’s existing state of decentralization. Proof of history is also associated with low transaction costs, or “gas fees.” The most well known platform that uses proof of history, Solana, is widely regarded as the fastest blockchain in existence, boasting 400 millisecond block times.

Con: A major disadvantage to high transaction speeds is the amount of data that accumulates. The hardware fit to run such advanced software disqualifies the average user from being able to serve the network as a validator.

Examples: Solana