top of page
Search
Writer's picturecoalexander

How will the Shanghai Fork Affect the De-Fi Crypto Ecosystem?

Updated: Apr 12, 2023

What exactly is the fork, in layman’s terms? How will it affect the price of ETH now and in the future? Which parts of De-Fi it is likely to affect most? Will it impact the smooth running of the Lido liquid staking service and/or the Aave lending protocol? What other risks should we be watching for over the next few weeks?




About Staking Chains

A blockchain is run by a peer-to-peer network of linked devices called nodes and there are many different types of nodes, depending on the blockchain, from simple wallets which could be connected on a phone to specialised ASIC mining machines used for building blocks on the old-fashioned, anti-green, proof-of-work consensus, blockchains like Bitcoin.


On 15 September 2022, in an upgrade called the “Merge” the Ethereum blockchain changed its consensus (the mechanism for approving transactions and building them into blocks) from proof-of-work (PoW) to proof-of-stake (PoS). The Shanghai fork, due at 22:27 UTC on 12 April 2023, allows validators to withdraw their stakes and rewards of the native token ether (ETH). [1] It is the last client upgrade required for the chain to complete its migration to an energy-efficient, fully-functional PoS chain like Cardano (and many others).


But what is staking? Apart from energy consumption, the main difference between PoW and PoS is that block building in PoS is performed by validator nodes whose function is merely to hold a stake of some native tokens on the chain. In return, they are selected at random (with a probability determined by the size of their stake) to build a block and win a reward, i.e. a native token payment in the form of fees from smart contract executions (and other transactions in the block). By the time of the fork over $26 billion of ETH was locked by validator nodes staking on Ethereum.


About the Shanghai Fork

Until the Shanghai fork all stakes and rewards had to remain on chain. This was to ensure sufficient capacity in the network for transaction processing. After the fork, validator nodes will be allowed to make partial or full withdrawals of their ETH. Partial withdrawals – withdrawals of only the rewards eared so far -- can be done relatively quickly and automatically. Full withdrawals – of taking rewards earned plus the entire original stake and quitting the validator node -- will take much longer.


The number of partial or full withdraws is going to be strictly limited in the days following the fork. No more than 16 partial withdrawals can be put into a block and a block is built every 12 seconds. There are over half a million validator nodes in the Ethereum network so (after a bit of maths) if every node were to take all its rewards in partial withdrawals, the process would take between 4 and 5 days to be completed. There are about 1 million ETH locked in as rewards but the transaction volume of ETH is far too high to be concerned by this number of tokens coming on to the market over 4 or 5 days. The supply of ETH from partial withdrawals, if it were all sold, would not affect the price much at all. Besides, it is more likely that the rewards (which have just been sitting there since the Merge) will be converted to stakes, thereby earning their own rewards.


Full withdrawals are going to be much slower, to maintain network stability. No more than about 10% of validator nodes can leave the network per month. This is, based on the current number of over 500,000 validator nodes, no more than about 1500 nodes per day could quit. After 40 days the number of nodes would fall to about 450,000 at which point full withdrawals will become even slower. And if the number continues to drop, the time-limits become even tighter.


But as other nodes quit there is a greater incentive to remain a validator. This is because the rewards from staking are inversely proportional to the number of validators. So if many validator nodes were to quit the network, the financial incentive to re-join the network would increase. The exact speed of withdrawals permitted (as explained above) is intended to balance these opposing forces of supply and demand so there will not be a mass exit from Ethereum -- possiby to another PoS chain like Cardano (native token ADA) which has one of the largest alternative staking networks.


The fork’s planning by the Ethereum Foundation has been long and careful, its testing has been thorough and was completed without errors. So nothing is expected to go awry with the actual fork itself.[2] The ecosystem agrees: ETH has reached a six-month high of $1,900 the day before the fork.


The flexibility to withdraw staking rewards after the fork will increase the demand for ETH to use for staking. All else being equal, this increased demand should increase the price. But unlike ADA or SOL, we’ll never see 70% of ETH in circulation being used to stake.[3]


The impact over the next days or weeks following the Shanghai fork depends on the potential for external reactions which may be unforeseen by the Ethereum Foundation (or, if foreseen, are beyond the sphere of influence in the foundation’s carefully laid plans). What risks should we be watching for over the next few days?


