The Ethereum Merge Explained

Depending on your position, Ethereum’s move to proof of stake is either just around the corner, on the distant horizon or less likely than hell freezing over. However, instead of just asking “wen merge?” let’s look at some important information about this industry milestone and break some misconceptions.

Whilst hitting the headlines recently, discussions about moving from the current proof of work (PoW) consensus model to proof of stake (PoS) actually began back in 2014, before the Ethereum mainnet even launched. So if you feel like you’ve been asking “wen merge?” for a while, then spare a thought for the core dev team who have been thinking about this for the last 8 years!

PoW vs PoS

Changing from PoW to PoS is effectively moving away from blocks being processed via a competition to solve a cryptographic puzzle, to a lottery where if you’re chosen then you get to build the next block. This is a less energy intensive method and expected to reduce Ethereum’s energy consumption by over 99% as well as moving from variable ~13sec blocks to a fixed 12sec interval between blocks.

https://blog.ethereum.org/2021/05/18/country-power-no-more/

Every slot (12secs) a validator is chosen to create and validate the next block. A committee (a subset of other validators) is chosen to review this and vote (called ‘attesting’) if it’s valid. At this point we have valid but not finalised blocks. Finality comes every 2 epochs (32 slots) where validators attest to the first block in each epoch as being valid and if 2/3rd of the total staked ether attests then this checkpoint block is ‘upgraded’ to be finalised. They also vote for which block is at the tip of the chain to ensure the network stays in consensus.

So each slot/block goes through 4 rounds of validation before it’s seen as finalised.

In addition every 256 epochs (27.3 hours) 512 validators are chosen to be what’s called a ‘sync committee’ and must continually signs block headers for each new slot. A light client (someone running a node without the full Ethereum history on) can trust these headers to represent accurate and validated blocks.

Becoming a Validator

In order to be a validator you need to stake 32 ether. However you can also pool stake where you stake a smaller amount into a collective who contribute the 32ETH requirement. Staking ether means locking it up in the ETH2.0 contract: https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa .There’s currently over $15billion worth of ETH within this contract.

https://ethereum.org/en/staking/

⚠️A common misconception is that after the Merge, this ether will be withdrawable by validators. This is not the case. There will need to be another hard fork after the merge (expected to be 6–12 months after) for this ether to be removed from the deposit contract.

PoS Activation

This PoS consensus mechanism is already live on the Beacon Chain (the consensus layer for Ethereum) and anyone stalking their ether is currently earning a 4.2% annualised return. But this exists separately from Ethereum execution (transaction processing) which still uses PoW. This means that any transfers of ETH you’re currently doing, any interaction with a DeFi dApp and any NFT activity is all being processed via PoW still. The Merge is therefore moving this execution layer into this new PoS consensus layer and the move from mining to validating. This will happen when a Total Terminal Difficulty is hit. This is used instead of a block height since it’s a more predictable metric to hit and it represents the cumulative hashpower put towards securing and processing Ethereum transactions. However before this can happen there is extensive testing required and we’re currently on the testing of Ethereum’s oldest testnet, Ropsten, before progressing onto Goerli and Sepolia.

So why would you want to become a validator — well other than the common good of helping to secure the network and keep it running, it’s about money. You are rewarded for being a well behaved validator on the network.

Rewards

The current reward structure of Ethereum is fairly complex but I have a post I’ll put out breaking that down in detail next week. The TL;DR is that miners get a base reward of 2 ETH plus the tip/priority fee from the transaction fee and some bonus money (uncle inclusions and uncle rewards).

The 2 ETH represents brand new ether which is borne into existence with each block rather than coming from an existing supply pool, and the total fee the user pays is split into the tip which goes to the miner and the base which is burned as per EIP-1559. Whilst it was expected that the base fee would account for ~70%, in reality this has looked to be about 90%.

https://watchtheburn.com/insights

In a proof of stake world, validators are rewarded for three activities:

  • Creating and proposing new block [green segment in image below]
  • Attesting to the state of the chain by voting for what they believe to be the checkpointing blocks and the chain head block (the block at the tip of the chain) [pink segment in image below]
  • Signing off on blocks in the sync committee [blue segment in image below]

In addition, the proposer of a block will also receive rewards from the attesting activity and the sync committee activity for their block.

