What is a blockchain consensus mechanism?
The beginner’s guide
Imagine you are the commander of an army comprising several platoons of soldiers, each located at a different drop off point. You plan to attack a single fortified area at a specific time. To do this, you must coordinate with each of your platoons to ensure they all know the correct time, location and plan of action.
But this poses a number of problems. What if one or multiple platoons decide to retreat at the last minute? What if they attack too early? What if they arrive at the wrong location? What if there are traitors in a platoon that attempt to sabotage the plan?
For the attack to work, it’s vital everyone reaches a unanimous agreement— also known as reaching consensus— on what the plan is. This example is based on the Byzantine Generals’ Problem; a concept published in a 1982 paper that illustrates the problems of building a robust communication system where its assumed participants in that system may act dishonestly.
Bitcoin became the first decentralized system to solve this long-standing problem by implementing something called a consensus mechanism.
Other types of consensus mechanisms
Beyond PoW and PoS, there have emerged dozens of different consensus mechanisms that represent novel or hybridized versions of the aforementioned mechanisms. Each attempt to solve the Byzantine Generals’ Problem in various ways. These include:
- Proof-of-Activity (PoA)
- Proof-of-History (PoH)
- Proof-of-Importance (PoI)
- Proof-of-Capacity (PoC)
- Proof-of-Burn (PoB)
- Proof-of-Authority (PoA)
- Delegated Proof-of-Stake (DPoS)
- Proof-of-Elapsed Time (PoET)
What is a consensus mechanism?
A blockchain consensus mechanism is a type of automated system that aims to accomplish two main objectives.
- Ensure a distributed, leaderless community of network validators are able to efficiently and unanimously agree on new and existing data on the blockchain ledger.
- Ensure all network validators follow the rules of the protocol and perform their roles honestly.
Data validation refers to verifying new information is accurate and valid. This is incredibly important in a decentralized system, especially a decentralized monetary system. If invalid transaction information is allowed to be added to the blockchain such as a false balance or a double-spend transaction, it would completely undermine the integrity of that database.
Without an integral database, nobody would trust it and no one would use it.
There is also one other key problem that consensus mechanisms are used to solve: network security.
Satoshi Nakamoto, the creator of Bitcoin, was the first to recognize that consensus mechanisms could also double up as an efficient system for deterring bad actors from attempting to take over the network through a majority attack (gaining control of more than 50% of a network.) This was a revolutionary innovation and one that helped cement the Bitcoin protocol as the first globally viable decentralized cryptocurrency.
How do consensus mechanisms work?
While there are many types of consensus mechanisms used by different blockchains, most of them fundamentally work by requiring validator nodes to make some sort of investment and/or expend an amount of effort before they’re granted the right to propose and validate new blocks of data.
The idea behind this is simple. Validators who have invested their own time and money to participate in the network are theoretically less likely to try and corrupt it because they have something to lose if they do.
In short, consensus mechanisms are simply systems that encourage validators to abide by the rules through coercion (threat of punishment) and/or incentivization (earning rewards for good behavior).
What are the main consensus mechanisms?
As we’ve mentioned, there are many different methods employed by various blockchains to achieve consensus in today’s crypto industry. However, the two most popular are known as the proof-of-work (PoW) and the proof-of-stake (PoS) consensus mechanisms.
Proof-of-work (PoW)
Proof-of-work is the consensus mechanism used by bitcoin and a wide range of other cryptocurrencies.
First developed in 1993 by computer scientists Cynthia Dwork and Moni Naor as a means of preventing email spam, Nakamoto took the concept and adapted it for use in a decentralized monetary system.
PoW works by requiring validators, dubbed “miners”, to purchase, rent or outsource computing equipment and direct that power towards winning a cryptography-based competition in exchange for rewards. This process is more commonly known as crypto mining.
The full details of mining can be found here.
By requiring validators to invest in computing equipment and cover the ongoing costs associated with running it, the idea behind PoW is that potential malicious agents would be put off going through all that effort. Similarly, the incentive structure of block rewards— the rewards earned from winning the mining competition— means honest participation can be well compensated.
In terms of providing security, as more miners join the network and the sophistication of equipment rises, the cost of attacking the Bitcoin blockchain rises exponentially. This is because a perpetrator would have to source an extremely large amount of computational power to gain a 51% majority over the rest of the network. Even then, there would be no guarantee they’d win the mining competition every ten minutes to successfully establish an invalid chain of new blocks.
Proof-of-stake (PoS)
Proof-of-stake is a relatively new type of consensus mechanism pioneered by Sunny King and Scott Nadal in 2012. Like proof-of-work, PoS fulfills the same key objectives of a consensus mechanism but in a uniquely different way.
In order to become a validator on a PoS-based blockchain, participants are required to purchase and lock away an amount of the corresponding project’s native cryptocurrency in a smart contract. This is known as staking.
A staking smart contract essentially acts like an escrow account and locks up tokens for a fixed or variable duration depending on the specific conditions of each blockchain protocol.
Validators are chosen at random by the protocol to propose new blocks inside set time slots—often called epochs. Stakers can increase the likelihood of being selected to propose new blocks by increasing the amount of tokens or coins they dedicate to staking.
This system works similarly to a lottery system, whereby the more tickets you have the greater your odds of winning the jackpot. But again, there’s no guarantee you’ll win every time just like a lottery. Someone with a single ticket can still beat someone with thousands of lottery tickets. The same applies to crypto staking.
Peercoin was the first cryptocurrency to feature this mechanism, though Ethereum is perhaps the most well known example of a PoS blockchain after it completed its transition from PoW in 2022.
In addition to locking up tokens, some PoS consensus mechanisms like the one Ethereum uses administer penalties for dishonest behavior through a process called “slashing.”
If the protocol suspects malicious activity, a person’s locked funds can be confiscated, or “slashed,” partially or fully without warning. This coercively dissuades bad behavior and helps to ensure all network participants follow the rules.
What is the best blockchain consensus mechanism?
While there is no clear winner in terms of the best consensus mechanism, many regard the PoS and PoW systems as being the most effective.
The main advantages of PoW (mining) over PoS (staking) is that it offers significantly greater security against 51% majority attacks. However, huge amounts of energy are collectively consumed by miners to achieve this high security; something many environmentalists, regulators and global businesses have voiced great concern over in recent years. The energy usage of PoW is a complex topic and something we discussed in greater depth in our article Busting Crypto Myths: “Bitcoin is Destroying the Environment."
PoS on the other hand is significantly more energy efficient. No electricity guzzling machines are required to stake and multiple blocks have the potential to be validated in tandem through scaling solutions such as sharding.
That being said, neither is perfect and both have their own centralization problems. In both cases, those with the most money can gain an unfair advantage over other participants in the network.
In PoW systems, large mining firms dominate the industry and make it financially unfeasible for small hobby miners to participate.
In PoS systems, those who stake huge amounts of tokens are far more likely to propose new blocks and earn rewards compared to everyone else in the network.
Nevertheless, it can be argued that this is a natural byproduct of most, if not all, consensus mechanisms.
Start buying crypto
Now that you know all about consensus mechanisms, are you ready to take the next step and buy some crypto with Kraken? Click the button below to invest in cryptocurrency on Kraken today!
Kraken's crypto guides
- What is 0x? (ZRX)
- What is 1inch? (1INCH)
- What is Aave? (AAVE)
- What Is Aavegotchi? (GHST)
- What is Acala? (ACA)
- What is Akash? (AKT)
- What is Akropolis? (AKRO)
- What is Algorand? (ALGO)
- What is Ampleforth? (AMPL)
- What is Ankr? (ANKR)
- What is Aragon? (ANT)
- What is Arweave? (AR)
- What is Audius? (AUDIO)
- What is Augur? (REP)
- What is Avalanche? (AVAX)
- What is Axie Infinity? (AXS)
- What is Badger DAO (BADGER)?
- What is Balancer? (BAL)
- What is Bancor? (BNT)
- What is Band Protocol? (BAND)
- What is Basic Attention Token? (BAT)
- What is Bifrost? (BNC)
- What is BitTorrent? (BTT)
- What is Bitcoin? (BTC)
- What is Taproot?
- What is the Bitcoin white paper?
- What is Bitcoin Cash? (BCH)
- What is Reddit's BRICK token?
- What is Cardano? (ADA)
- What is Cartesi? (CTSI)
- What is Celo? (CELO)
- What is Celsius? (CEL)
- What is Centrifuge? (CFG)
- What is Chainlink? (LINK)
- What is Chiliz? (CHZ)
- What is Compound? (COMP)
- What Is Convex? (CVX)
- What is Cosmos? (ATOM)
- What is Covalent? (CQT)
- What is Curve? (CRV)
- What is Dai? (DAI)
- What is Dash? (DASH)
- What is Decentraland? (MANA)
- What is Decred? (DCR)
- What is DigiByte? (DGB)
- What is district0x? (DNT)
- What is Dogecoin? (DOGE)
- What is EOSIO? (EOS)
- What is Elrond? (EGLD)
- What is Energy Web Token? (EWT)
- What is Enjin? (ENJ)
- What is Enzyme Finance? (MLN)
- What is Ethereum? (ETH)
- What is Ethereum Classic? (ETC)
- What is Ethereum Name Service? (ENS)
- What is Fantom? (FTM)
- What is Filecoin? (FIL)
- What is Flow? (FLOW)
- What is Gala Games? (GALA)
- What is Genshiro? (GENS)
- What Is GensoKishi Metaverse? (MV token)
- What is Gnosis? (GNO)
- What is Golem? (GNT)
- What is Handshake? (HNS)
- What is Hedera Hashgraph? (HBAR)
- What is Icon? (ICX)
- What is Injective? (INJ)
- What is Internet Computer Protocol? (ICP)
- What is Karura? (KAR)
- What is Kava? (KAVA)
- What is Keep Network? (KEEP)
- What is Kintsugi? (KINT)
- What is Kusama? (KSM)
- What is Kyber Network? (KNC)
- What is Lisk? (LSK)
- What is Litecoin? (LTC)
- What Is Livepeer? (LPT)
- What is Loopring? (LRC)
- What is MakerDAO? (MKR)
- What is Mina Protocol? (MINA)
- What is Mirror Protocol (MIR)?
- What is Monero? (XMR)
- What is Reddit's MOON token?
- What is Moonriver? (MOVR)
- What is Nano? (NANO)
- What is NEAR Protocol? (NEAR)
- What is Neo? (NEO)
- What is NuCypher? (NU)
- What is Numeraire? (NMR)
- What is OMG Network? (OMG)
- What is Ocean Protocol? (OCEAN)
- What is Orca? (ORCA)
- What is Orchid? (OXT)
- What is Origin? (OGN)
- What is Oxygen (OXY)?
- What is Paxos Gold? (PAXG)
- What is Perpetual Protocol? (PERP)
- What is Phala Network? (PHA)
- What is Polkadot? (DOT)
- What is Polygon? (MATIC)
- What is Qtum? (QTUM)
- What is Quant? (QNT)
- What is RMRK? (RMRK)
- What is Rarible? (RARI)
- What is Ravencoin? (RVN)
- What is Raydium? (RAY)
- What is Ren? (REN)
- What is Revain? (REV)
- What is Ripple? (XRP)
- What is Secret Network? (SCRT)
- What is Serum? (SRM)
- What is Shiden? (SDN)
- What is Siacoin? (SC)
- What is Solana? (SOL)
- What is Songbird? (SGB)
- What is Star Atlas? (ATLAS)
- What is Stellar? (XLM)
- What is Storj? (STORJ)
- What is SushiSwap? (SUSHI)
- What is Swipe? (SXP)
- What is Synthetix? (SNX)
- What is THORChain? (RUNE)
- What is Tether? (USDT)
- What is Tezos? (XTZ)
- What is The Graph? (GRT)
- What is The Sandbox? (SAND)
- What is Theta? (THETA)
- What is Tron? (TRX)
- What is USD Coin? (USDC)
- What is Uniswap? (UNI)
- What is VeChain? (VET)
- What is Waves? (WAVES)
- What is Woo Network? (WOO)
- What is Wrapped Bitcoin? (wBTC)
- What is Yam Protocol? (YAM)
- What is Zcash? (ZEC)
- What is Zilliqa? (ZIL)
- What is tBTC?
- What is yearn.finance? (YFI)