Lesson No. 3: Consensus Mechanisms and the Merge
An introduction to Consensus Mechanisms; the difference between Proof of Work and Proof of Stake; The Merge (and all subsequent rhymes), and more.
Welcome back readers! Last week, we covered challenges facing a blockchain project, what smart contracts are, and an introduction to Bitcoin and Ethereum. Today, we’re diving deeper into:
Proof of Work (PoW) v. Proof of Stake (PoS); and,
A decentralized network of nodes maintaining a ledger needs a way of ensuring transactions are accurate. In a centralized system, a single entity takes responsibility for this. The problem with a single entity monopolizing security is you can't always trust it.
A blockchain network is trustless because you don’t have to rely on a single entity to maintain the network’s security. Consensus mechanisms are how blockchains determine what is true and what isn’t.
Think about this scenario: Mike only has 2 BTC, but he owes Alice and Sarah 2 BTC each. What is to stop him from transferring the same 2 BTC he owns to Alice first, and Sarah second? This is known as the problem of “double-spending”-- consensus mechanisms prevent this.
So how do they work? Essentially, consensus mechanisms rely on a system of reward and punishment. They incentivize nodes maintaining the ledger to be honest.
They do this in different ways. As such, there are several different consensus mechanisms a blockchain project can choose including–but not limited to–Proof of Work (PoW), Proof of Stake (PoS), and Proof of Activity (PoA). PoW and PoS are the most common, and we will dive into both.
PROOF OF WORK V. PROOF OF STAKE
Two of the most widely used consensus mechanisms are Proof of Work (PoW) and Proof of Stake (PoS). Both and all types of protocols require network participants to validate a transaction on their respective blockchain, based on the network's requirements.
Proof: requires network participants to show they validated a transaction via PoS or PoW
Validators: under PoS, individuals who are responsible for validating transactions on a blockchain
Mining: a metaphor to describe the PoW process
Miners: under PoW, a metaphor to describe individuals who solve cryptographic puzzles, verify the transaction, and are then rewarded cryptocurrency for their work
Proof Work (PoW)
Used by Bitcoin, PoW requires miners to compete with each other to solve cryptographic puzzles by trial and error using high-powered computers. The miner who solves it first is given the authority to add the new block of transactions to the blockchain and is then rewarded with cryptocurrency. The high-powered computers and energy consumption can be very expensive, incentivizing miners to be honest with the network.
Proof of Stake (PoS)
PoS requires validators to pledge or lock up all or a portion of their coins as collateral to validate transactions. Validators are randomly chosen but those who have significant holdings or have been staking longer have an advantage. The chosen validators must then agree to verify transactions. Once they confirm it, the block is added to the chain and they are rewarded with digital currency. If they improperly validate it, they may lose a portion or all of their stake as an economic penalty. This creates an incentive for validators to act in good faith when validating transactions, making PoS more secure.
PoS favors those who can afford to stake more tokens, however, delegated PoS (DPoS) solves this issue. DPoS allows users to lend their crypto to a staking pool. The pool has a delegate who validates the next block. The delegate earns transaction fees for validating the block, and lenders benefit by earning a cut of the block reward. It'll be interesting to see if Eth 2.0 allows delegation and whether it plans to address the challenges of staking pools. However, much debate about delegation and scalability continues and it appears PoS is the best option for Eth 2.0.
The Merge refers to the Ethereum Network’s switch from PoW to PoS. Ethereum developers have been working toward this for years, and it is scheduled to go ahead between September 13th and September 15th. The best way to understand what exactly will occur is through an analogy (kudos to Kash Dhanda and this great explainer video):
Think of Ethereum as the driver of a car that uses PoW as its engine.
A few years after using it, Ethereum realizes that it wants to be more environmentally friendly. In order to do so, Ethereum needs to switch its car’s engine to PoS.
Unfortunately, Ethereum cannot stop on the road to make this switch. This refers to Ethereum’s inability to simply take the network down and cease adding new transaction blocks for a period of time. This cannot happen because of the disruption it could cause DeFi applications and the billions of dollars embedded in them.
So Ethereum decides to purchase another car that uses PoS as its engine and have this car drive at the same speed right beside the PoW car. This second PoS car was created in December 2020 and is known as the Beacon Chain.
Since December 2020, all transactions taking place on Ethereum have been recorded and executed on the Ethereum Mainnet (the original chain) using PoW. All the while, the Beacon Chain has continued to run parallel to the PoW chain.
The Merge will take place when Ethereum switches out its current PoW engine with the PoS engine from the Beacon Chain. In other words, Ethereum developers will merge the Beacon Chain with the Ethereum Mainnet, paving the way for future transactions to be recorded and executed using PoS.
That is the how of the Merge, but why go through this process in the first place? There are a few reasons:
Environment – As is known, miners validating transactions using PoW use a ton of energy. To put things into perspective, Ethereum’s PoW network uses as much energy as Finland. By switching to PoS, Ethereum will reduce the energy required to validate transactions by 99.9%.
Security – In last week’s edition, we explained the decentralization and security of a blockchain go hand-in-hand. As a reminder, this occurs because a larger network of nodes validating transactions reduces the possibility of a single entity taking control. As compared to PoW–which requires miners to consume vast amounts of electricity to validate transactions–PoS requires validators to stake ETH. This reduces the barrier for entry and increases the network of validators ensuring further decentralization and security. Additionally, Ethereum will adopt slashing, a process by which validators seeking to act in bad faith have their staked ETH slashed or cut. Slashed validators also have their keys banned forever.
ETH Issuance – In the current PoW system, miners validating transactions are rewarded for their effort and investment through the issuance of new ETH tokens. Post-Merge, new ETH will be issued at a rate of 0.43%, compared to the current rate of 4.3%. This is known as Ethereum’s “Triple Halving”. A reduction in ETH issuance is partly because the effort and investment required from validators in PoS are significantly lower. Additionally, and in conjunction with the fact that users who stake ETH now cannot retrieve their staked ETH for another 6-9 months, the supply of ETH will be lower than usual. This may put upward pressure on the token’s price.
Centralization: The growth of mining pools make PoW more centralized. However, PoS does not completely fix this issue. Private companies that may offer staking services, pre-mining, and individuals with lots of capital can buy large amounts of crypto, stake them, and have more control in PoS.
Finally, let’s clarify certain misconceptions that people may have about the Merge:
The Merge will NOT have any effect on gas fees. The change in Ethereum’s network is only in its consensus layer.
The Merge itself will NOT increase the transactions per second (TPS). Once again, this is because the change is in the consensus layer, not the execution layer. However, we use “itself” because the Merge is a step in the process of Ethereum expanding its scalability. Future upgrades known as The Surge, The Verge, The Purge, and The Splurge will focus on scalability.
Consensus mechanisms help a blockchain maintain security by determining what is true and what isn’t
Proof of Stake: transactions are validated based on the amount of coins staked
Proof of Work: transactions are validated by solving cryptographic problems
The Merge refers to Ethereum’s switch from a PoW consensus mechanism to a PoS one
The Merge is set to have an impact on the energy consumption, security, and future scalability of Ethereum. It will NOT have an impact on gas fees and transactions per second.