What Is a Consensus Mechanism?

Cryptocurrency and blockchain technology rely on consensus mechanisms to function and be trusted by users.
Crypto Explainer+
Beginner

Benedict George is a freelance writer for CoinDesk. He has worked as a reporter on European oil markets since 2019 at Argus Media and his work has appeared in BreakerMag, MoneyWeek and The Sunday Times. He does not hold any cryptocurrency.

The blockchain is a distributed database that records data and allows users to exchange and store value in the form of cryptocurrency. To coordinate and maintain such a decentralized system, the participants must agree on the correct condition of the system and who owns what at any time.

A consensus mechanism is the standardized way of how the blockchain’s nodes – the computers that run the blockchain and keep the records of all transactions – reliably reach this agreement.

Read more: What Is a Node?

Why consensus is important

The goal of a consensus mechanism in the world of crypto is to prevent bad actors from deliberately cheating. The classic example of cheating in the world of crypto is “double-spending.”

Suppose Anthony, the bad guy in this scenario, tries to cheat by transferring 10 tokens to Bethany and then trying to transfer the exact same 10 tokens to Chris. The challenge is to make sure everyone can always know and agree on who owns which tokens. With that agreement, or consensus, Chris would already know that Anthony no longer owns the tokens he is proposing to send.

To “double-spend,” a bad actor would need to get the nodes to adopt a false history of the transactions, a narrative where the bad actor has not spent the tokens and given them to Bethany.

Consensus mechanisms solve the double-spending problem by making it expensive and difficult to propose a new block of validated transactions, discouraging bad actors from trying.

Simultaneously, the mechanisms incentivize the "good" nodes to propose blocks they genuinely believe will be accepted in order to receive valuable rewards. As long as there are more good actors than bad actors, Anthony will not be able to change the records on the blockchain to falsify his transaction with Bethany.

Types of consensus mechanisms

The huge number of crypto projects out there have explored a variety of different consensus mechanisms.

The two most widespread consensus mechanism are:

An underlying factor to the design of both is to make it extremely expensive to undermine the consensus mechanism in place. The difference between them is how they achieve it.

How consensus works

In the case of Proof-of-Work blockchains such as Bitcoin, consensus requires a significant amount of energy, hardware and computing power to propose a new group of transactions – called a block – to the ledger.

The nodes that validate transactions and propose new blocks are called miners. Miners compete to generate a random number to unlock the next block on the chain. The quickest miner to reach that number adds the next block and in exchange for the effort it receives a block reward. The only way to win is to generate random numbers as quickly as possible (the "work" in the name) and get lucky. That is a contest of computing power, which in turn requires hardware and electricity.

When it comes to Proof-of-Stake blockchains, the nodes – often referred to as validators – that verify transactions and propose new blocks are required to lock up a certain amount of value in the form of the blockchain’s native token – that’s their stake in the system. The more value a validator deposits, the bigger chance they have to propose a new block and earn the block reward. If a validator commits an error, it has to pay a fee or can be excluded from the validation.

Read More: What Is Staking?

This article was originally published on May 16, 2022 at 8:57 p.m. UTC

DISCLOSURE

Please note that our privacy policy, terms of use, cookies, and do not sell my personal information has been updated.

The leader in news and information on cryptocurrency, digital assets and the future of money, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups. As part of their compensation, certain CoinDesk employees, including editorial employees, may receive exposure to DCG equity in the form of stock appreciation rights, which vest over a multi-year period. CoinDesk journalists are not allowed to purchase stock outright in DCG.

CoinDesk - Unknown

Benedict George is a freelance writer for CoinDesk. He has worked as a reporter on European oil markets since 2019 at Argus Media and his work has appeared in BreakerMag, MoneyWeek and The Sunday Times. He does not hold any cryptocurrency.

CoinDesk - Unknown

Benedict George is a freelance writer for CoinDesk. He has worked as a reporter on European oil markets since 2019 at Argus Media and his work has appeared in BreakerMag, MoneyWeek and The Sunday Times. He does not hold any cryptocurrency.

Related stories

CoinDesk - Unknown
El Salvador Purchases 80 Additional Bitcoin at $19K, President Bukele Says

The last purchase by the Central American country had been in May.

CoinDesk - Unknown
CoinDesk - Unknown
VanEck Files New Application for Spot Bitcoin ETF

The application comes about eight months after the SEC rejected the investment firm’s last application.

CoinDesk - Unknown
CoinDesk - Unknown
First Mover Asia: Speculating on Tokenized Carbon Offsets Won't Help Climate Crisis, Says Consultant; BTC Falls Under $19K Amid Wider Crypto Woes

A significant number of carbon credits are from projects 8-10 years old; Ether and other major altcoins plummet.

CoinDesk - Unknown
CoinDesk - Unknown
Crypto Lender Celsius Network Exploring Options to ‘Preserve and Protect’ Assets

Celsius Network is consulting with experts to try to reduce the fallout from its mid-June swoon.

CoinDesk - Unknown

Crypto Terms

background

Crypto Flashcards & Glossary

View All