Is Lido an Operational Risk Waiting to Happen?

Lido is a staking-as-a service protocol which allows retail investors to earn Ethereum staking rewards without having 32 ETH and which runs 31.2% of Ethereum’s validator nodes. Clients deposit their ETH with Lido using a process very similar to the U.S. exchanges Coinbase and Kraken. Although the Securities and Exchange Commision is succeeding in stopping staking services by U.S. exchanges, Coinbase still runs 12.6% of validator nodes and Kraken runs 6.9%.[4] But Lido is completely unregulated and it dominates the Ethereum validator network.


Owning 31.2% of the $25 billion staked, Lido currently has $7.65 billion staked on Ethereum. And now that its clients must be allowed to request full or partial withdrawals, Lido has been racing against time to implement the major code updates required. I am not alone in fearing that these updates have not been thoroughly tested.[5].


Lido provides staking on four other chains: Solana (6.7%), Polkadot (13.3%) Polygon (6.3%) and Kusama 97.6%). Figures in parentheses refer to APR (which is like an annual yield). Guess what Lido’s APR is on Ethereum? It was 4.9% in January 2023.[6]


Today, Lido is promising 40% APR for staking ETH. What? Really…why? This looks like bad acting, or the fear of it, eerily reminiscent of the 20% returns promised by the Anchor protocol before it went bankrupt after the Terra/Luna attacks.[6]


Bad actors are everywhere in crypto, and I would not be surprized if this new Lido code were hacked.


Staked ETH represents 97.5% of Lido’s assets (as measured by total value locked, TVL). Imagine if this were stolen? A nightmare scenario indeed! Obviously, Lido would go bankrupt immediately. What else?


If Lido falls, where next?

The knock-on effects of a Lido collapse, to its customers and to other parts of De-fI, could be worse than the effects of the Terra/Luna collapse in 2022 which brought down the largest crypto hedge fund 3AC and two major lending protocols, Celsius and Voyager (I have blogged about the Terra/Luna attacks, before if you want more details about what actually occured).


To understand why, consider the following. When a Lido client deposits ETH, Lido gives them a sort of IOU called staked ETH (stETH). And when a client wishes to stop staking, they should be given 1 ETH for every stETH they return to Lido. The price of stETH should be the same as ETH, and the same applies to all the other staked tokens Lido provides, like stDOT and stSOL.


But if the Lido Shanghai upgrade code is hacked, Lido could lose all $7.65 billion worth of ETH in which case stETH would become worthless because little or no ETH would be left in Lido for the exchange. Even if Lido loses only a fraction of their customers money in a hack, Lido are unregulated, so their clients will have no recourse to consumer protection law.


Although stETH may not become worthless, but there is a real danger it will lose its peg from ETH. It has done so before during the Terra/Luna attacks in May last year, but it has never dropped below 90 cents (see the chart leading this blog). A major de-peg to 80 cents or less would set a spiral in motion which would affect many other De-Fi protocols.


The story doesn’t stop with Lido and its clients, because stETH is more than just an IOU: stETH can be used for collateral throughout the De-Fi ecosystem. So a major de-peg of stETH would make ripples everywhere. In fact, a hack of the new Lido code and subsequent de-peg of stETH could be exactly the catalyst I feared when I made this podcast and wrote this article warning readers last year about the Aave-Lido magic money tree.


Aave is a shadow bank which takes deposits and makes loans in crypto. The loans are over-collateralised (you must deposit more than you borrow) and the amount available to borrow depends on how stable the token’s price is. Always assuming stETH keeps its peg, on depositing 1 ETH the Lido client acquires 1 stETH, which they could then use as collateral to borrow 0.72 ETH on Aave. The 0.72 ETH borrowed could then be deposited at Lido, in return for 0.72 stETH, which could be used as more collateral in Aave, now to borrow 0.72 x 0.72 = 0.5184 ETH, and so on.


So starting with a stake of 100 ETH, the total amount of ETH staked on Ethereum, using this magic money tree is:


100 x (1 + 0.72 + 0.72^2 + …..) = 100/(1 – 0.72) = 357 ETH.


In other words, if the Aave-Lido magic money tree breaks, much more than $7.65 billion of the ETH staked would be in jeopardy.[7]


