The upcoming ETH2.0 merge and the changes with rETH

liamyoung
StaFi
4 min readMay 3, 2022

--

TL,DR

The Merge will most likely happen in Q3/Q4 2022 and Ethereum consensus will switch from proof-of-work to proof-of-stake, this article will explain the impact of this upgrade on StaFi’s rETH from a technical perspective.

The impact mainly includes three aspects: users, contracts and validators. Here are the conclusions:

  1. Neither the users nor the contracts will be affected.
  2. The validators need to upgrade the Beacon Chain’s nodes when The Merge occurs.

Related Issues

Regarding this research, there are some accompanying issues:

  1. The Merge may not directly solve the pegged issue of rETH/ETH as the withdrawal won’t be enabled in this phase.
  2. Validator registration will be enabled before the Merge.
  3. Gas fee won’t be decreased when deploying a staking contract.

The phases of upgrade would start from the merge and to accelerate this process, Ethereum foundation says:

To minimize additional features that could delay this transition. A few features, such as the ability to withdraw staked ETH, will have to wait a little longer after The Merge is complete. Plans include a post-merge “cleanup” upgrade to address these features, which is expected to happen very soon after The Merge is completed.

At this moment, the specification of validator withdrawals is still under discussion. Therefore, rETH will remain non withdrawable until a related upgrade after The Merge.

Technical Analysis Process

1.After The Merge, PoW block will no longer exist, but its contents, including headers and transactions, will become a component of the new block and will act as the execution layer in the new block to which the Beacon Chain will act both as PoS consensus layer and block producer.

Here are the main changes of the PoW block:

Block format

Now, the PoW block header contains several fields which are only relevant for PoW rather than PoS, such as `ommers`, `ommersHash`, `difficulty` and `nonce`, these fields will be set to 0 or their data structure’s equivalent rather than being entirely removed from the data structure as this will cause the byte length of the data structure to change. The full changes to block fields can be found in EIP-3675.

Block and uncle rewards

Since Beacon Chain is responsible for block issuance post-merge, the execution layer will stop processing blocks and uncle rewards, but it will still be in charge of syncing the network state, gossiping transactions and maintaining its transaction pool.

The above changes will not affect contract transactions and therefore will not have any impact on rETH.

2.The new client node architecture needs to be upgraded to accommodate the PoS consensus after The Merge. The following image shows what a full Ethereum client will look like post-merge.

Engine API

The Engine API is a new set of JSON RPC endpoints so that the consensus and execution layers can communicate with each other.

Execution Engine

Let’s call current ETH1 client as A, PoW consensus of current ETH1 as B, Engine API as C, then: Execution Engine = A — B + C

Execution Engine

At present, Blocks produced by Beacon nodes are almost empty except consensus-related information such as attestations, the deposit contract root and validator slashings/exits. They do not contain any “transactions” in the Eth1 sense (e.g. sending ETH or interacting with smart contracts). The Merge is where this changes.

These three factors are the core components of the new full Ethereum client after The Merge, here is another article which may help you understand more about them.

Two conclusions can be made which are as follows:

  1. The client needs to be upgraded, this means that the current validators of rETH should upgrade their nodes to the corresponding version of the client code during The Merge.
  2. Post-merge, anything related to consensus is removed from the Execution Engine while most of the clients’ functionality such as the EVM, its state, and how it executes transactions, will stay the same.

The above two points mainly cover all the core components of how clients process blocks and post-merge. As the article puts it: “Post-merge, both the execution and Beacon Chain layers participate in a p2p network. Aside from block gossip being deprecated on the execution layer side, everything else in the p2p network remains unchanged: Beacon Nodes will gossip attestations, slashings, etc. and the execution layer will share transactions, sync state, etc. each on their independent p2p network.

Similarly, the user APIs for both the Beacon Chain and the execution layer will remain independent, with the exception of the newly created Engine API.” This re-confirms that rETH’s existing contracts and related transactions will not be affected by The Merge.

We strongly recommend running the current testnet Kiln.The ability to withdraw staked ETH won’t be included in The Merge and is expected to happen very soon after The Merge is completed. At this moment, the specification of validator withdrawals are still under discussion. Therefore, rETH will remain non withdrawable until a related upgrade after The Merge.

rETH Upgrade

There are still too many details to be discussed, saving the gas cost, enabling the withdrawal, opening the registration of validators, etc. rETH has around $50Mil staked value, keeping rETH upgradable and make it a good fit for the challenging market would be an important vision for StaFi Core, as we diving into the research, you will see the changes of rETH and its contracts before/after the Merge. Stay tuned for it.

--

--