vdAMM: Validator Decentralization Automated Market Maker

vdAMM transforms unshETH into a liquidity hub for LSDs - it lets users swap between LSDs in the unshETH basket, and accruing fees to unshETH holders.

Motivation

Historically, liquidity pools for LSDs have been dominated by LSD-ETH (i.e. staked ETH and unstaked ETH) liquidity pairs. Prior to the Shanghai upgrade, staked ETH could not be withdrawn into native ETH. Thus, providing an off-ramp from staked ETH to native ETH via Curve, Balancer, and Uniswap LSD-ETH pools was an important role for LSDs to gain prominence in Defi.

Incentivizing LSD-ETH liquidity pools for each new LSD is very expensive; most of the TVL doesn't earn ETH staking yield:

  • ~50% of the ETH in these pools is unstaked and unproductive (doesn't earn staking yield)
  • Of the ~50% that is in staked ETH, another ~50% of the staking yield is spent in liquidity incentives:
    • Explicitly taken in some cases, e.g. on Balancer, 50% of the staking yield in LSD-ETH pools is directly taken as protocol fees
    • Implicitly spent in other cases, e.g. Lido spends ~$30-50M/yr in LDO incentives to subsidize ~$2b in stETH-ETH liquidity.

It's also very inefficient for liquidity providers and users:

  • Utilization rates on the >$2b in LSD-ETH liquidity sit around 1-2%, translating to uncompetitive organic swap fee APR that's less than the ETH staking yield that was foregone
  • Each LSD protocol individually subsidizes liquidity pools with ETH, rather than pooling that liquidity together, which leads to wasted liquidity
  • For users swapping from 1 LSD to another LSD, they have to pay LSD-ETH swap fees twice, paying > 10 bps to do these trades.

Once network level withdrawals are fully enabled, most users will be able to natively withdraw staked ETH within 24 hrs. Thus, staked ETH becomes closer to fungible with native ETH, lessening the need for large LSD-ETH liquidity pairs. At the same time, there's going to be a Cambrian explosion of activity in the LSDfi space and a growth in the number and types of LSDs, each offering unique utility and incentives in various corners of Defi.

Pooling multiple assets liquidity together is not feasible in current AMM designs (e.g. Curve, Balancer), because the entire pool inherits the tail risk of the riskiest asset:

  • In a Curve pool, there's no upper limit on the weight of an individual asset. So if you end up adding a risky / new asset to a Curve pool with high quality assets, and the risky asset "rugs" - the whole pool's value will be destroyed.
  • The worst example of this was when UST experienced a death spiral in May 2022. Billions of USDC, USDT, and DAI paired against UST in the popular 3Crv-UST pool were incinerated as UST filled up the entire pool. Curve TVL fell by ~$8B in the following weeks.

Also, "LP token" assets that are natively yield bearing don't have native support in most defi and dapps. 3crv(USDT,USDC,DAI Curve LP pool token) is probably the closest thing to a "first-class" yield-bearing native token asset. But even 3Crv usage is fairly limited - e.g. there's no Aave borrow market, CEX listing, Omnichain support. Certainly, no such asset exists for ETH.

vdAMM Overview

With the vdAMM's novel design - users and LSD protocols no longer have to choose between earning ETH staking yield, swap fee APR, and defi utility.

Here's what the vdAMM does:

  • Provide highly efficient concentrated LSD-LSD and LSD-eth liquidity by pooling together all LSD protocol liquidity under the unshETH basket
  • ~95% of all unshETH TVL will continue to earn native ETH staking yield (~5% is targeted as native ETH to facilitate LSD-eth swaps)
  • All supported LSDs are treated equivalently on the basis of the ETH backing them with zero slippage.
  • 1 ETH equivalent of any supported LSD can be swapped for 1 ETH of any other supported LSD in the basket (minus fees).
  • No swap can occur beyond the configurable maximum weight for each individual LSD, creating isolated risk baskets beyond which tail risk is minimized.
  • In most cases, vdAMM LSD-LSD swaps will be substantially cheaper to users than existing AMM DEX:
  • LSD-LSD swaps will cost ~1-3 bp in base fee.
  • vdAMM will charge dynamic fees based on whether swaps bring unshETH basket closer to the governance decided target weights.
  • Dynamic fees will be 0 when swaps help rebalance the unshETH basket towards its target weights.
  • The vdAMM dynamic fee curve will also be applied to minting / redeeming unshETH
  • Depositing a LSD that is under target weight to mint unshETH will be free
  • Upon launch, 100% of swap fees and unshETH mint/redeem fees will accrue to unshETH holders

By simply holding unshETH, users can earn ETH price appreciation + ETH staking yield + mint/redeem fees. This makes unshETH's sustainable "real yield" higher than any other ETH LP token or staking product. All this while staking with a diversified set of LSD protocols with zero leverage. Additionally, users can further use unshETH in defi and beyond - e.g. unshETH-USDC liquidity farming, accessing Omnichain defi by bridging to BNB Chain, or borrowing against unshETH (soon_tm).

Theoretical Basis

Why does the vdAmm treat 1 staked ETH = 1 staked ETH instead of using a Curve-like invariant slippage curve?

The vdAMM is offering immediacy by making the stat arb bet that 1 staked ETH = 1 staked ETH regardless of near-term liquidity preference on each LSD, and manages the tail risk of this mean reversion trade with the maximum weight caps.

The primary reason users will swap using the vdAMM is because they want to exit a LSD faster than the network level withdrawal queue (>= 24 hrs). In most cases, these users are "uninformed" "impatient" "liquidity takers." In principle, it's always a good idea to take the other side such market participants (while collecting fees), because this is non-toxic flow that will mean revert. That is, if a LSD is backed by 1 ETH, that will stay true tomorrow even if a user dumps it for 1 ETH - X in fees.

On the other hand, if users are "informed" participants, they could be dumping a LSD because "something is wrong" - that is, for some reason or another, the ETH backing the LSD is at risk of being lower than reported by the protocol's oracles (e.g. LSD protocol is hacked or loses keys to the ETH). This is a tail risk to be worried about, which is managed by (a) charging higher dynamic fees to compensate for this risk as the LSD's weights go further from its target, and (b) capping the overall risk at the configurable maximum weight of each LSD.

The target and maximum weight caps work together to manage the protocol's tail risk. These should be configured sensibly with governance votes. That is, a brand new LSD with unproven technology should have a low target and maximum weight.

Technical Discussion

How are base fees set?

Base fees apply to all swaps. These are configurable in the range of 0 to 10 bps by governance. Goal is to remain cheaper than LSD-ETH-LSD trades on existing major dex (costs 10 bps on Uniswap, 8 bps on Curve). Initially, base fee is set to 1 bp.

How are dynamic fees set?

Dynamic fee calculation is inspired by GMX GLP, with some improvements.

First, compute the absolute difference in current and target weights initialDiff
Then, compute the absolute difference in current and post-swap weights postDiff
If postDiff initialDiff, dynamicFee = 0, as it helps bring the unshETH basket closer to target weights

If postDiff > initialDiff, calculate the averageDiff (the average difference to target weight before and after swap)
Then, calculate the avgPctDiff as averageDiff / targetAmount. By dividing the averageDiff by targetAmount, we normalize the difference for small and large LSDs.

The dynamicFee is quadratically proportional to the avgPctDiff:

  • dynamicFee = slope_x * avgPctDiff + slope_x^2 * avgPctDiff^2

Mathematically, the unshETH portfolio covariance increases based on the square residuals to target weights, thus the appropriate compensation per unit of additional risk taken is proportional to the square of the avgPctDiff.

Intuitively, the desired behavior is low / zero fee for small differences in actual vs target weights; and proportionally higher fees for large differences. This dynamic fee approach achieves that desired fee curve.

This dynamicFee calculation is done for each LSD being swapped (in a LSD-LSD swap), and the maximum of the 2 calculated dynamic fees is used (i.e. fees are determined based on the LSD proportionally furthest from its target weight).

The allowable range for dynamicFee is 0 to 200 bps. If the calculated dynamicFee > 200 bps, it's capped at 200 bps. In most cases, the maximum weight cap will be hit before then. The 200 bps cap is there as a backstop to prevent bad UX where a user un-intentionally gets charged a high fee to swap a LSD.

What is the instant redemption fee?

With the launch of vdAMM, 5% of the target unshETH basket will be in unstaked weth (wrapped ETH) to facilitate direct withdrawals into ETH without relying on external dex liquidity or network level withdrawal queues. There is an additional fee to drain weth from the vault as it is a more "scarce" asset.

In a LSD-eth swap using the vdAMM, the dynamic fee is calculated using the same process explained above, and the instant redemption fee is added to the dynamic fee. The instant redemption fee is initially set to 20 bps.

Can you swap from unshETH to an individual LSD or ETH with the vdAMM?

unshETH can be atomically redeemed into the basket of underlying LSDs. Once you have the set of LSDs, the vdAMM can then swap all the other LSDs into the individual LSD of choice (or weth).

The vdAMM will provider users with a function to do the 1-click swap described above. However, note that if any individual LSD is already against its maximum weight cap, then this swap can only be done into that LSD.

How are deposit and redemption fees set?

If deposit and redemption fees were 0, then at all times (every block), unshETH would get injected with the lowest quality / most "de-pegged" LSDs up to its maximum cap, and the higher quality LSDs would consistently get drained out of the basket. Before the vdAMM launch, the protcol set fixed redemption fees (25 bps) in order to avoid being arbitraged out if one of the individual LSDs de-pegs.

With the launch of the vdAMM, the protocol introduces dynamic deposit fees.

  • Depositing LSDs below their target weight is 0 fee.
  • Deposit fees are charged when LSDs above their target weight are deposited to mint unshETH. The calculation of the deposit fee uses the same dynamic fee curve as the LSD-LSD swaps, minus fixed redemption fee.

The goal here is to equalize the fees between minting unshETH with a LSD the protocol doesn't want and the fees to do a LSD-LSD swap by depositing the same LSD.