Although Aave is the largest of the De-Fi 'shadow banks' (TVL $11bn total over three protocols) there are many other similar, smaller liquidity protocols which are already under stress, due to a high proportion of bad debt. RiskDAO's dashboard tells a distressing story of mounting bad debt. For instance, Venus and Iron bank had bad debt ratios of 8.18% and 12.24% in January 2023, and they now have 10.53% and 67.52% respectively. Others, like Inverse Finance (75.39%) and Moonwell (40.22%) have even more.


So, there could be a long-overdue shake-out of in crypto lending markets, with several smaller protocols failing, though one would hope the Aave decentralised autonomous organisation (DAO) will survive given its diversified business portfolio and (so far) good governance mechanisms


Could a Major stETH De-peg Spillover Elsewhere?

Aave has a long-term partnership with Balancer which is yet another multi-function DAO. As such, Balancer hosts the AAVE/ETH “Safety Incentive” and many other liquidity pools. Like other decentralised exchanges, Balancer issues liquidity tokens which are somewhat similar to stETH, in that they represent a sort of IOU to a liquidity provider, which can also be used as collateral for real crypto elsewhere in the system.


Liquidity tokens are automatically issued to a liquidity provider, who deposits liquid crypto to the pools on a decentralized exchange in return for interest. [8] If the provider wants to withdraw the crypto deposited in liquidity pools, the liquidity tokens must be redeemed.


But if they are deposited in a lending protocol that is on the verge of insolvency, liquidity providers would be unable to withdraw their tokens for use in other areas of the ecosystem. We may see liquidity drying up considerably in some of the pools on Balancer, Uniswap or Curve. Curve specialises in stablecoin liquidity pools, so a rapid fall in liquidity there would affect the price of some stablecoins.


And stablecoins are the blood which flows through the veins of the crypto ecosystem and connects it with the traditional financial markets. I could go on, but the more I think this line of dominoes through the more depressing it gets. Until the next blog then (I will try not to leave it so long this time).


Summary

The activity in De-fi is still tiny compared with the trading volumes on centralised crypto exchanges like Binance. But De-Fi risks like this are very much more hidden from view, and we know from the Terra/Luna collapse in 2022 that De-Fi can have a great impact on the entire crypto ecosystem, which can also spill-over to bankrupt crypto friendly banks like SVB and other areas of traditional finance.


Carol Alexander

11 April 2023



[1] Every blockchain has a native token which is used to reward the block builders. Modern chains like Ethereum but not Bitcoin (that is, Bitcoin itself without layer 2 solutions) that can carry smart contracts (code with automatic instructions) also have an in-built utility for this token (because users must use the token to pay for putting the smart contract code on the blockchain, from where it will automatically execute lots of a transactions). Thus, within the ecosystem of the chain, a native token of a smart contract blockchain is a commodity.


[2] See the EF explainer and FAQ here


[3] 73% of the native token ADA is currently being staked on Cardano (and 70% of SOL, the native token for Solana is staked) whereas only 14% of ETH is staked, currently. There are about 120 million ETH in circulation, so about 17 million ETH are being staked at present (and almost one-third of these are held by Lido). ETH is also the base currency for gaming, NFTs and other metaverse platforms and the market cap of ETH is about $230 billion, compared to only $14 billion for ADA and $9 billion for SOL.


[4] See Dune explorer. All the Kraken validator nodes will now request full withdrawals and quit staking as Kraken already agreed to this request from the U.S. Securities and Exchange Commission.


[5] Here is an interesting video about the potential instability from Lido code upgrades for the Shanghai fork


[6] Anchor offered 20% yield on terra stablecoin deposits, to encourage its rapid adoption.


[7] If all Lido clients used the magic money tree to its fullest (which of course they do not) then 3.57 x $7.65 = $27.31 billion ETH could be affected -- more than the current total of $26 billion ETH staked.


[8] Liquidity providers deposit tokens in proportion to their relative price. For instance, if token A is $10 and token B is $2, then they must deposit A and B in the proportion 1:5.

571 views2 comments

Recent Posts

See All

2 Comments


If you want to coin cryptocurrency yourself, I recommend you to check this ASICs list. I chose ASIC from this list and now I can mine for myself, which is very cool.

Like

Very interesting, thank you

Like
bottom of page