Attesting towards the state of the chain happens for every epoch and so makes up the bulk of validators rewards (expected to be over 80%), whereas since validators are selected randomly to create new blocks and attest on committees this is a more variable income stream.

It’s also worth noting that the reward the validator receives for these activities is not fixed but on a sliding scale and proportional to the total ether being staked on the network. Therefore as the total amount of ether staked increases, the reward will decrease, and when there are less validators staking the possible reward will increase. The aim of this model is to incentivise validators back to the network and ensure there is sufficient decentralization in the validator pool. However the reward they receive will also increase if the validator has staked more than the minimum 32 ETH increment. This also affords them a greater probability of being chosen to create the next block or be on an attestation committee (although all validators will be called upon to attest at least once per epoch).

We can break these reward types down to see what this looks like for a validator contributing 32 ETH across a pool of 300,000 validators.

  • Base reward as a proposer = 653 Gwei
  • Attesting toward’s another validator’s block = 17,631 Gwei
  • Being on the sync committee for another validator’s block = 11,957 Gwei
  • Attestations from the block you’re proposing = 23,612,946 Gwei
  • Sync committee contributions for the block you’re proposing =874,569 Gwei (n.b this might not occur for every block you propose)

Putting it all together, the total available reward per epoch across all validators is 6.268 ETH which works out as just over 1.7ETH per year per validator.

These rewards are paid to the validators from the Ethereum protocol as a state change and so the balance of the validators will increase without this being a specific transaction on the network.

“Importantly, these operations are never gossiped independently or held in any kind of mempool like user-level transactions.” Source

As such staking rewards can be seen as ‘new ether’ in the same way that block rewards today are a state change of newly born ether deposited to the miner’s account.

The staking returns are currently at 4.2% APY but expected to be between 2–20% after the Merge and as the number of validators changes. Validators will also continue to receive their portion of transaction fees per block as they do now; with the base being burned to create a deflationary ether supply, and the tip being kept by them. They can also receive MEV related income so the above reflects a lower bound of income for validators.

Penalties

However validators can also receive penalties if they misbehave or don’t act in a timely manner.

If their node is offline for a prolonged period then they will receive an inactivity penalty (N.B if your node is online for at least 43% of the time then you’ll be net positive for rewards vs penalties) and if an attestation is incorrect or late then the validator will receive a penalty. In addition validators that don’t participate in the sync committee (sign the wrong head block or don’t show up at all) receive a penalty exactly equal to the reward they would have earned for being correct. And the block proposer receives nothing for the missing contribution.

These penalties are burned so reduce the total issuance of ether in the network.

However there is also the more harsh penalty of being ‘slashed’ where a greater amount of ether is confiscated and you are ejected from the validator pool. This is for activity which looks to break the protocol rules and could therefore constitutes an attack; proposing two blocks at the same time and/or attempting to break attestation rules for the checkpoints.

Once a slashing offence is identified then the validator has 1/64th of their balance slashed (a min of 0.5ETH) and is set to be ejected from the validator pool in the next ~36 days (the next withdrawal epoch). However this isn’t all, around 18 days after the initial slashing, they receive a second penalty which is proportional to the total amount of slashing activity which has occurred 18 days prior to and subsequent to their slashing. The idea here is to more harshly punish any mass bad behaviour.

Other validators can whistleblow on any slashable behaviour they see and for this they can receive a reward, although this is expected to be a rare occurrence.

It’s also possible that a validator could lose out on rewards through no fault of their own but if the next validator doesn’t propose a block in time, or if the block is orphaned due to conflicts about the chain head block. They can also lose out on rewards if their attestations conflict with wider votes or they do not vote or propose a block in a timely manner.

There are three periods in a validators life; activation, exit and withdrawal and the chart below shows when they are eligible for rewards and penalties across these milestones.

Wen Merge?

It’s not a Merge post without this question though! Current tracking is between Aug and Dec 2022 but this depends on how the final testnet testing goes. Any delays there could result in a timeline push back. So we’re getting closer …

- — — — — — — — — — — — — — — — — -

A huge thanks to Tim Beiko for his contributions to this and answering my late night questions on some of the intricacies of this!

Originally published at https://www.linkedin.com.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store