“Consensus mechanisms” are used by participants in a blockchain network to agree on which transactions are valid and can be added to the blockchain. Think of it like a group decision-making process. When a transaction is made, it needs to be approved by the network before it can be added to the blockchain.
How the nodes come to that agreement depends on the type of consensus mechanism the network uses. Proof-of-work (PoW), used by the Bitcoin network, is the dominant one, but proof-of-stake (PoS) is catching up in popularity, with the Ethereum network switching to it in the recent and much-ballyhooed “Merge” following seven slow years of development.
Let’s dive into how these two consensus mechanisms differ.
The Origin Stories
PoW was invented way back in the 1990s, but only became popular when the pseudonymous Bitcoin inventor Satoshi Nakamoto used it as the cornerstone of the nascent Bitcoin network.
In a paper in 2012, Sunny King and Scott Nadal introduced the concept of PoS as it is used in blockchains today. King and Nadal’s implementation of PoS was first used in the Peercoin blockchain, which was launched in 2012.
The Broad Overview
The transactions on a shared ledger must be verified collectively. But it’s tricky to get everybody to coordinate and agree on how much money has been moved. Say I have spent one bitcoin and you have spent two, and that we want to ratify this on our transaction record. We can’t simply confirm this among ourselves—thousands of others are participating in the network, and they might not trust us. One of us, for instance, may attempt to spend the same money twice. That won’t do.
So how do we get everybody to agree on how much we spent?
Obviously it would not work to have everybody simply submit their version of events and then come to some kind of compromise. That would result in cacophony. Neither can we rely on a single, trusted actor. That would defeat the purpose of “decentralization.”
Instead, consensus mechanisms allow all of a given network’s participants to compete to verify batches of transactions in such a way that can be easily double-checked by everyone else on the network. Who gets to verify transactions necessarily changes with every new batch, ensuring that consensus remains a collective effort.
In the PoW system, the record is updated and double-checked by way of a system known as “mining.”
Every time someone transacts on a PoW protocol, the transaction is broadcast across the network. Participants who hope to add it to the shared ledger—and claim a reward—must first assemble it with other transactions into a “block” that can be appended to the overall chain of blocks that make up the, you know, blockchain.
To create a new block, participants need to reduce a given transaction grouping to a “hash,” a long alphanumeric code that is a unique, cryptographic way of rendering complex datasets. The hash reflects not only the current transactions but also every transaction in the chain that came before it. Because of other data included to complicate the hash, the exact figure is at first unknown, and individuals or companies running powerful computers, called “mining rigs,” race through vast numbers of possible figures to guess it.
Figuring out the hash is costly and computationally intensive, and involves feeding slight variants of the transaction data through a type of algorithm called a “hash function” until the correct hash is generated. Once produced, however, its authenticity can be easily verified by other participants. It’s hard to find, but trivial to double-check. Think of it like searching through a massive pile of keys until you find the right one, and then sticking it into the lock so anyone can use it.
Once the hash is ascertained, the rest of the network’s participants verify that every transaction in the block coheres with those on the rest of the ledger, and that coins haven’t, for instance, been spent multiple times. The block is then appended to the chain, informing calculation of the next hash.
Through this method, everybody is able to check that the block posted on the chain matches the transactions therein. Any miner who submits an invalid block can be easily found out. (The “key” simply wouldn’t fit in the lock.) Only the miner who guesses the hash, however, is rewarded in any way, receiving a set amount of newly minted bitcoins.
The key innovation here is that spending all that energy verifying blocks is extremely costly. To take part in the network, miners have to invest a ton of money, discouraging them from trying to manipulate the shared record. And because each new entry includes the entire history of the ledger, manipulating earlier transactions is especially hard, requiring the expensive recalculation of every previous block in the chain.
It is, simply, more cost-effective to be honest.
On the PoS system, the long hash representing a given batch of transactions becomes trivial to find, and there is no giddily expensive race to calculate it. Instead of being motivated to honesty by the prospect of racking up their electricity bills, PoS participants are asked to deposit—that is, stake—hefty sums of their own capital on the network.
These depositors, called “validators,” are then selected at random to verify the content of a given block. In the Ethereum PoS system, there are 7,200 “slots,” 12 seconds apart, in which to do this; that means 7,200 opportunities to be randomly selected in a given day. As an incentive, validators earn interest on their staked funds, as well as rewards for blocks validated.
This “stake” has a similar function to the electricity expenditure of PoS miners; it is a kind of investment that is forfeited if the validators violate the network’s rules or are dishonest.
Where PoW requires a ton of energy, however, PoS is more energy-efficient: Ethereum’s developers claim that the network’s PoS system is indeed a whopping 99.9% efficient.
The Reward System
Miners spend a lot of money on advanced mining systems and electricity in order to mine cryptocurrencies like Bitcoin. After all, the Bitcoin network uses enough power in a single year to boil water in all the tea kettles in the U.K. for 32 years, according to one estimate.
At first, when Bitcoin was largely the preserve of diehard hobbyists, miners were able to use relatively cheap GPUs (graphics processing units) that could be affixed to home computers. As Bitcoin mining’s popularity increased, however, the difficulty of mining increased commensurately. Nowadays, miners use costly “application-specific integrated circuits,” or ASICs, which are able to perform a single task with extreme efficiency. Rather than using home computers, they run their lucrative operations in large warehouses containing hundreds of ASICs that are known as “mining farms.” That prices out the home miners.
There are two types of rewards miners receive to reward their investment: block rewards and transaction fees.
Every time a miner is the first to discover a hash and add a new block, a fixed unit of cryptocurrencies is generated as a reward. This is called a “block reward.” On the Bitcoin network, the amount contained within a reward is typically halved after a certain number of blocks have been added to the blockchain, in order to control the cryptocurrency’s supply. For example, as of 2023, Bitcoin miners receive 6.25 BTC every time they create a new block.
The miners also receive transaction fees paid by users who initiate the transactions. The fees are typically proportional to the size and complexity of the transaction.
Once all of the outstanding supply of a given cryptocurrency is mined—in Bitcoin’s case, when all of the 21 million tokens are mined—the miners will receive only transaction fees as rewards. (Which may, analysts worry, make such fees unsustainably high.)
The reward system in PoS is quite similar to PoW. Validators receive block rewards, although they are usually much lower than the block rewards in PoW systems. One computer is randomly chosen to validate transactions, for which it will also earn the reward.
In Ethereum’s PoS system, rewards are issued every six minutes, a period known as an “epoch.”
Validators also earn transaction fees for including verified transactions in the block they create. The rewards are typically lower than in PoW systems, but they serve a similar purpose of incentivizing participation and securing the blockchain.
As mentioned, validators are subject to not only rewards but possible penalties as well. If, for instance, they attempt to validate an invalid block—whether on purpose or by accident—their stake will be reduced, leaving a smaller amount to withdraw.
Who Gets Access to the Network?
Anyone can be a miner, but you may need expensive hardware and software to join the race. This can limit who can become a miner in a network. As mentioned, mining Bitcoin today requires the use of ASICs, which may be well beyond the budget of individuals.
As with PoW, anyone can technically become a validator, but you often need to have a minimum amount of cryptocurrencies to stake. Ethereum, for example, requires you to stake at least 32 ETH, valued at well over $55,000 at current prices, to propose new blocks.
There are, however, ways for less wealthy individuals to pool their assets with others and stake collectively at a lower entry cost.
On some PoS networks, having a larger stake increases the chance of getting selected to validate a block. On Ethereum, however, having a larger stake—i.e., beyond the 32 ETH minimum cap—makes no difference. Validators who want a higher chance at getting selected have to instead create new validator wallets on the network. This, according to the Ethereum Foundation, “prevents any single validator from having an excessively large vote on the state of the chain.”
On some networks, such as Binance Chain, validators are trusted actors who are selected by a centralized authority, which admittedly makes it hard for the network to claim true decentralization.
PoW systems are considered to be the most secure consensus mechanisms. This is because the complex mining process makes it highly expensive and difficult for bad actors to compromise the network.
Some also believe that the PoW system is effective at controlling inflation of a cryptocurrency. Since the block rewards are halved, the supply of new units entering circulation is controlled, which theoretically helps maintain the value of the cryptocurrency over time. (Not that this has ever actually worked in practice. See: Bitcoin’s market value over the past 10 years.)
The most obvious benefit of using PoS systems is that you’re reducing your energy consumption. Environmentalists hate PoW systems, and PoS, which supposedly uses 99.9% less energy, is an environmentally-friendly alternative.
PoS uses less computational power, which makes it much faster than PoW. This makes PoS systems more scalable, allowing them to process more transactions per second than PoW systems.
It is also, at least from a technical perspective, easier for new entrants to join the network: You don’t need a ton of confusing hardware.
Electricity consumption is obviously the main concern, and Bitcoin enthusiasts have long sought to rebut claims that the network is environmentally damaging. Analyst Nic Carter, for instance, has touted the argument that Bitcoin mining actually makes better use of “excess energy” generated by grids that would have otherwise been wasted. This argument remains contentious.
The fact that most regular people can’t afford an ASIC mining machine is another weakness. It means PoW models are vulnerable to being controlled by a few rich miners.
In the case of one small PoW network, Ethereum Classic, this led to a so-called “51% attack,” a kind of hack in which a conspiracy of miners, constituting at least 51% of the mining power on a network, colludes to manipulate the record of transactions.
For a long time, there was also concern about consolidation of Bitcoin miners in China, but there has since been something of an exodus.
Miners are also at risk of fluctuating asset prices. Many fund their equipment with short-term loans that cannot be repaid if market volatility hurts their profits, as happened in 2022.
PoS is considered even more vulnerable to attacks than PoW, especially if a large percentage of the validators are offline or not actively participating in the network. This could potentially allow attackers to gain control of the network or compromise its security. For this reason, the Ethereum PoS system actually detracts funds from validators who go offline for too long.
In the case of those PoS systems where the probability of a validator getting chosen is based on how much cryptocurrency it holds, a few wealthy individuals or entities may end up with all the power. This could threaten decentralization. (See the Binance Chain example.)
There’s also the “nothing at stake” problem. In early iterations of the PoS system, there was no security deposit that would be forfeited in the event of dishonest behavior. Instead participants only needed to hold a given network’s tokens in their wallets. That, developers figured, was incentive enough to act honestly. The upshot, however, was that validators had nothing to lose by voting for multiple versions of the blockchain in the case of a fork. That could lead to “double-spending” attacks, in which a validator tries to spend their cryptocurrency on two different versions of the blockchain simultaneously.
Ethereum’s introduction of a security deposit, however, largely accounts for this problem.
PoW vs. PoS: Who Is the Winner?
Both PoW and PoS systems come with their own set of benefits and drawbacks. PoW systems are energy-intensive, but this is a reliable and secure way of validating transactions. PoS, on the other hand, while more energy-efficient, may suffer from centralization. Ultimately, both consensus mechanisms have pros and cons, and the choice of which to use depends on the specific needs and goals of the network.