The Shanghai Upgrade Unlock: Forecasting Ethereum Staking Agents’ Behavior after the Unlock (Part 1)
Success Daniel Ndu, Christian Onyebueke
We are so happy to publish this research finally. Consuming many joint man-hours, it is one of the most tasking projects we have ever completed. By the end of this report, we hope to have successfully introduced the concept of simulation and scenario analysis within the crypto community, as we believe it would make for a more resilient ecosystem devoid of several avoidable failings.
Before we begin, we want to convey our deepest gratitude to Hildebert Moulié AKA Hildobby, whose extreme brilliance, generosity, and Dune dashboard—Ethereum ETH Staking Deposits 🥩—served as the bedrock upon which this analysis rests. Also, we give a massive shout-out to everyone on the Machinations team who has created an excellent tool for Web3 system designing and scenario analysis. We express our deepest gratitude to the Token Engineering Academy for lending us their wings to fly. Special recognition to our new intelligent friend, ChatGPT, for making our work easier. Lastly, we want to thank Osamu Ekhator, who edited and proofread the final draft of this work.
A few times in this report, I—Success Daniel Ndu—will speak using the personal pronoun, ‘I,’ to give my point of view. Nonetheless, this research and model is also a product of another brilliant mind, Christian Onyebueke, the Head of Tokenomics at Planet Labs, who generously agreed to embark on this journey with me.
When you get to the end of this report, you cannot but agree that this research is vast. Hence, Christian and I had to prioritize efficiency by splitting the tasks. We jointly wrote the SQL queries on Dune Analytics, all of which we linked to the ‘Procedures’ section. I wrote all the python scripts we used throughout this research, while Christian designed the matrix to derive the tax liabilities owed by entities at each price point.
Before we get into this scenario analysis Christian and I are open to consult and I am actively looking to join a team advancing the cause of decentralization.
The version here on substack is broken into two articles for the sake of brevity. If you wish to read this research as a single paper, you can view the pdf version here.
Now let us get to it.
1. Introduction: Where It All began.
I make it my duty to read every report published by crypto-intelligence agencies. I was studying the Messari yearly theses for 2023 when I came across the passage below, which inspired this study.
Soon after, I discussed creating a model to predict the selling pressure from staking income tax with my friend, Christian. Along the line, we decided to go the extra mile to simulate the entire post-Shanghai upgrade unlock market activities.
1.1 Research Objectives
To predict with a high level of accuracy how many Ethereum tokens would be sold after the merge due to staking income liabilities owed by beacon-chain depositors.
To estimate the amount of Ethereum tokens that would be sold due to market participants rebalancing their portfolios.
Before we begin, we want to shed some light on why the industry should conduct more simulations and scenario analytics.
2. Simulations and Scenario Analytics: A Primer
Simulations and scenario analytics is a form of analytics that needs to be present in the crypto space. In other industries, it has significantly dropped the costs of creating prototypes, proofs of concept, and scaling systems. Looking at how simulations and scenario analytics has taken hold in these other industries, we can already see the tremendous benefits. For example, how it has cost-effectively helped to scale systems.
Examples of the industries where simulations and scenario analytics has become popular include:
Traditional finance: To model and analyze financial instruments and techniques. It has also been used to research investments, implement risk management, and optimize portfolios. Monte Carlo simulations, for instance, are used frequently to simulate prospective returns on investment portfolios and assess their risks.
Healthcare: To simulate the transmission of infectious diseases, the effectiveness of vaccines, and the distribution of resources during outbreaks. A good example is the SEIR (Susceptible-Exposed-Infectious-Recovered) model, a popular simulation for examining the transmission of infectious diseases.
Transportation: To simulate and assess traffic flow, transportation networks, and the effects of new infrastructure projects. Simulators, for instance, are used by transportation planners to assess the impacts of planned transportation projects on traffic, air quality, and economic activity.
Energy: To model and analyze energy systems, such as power generation and distribution, renewable energies, and energy storage. Simulations are often used to assess the possible effects of new power storage devices on grids’ stability.
Building and construction: To simulate and examine building designs, building processes, and infrastructure projects. These simulations aid in modeling energy use, thermal comfort, indoor air quality, etc. This information optimizes building designs for sustainability, comfort, and energy efficiency. In addition, structural analysis and simulations ensure buildings are safe for habitation.
However, simulations and scenario analytics has failed to take off in the crypto industry, which has led to untold consequences, such as the billions lost in hacks or poorly designed projects and systems.
The following are ways we believe simulations and scenario analytics can be indispensable in the crypto industry:
Risk assessment: By modeling different outcomes, designers can spot potential flaws and dangers in their systems and fix them accordingly before implementation.
Enhanced comprehension: Simulations and scenario analysis can provide designers with a better knowledge of how well their systems will perform in practical scenarios. This can be useful for spotting potential impediments and optimizing the design for optimal performance.
Better decision-making: The outcomes of simulations and scenario studies can provide insightful information, such as what control parameters or standards to use, how and where to allocate capital, and how to manage potential system failures.
User testing: By simulating user behavior in the system, designers may assess how consumers are likely to engage, and spot situations where interactions might jeopardize the system's reliability or security.
Prediction: Simulations and scenario analytics has predictive abilities that can help systems to scale in a more prescient way.
After encountering the Token Engineering community, I experimented with simulations, scenario analytics, and broader token engineering. In a sense, simulations and scenario analytics is a subset of token engineering. However, the term ‘token engineering’ has caused the crypto community to focus on tokens and ignore the analysis of crypto and virtual economies. For this reason, we will prioritize the term ‘simulations and scenario analytics’ in this report.
Every crypto protocol and intelligence agency should have a simulations and scenario analytics department and embrace a more prescient form of analytics, moving away from analyzing current trends to predicting future ones.
Below are some areas simulations and scenario analytics could have and can still make a difference:
Preventing the LUNA death spiral. The LUNA/UST death spiral is the most significant demise of any crypto project launched with far-reaching consequences. The loss from the LUNA debacle was more than $60 billion. More so, the death spiral destroyed retail and institutional investors and has considerably affected how policymakers view the digital asset market. The LUNA fiasco could have been avoided if the project had been stress-tested using good simulations and scenario analysis.
Installing appropriate guard rails to the Mango decentralized exchange before the exploit by Avi Felman. Mango markets have been shut down for months, and they plan to launch a V4 to address the issues that led to the exploit in the first place. The Solana and Mango communities could have avoided this setback with proper simulations and scenario analysis.
Designing the best implementation methods for dual-token economies like Axie Infinity, and preventing the erosion of value from the SLP token from launch. The AXS/SLP tokenomics could have been designed better with simulations and scenario analysis.
Analyzing the pool delegate system on Maple Finance V2 to identify possible attack vectors.
Stress-testing lending markets and novel DeFi projects.
Any scenario playing through your mind as you read this. The possibilities and applications are endless within crypto.
We hope this primer has successfully convinced you about the need for the crypto industry to adopt simulations and scenario analytics. Now, we will attempt to predict how much selling pressure to expect after the Shanghai upgrade unlock.
3. The Shanghai Upgrade Unlock: Some Background
The Merge is one of the most impressive social coordination events in recent times.
The merge was completed on September 15, 2022, on block 15537393 at the Terminal Total Difficulty (TTD) of 58,750,003,716,598,352,816,469. It marked the transition of the Ethereum blockchain from a proof-of-work system to a proof-of-stake system, making Ethereum more energy efficient and ultimately deflationary.
Some daring Ethereum adopters have willingly locked up their Ethereum tokens in the beacon chain smart contract deposit address since the inception of the staking deposit contract in November 2020. By doing this, they activate the Ethereum validator set—-the accounts with the authority to certify and propose blocks officially while adhering to network rules.
About 16 million Ethereum tokens had already been locked in this smart contract when we began compiling data.
Before the merge, these tokens could not be accessed once staked. After the merge, however, the next phase in the Ethereum roadmap is the Shanghai/Capella upgrade, which would allow staked tokens to be unlocked. The term ‘Shanghai Upgrade Unlock’ describes the release of the tokens afterward. After the shanghai upgrade, the rewards would be paid automatically to the withdrawal addresses linked to each validator. Users can also opt to exit the validator set entirely after the upgrade.
Our analysis, thus, will focus primarily on predicting how much sell pressure all market participants can anticipate with some accuracy.
4. Agent Profiling
An agent is a person or entity portrayed within a model or analysis in a simulation or scenario analysis. Depending on the simulation or analysis, agents can be people, groups of people, animals, or abstract entities.
Agents are often described by traits, actions, and decision-making guidelines that govern how they relate to one another and their surroundings. In a supply chain simulation, for instance, agents might stand in for manufacturers, distributors, and retailers, each with its production capacity, stock levels, and price policies.
The decisions and behaviors of agents can significantly influence how the system functions. By accurately and realistically simulating agents and their interactions, simulations and scenario analytics can provide valuable insights into how various aspects and situations can affect the performance of the system or process.
When we began profiling agents for this research, we explored several ideas for representing the agents in the Ethereum staking network. We eventually settled for the classification derived by Hildobby, which is as follows:
Liquid Stakers.
Centralized Exchanges (CEX).
Whales.
Staking Pools.
Others.
Sometimes, these agents act similarly. An example is the whales and staking pool operators. On the other hand, liquid stakers, participants in centralized exchanges, and the agents grouped as others behave heterogeneously. It is also important to note that an agent category can feature participants from another demography. For instance, there are whales among liquid staking agents.
Let us examine the agent profiles individually, citing some of their key characteristics.
4.1 Liquid Stakers
Liquid staking is an Ethereum ecosystem concept that aims to make staked Ether (ETH) more flexible and liquid. ETH holders can use traditional staking to lock up their tokens to participate in the proof-of-stake consensus mechanism and earn rewards.
When ETH is staked, it becomes illiquid and cannot be traded or transferred easily, which can pose a problem for some users. For example, those who want to continue to use their ETH for other purposes, such as collateralizing loans or participating in DeFi protocols. Liquid staking seeks to address this issue by developing a system in which staked ETH can be ‘wrapped’ into a token representing its value while allowing the underlying ETH to participate in staking and earn rewards.
Liquid stakers are agents who deposit their Ethereum tokens to the beacon chain smart contract by liquid staking derivatives platforms, like Lido, Rocketpool, Frax Finance, etc.
At the time of publishing, Lido Finance leads the liquid staking derivatives platforms and makes up more than 93% of the market.
4.1.1 Key Features
The main characteristics of liquid stakers are as follows:
Liquid staking platforms are dominated by entities that deposited more than 320 ETH tokens. We outline this in the ‘procedures’ section of the report.
Liquid stakers opt for liquid staking derivatives platforms for quicker access and more efficient use of capital.
4.2 Centralized Exchanges (CEX)
These refer to agents who stake via centralized exchanges.
4.2.1 Key Feature
The main characteristic of CEX is as follows:
Opaque transaction history. The largest CEX providers are United States-based exchanges, Coinbase and Kraken, which dominate over 70% of this agent category.
4.3 Whales
Leveraging on the research and Dune Analytics dashboard that Hildobby published, we define a whale as any address that deposited more than 320 ETH tokens to the Ethereum beacon chain smart contract.
4.3.1 Key Features
The main characteristic of whales is as follows:
They comprise sophisticated individual investors and institutions with access to over-the-counter markets and better information networks.
4.4 Staking Pools
A staking pool is a collaborative effort that allows many people with small amounts of ETH to obtain the 32 ETH needed to activate a set of validator keys. Since the protocol does not support pooling functionality natively, solutions were custom-made to meet this need.
Some pools use smart contracts, which allow users to deposit funds into a contract that manages and tracks their stakes in a trustless manner while issuing them tokens that represent the value. Other pools might not use smart contracts as they can opt for off-chain mediation.
4.4.1 Key Features
The main characteristics of staking pools are as follows:
Similar to liquid staking derivatives platforms, staking whales dominate the pools with access to OTC markets and superior reading skills and information networks.
Stakefish and stake.us currently comprise ~50% of this agent categorization.
4.5 Other
These agents are not captured in any of the classifications above. We make some assumptions about the characteristics of this agent category based on the trends from the Ethereum staking network.
5. Agent Motivation
In simulations and scenario analytics, agent motivation refers to the underlying forces that direct each agent's behavior and decision-making within a model or study. Many variables, such as individual objectives, environmental considerations, social standards, and financial incentives, can affect an agent's motivation.
In many simulation and scenario analysis applications, understanding agent motivation is crucial as it enables analysts to forecast how agents will act in various scenarios more accurately and how their actions will affect the performance of the modeled system. Through the realistic and accurate representations of agent motivation in a simulation or analysis, analysts can obtain insight into how various policies, interventions, or changes to the system might affect agent behavior and the study results.
Agent motivation is often modeled using decision-making rules and utility functions that reflect agents' preferences, constraints, and goals. For instance, agents might be driven by variables like journey time, cost, and comfort in a transportation simulation. Different agents give the variables varying priorities based on personal preferences and limitations.
In our simulation, we had to thoroughly examine the motivations of each agent within the Ethereum staking network. We came up with the following motivations influencing agents’ decisions to sell or re-stake.
5.1 Time Held: Pre-2022 and Post-2022
This motivation describes when an agent deposits into the beacon chain deposit contract. Our model highlights that several agents made deposits before any clarity around the merge or a well-defined timeline for post-merge activities. These types of depositors are more likely to be hardcore believers in Ethereum. They would have a different investment mindset than depositors who staked after the merge was finalized. We categorized agents influenced by this motivation as pre-2022 stakers and post-2022 stakers.
5.2 Price Point
The current price point of the Ethereum token as it relates to the price the agents deposited into the beacon chain smart contract represents a key deciding factor. It determines whether the agent sells or holds the tokens. Our categorization represents stakeholders and the price point as it relates to the price of the staked Ethereum token.
In the money – currently in profit
At breakeven
Underwater – currently in a loss.
This agent motivation gives insight into how much ETH token an agent would need to sell depending on the profitability of the staking position. For example, an agent in the money may strongly consider selling some tokens to preserve capital under strenuous macro conditions.
5.3 Investor Class: Quantity of ETH Staked
The quantity of Ethereum tokens agents’ stakes determines their trading patterns and investment mindset. We grouped agents based on this motivation into two groups:
Whales: Our analysis categorizes agents who stake over 320 ETH tokens as whales. This includes institutions and sophisticated individual investors.
Retail: All agents who deposited less than 320 ETH are classified as agents with retail-like motivations. This means that the agents in this category are less likely to persevere through drawdowns, limited focus, short-term and emotions-driven trading, and limited access to information. Generally, they possess lower convictions than the whale class.
5.4 Staking Income Tax
This motivation describes the need for an agent to sell some Ethereum tokens after the Shanghai upgrade unlock to cover income tax liabilities. Our analysis assumes that all stakeholders would pay income tax on the rewards earned from staking rewards. We capture this extensively in our simulation with a high degree of precision.
6. Constraint Parameters
Trent McConaghy, one of the pioneers of token engineering, states the importance of defining the constraints that must guide all token economic systems. The same can be applied in simulations and scenario analytics.
6.1 What Is a Constraint Parameter?
In simulations and scenario analytics, a constraint parameter is a variable or condition that limits the range of possible outcomes in a given model or analysis. Examples include physical or operational constraints, and regulatory, budgetary, or resource constraints.
In a supply chain simulation, for instance, a constraint parameter could be the maximum production capacity of a manufacturing plant. This constraint could limit the number of products manufactured and shipped in a given period. Furthermore, a budget constraint in a financial model would limit the amount of money available for investment or spending.
Constraint parameters are frequently used in scenario analysis to test the sensitivity of a model to changes in the underlying assumptions or constraints. Analysts can explore the range of possible outcomes and identify the most critical factors affecting the system's performance or process being modeled by varying one or more constraint parameters. This information can then be used to make informed decisions, and develop more robust risk and uncertainty management strategies.
Let us examine all the constraint parameters guiding this Ethereum Shanghai Unlock model.
6.1.1 Total Ethereum Token Staked
This represents the total number of Ethereum tokens that can be unstaked after the merge. When we collated the data for this research, agents had staked 16 million Ethereum tokens in the beacon chain contract. Hence, the maximum number of Ethereum tokens that can be circulated in the simulation is 16 million tokens in addition to the total rewards earned over the lifetime of the staking network.
You can monitor the beacon chain deposit contract in real-time here.
6.1.2 0x00 vs. 0x01 Withdrawal Credentials
Withdrawal credentials are a field in the beacon chain validators. The first two bytes of this credential are known as the withdrawal prefix. Currently, this value is either 0x00 or 0x01. Validators with 0x00 withdrawal credentials cannot withdraw immediately. These validators must migrate to 0x01 before partial and full withdrawals are enabled and funds unlocked.
When we collated the data, only 41% of the Ethereum staking network had migrated to the 0x01 withdrawal credential. This number is expected to rise after the Shanghai upgrade unlock. At the start of the simulation, however, only 41% of the unstaked Ethereum tokens could enter into circulation.
6.1.3 Withdrawals
Two kinds of withdrawals would be possible if the Shanghai Unlock is activated.
Partial Withdrawals: Amounts over 32 Ether (earning rewards) can be partially withdrawn to an Ethereum address, where they can then be promptly spent. The validator will keep functioning as a validator in the beacon chain.
Full Withdrawals: The validator will leave and cease to be a validator in the beacon chain. After the exit and withdrawal mechanism is complete, the validator's entire balance (32 ETH in principle plus any rewards) is unlocked and can be spent.
Next, we will define the constraints with the full and partial withdrawals.
6.1.3.1 Full Withdrawals
The validator will leave its validator nodes and cease to be a link in the beacon chain after a full exit. Full withdrawals are possible by using an exit, which queues the validator. The size of the validator set in the network determines the exit queue. This limit controls the rate at which beacon chain validators exit and enter the set.
The formula for calculating the full withdrawals per day is:
The churn limit of the Ethereum network is derived thus:
The churn limit quotient is derived thus:
Therefore, the total expected withdrawals per day at the start of the simulation will be:
6.1.3.2 Partial Withdrawals
The formula to calculate the number of partial withdrawals that can happen in a day is:
The maximum number of partial withdrawals per epoch is currently 256 and there are 225 epochs in a day, which effectively means only a maximum of 57,600 validators can perform reward withdrawals daily.
Given that each validator has an average holding of 34 ETH, we can expect the number of partial withdrawals each day to be:
Both full and partial withdrawals are processed in a single queue. However, partial withdrawals are queued once a week and prioritized.
The Part 2 of this article discusses the procedures we used and the results.