Yield Space: Virtualizing inaccessible reserves

Contents

Bakuchi
5 min readDec 12, 2022
  • Liquidity provision in Yield Space
  • Pool initialization
  • Why are there inaccessible reserves?
  • How much reserves are inaccessible?
  • Properties of inaccessible reserves
  • Summary and conclusion

Liquidity provision in Yield Space

The liquidity providing itself is not different from Uniswap. Yield Space pairs DAI and fyDAI (zero-coupon bond tokens).

  • Deposit DAI and fyDAI in proportion to reserves and receive newly minted LP tokens. In other words, if the amount of DAI and fyDAI in the pool increases by m times, the total supply of LP tokens will also increase by m times.
  • Anyone can add liquidity to a pool.

Pool Initialization

When creating a new pool, deposit the same amount of DAI and fyDAI in the pool. In the initial state, the zero-coupon bond price is exactly 1 and the implied forward rate is 0%. if the pool creator know a target rate, sell the zero-coupon bond token and change it until the target rate is reached.

Why are there inaccessible reserves?

Normally, 1 fyDAI (zero-coupon bond token) is never traded at a price higher than 1 DAI. There is no reason to buy zero-coupon bonds in the market because users can always mint zero-coupon bonds from the protocol (Yield Space).

Therefore, we can assume that price of fyDAI does not exceed 1 DAI. By prohibiting the price exceeding 1 DAI at the contract level, we have a strong guarantee that the fyDAI in the pool (hereinafter referred to as the fyDAI reserves) will always be more than the DAI.

In other words, some of fyDAI in the pool is never used and liquidity providers don’t even need to deposit it in the first place. The reserves that does not even need to be deposited (cannot be used) are defined as virtual reserves. Liquidity providers only need to provide fyDAI in proportion to fyDAI reserves, improving capital efficiency.

First, let’s consider the simple case of t -> 1, namely pool initialization.

Suppose Alice initializes a pool with 1000 DAI and 1000 fyDAI. Since the price of fyDAI at the time of initialization is 1DAI, all 1000 fyDAI can be virtual reserves, and indeed Alice only needs to provide liquidity for 1000 DAI. Then 1000 shares of LP tokens will be issued to Alice.

How much reserves are inaccessible?

Let’s consider the more general case. (Here we assume 0 % fee)

The inaccessible fyDAI reserves (the amount of fyDAI in the pool that cannot be bought) equal to the amount of fyDAI that remains in the pool when swapped at 1DAI, the maximum of the fyDAI price.

Gray areas in the figure correspond to inaccessible fyDAI reserves.

This can be expressed with the following equation,

where

is inaccessible fyDAI reserves (virtual reserves), x_start is the pre-swap DAI reserves, and y_start is the pre-swap fyDAI reserves.

Solving this equation for the virtual reserve.

Given that the nominator is invariant before and after the swap, it makes sense that the inaccessible reserve does not change when the swap occurs.

The following figure shows how much reserve are inaccessible.

The implied forward rate on the horizontal axis represents the APY of fyDAI when HODL until maturity, and the vertical axis represents the percentage of the fyDAI reserves that can be virtualized. With a realistic implied forward rate of around 10%, more than 95% of the fyDAI reserves can be virtual reserves, and liquidity providers can reduce the amount of fyDAI that should be deposited by 95%.

Properties of inaccessible reserves

  1. Since the nominator of the equation is an invariant, the inaccessible reserves is invariant.
  2. As liquidity is provided, the inaccessible reserves also increase or decrease in the same proportion as the total supply of DAI, fyDAI already in the pool and LP tokens.
  3. When the pool is initialized (at t = 1), LP tokens are issued in an amount equal to the DAI deposited. The inaccessible reserves at the time of initialization are equal to the amount of LP tokens issued at that time.
  4. As the price of fyDAI rises over time, the inaccessible reserves increases monotonically as it approaches maturity.

Since these properties are satisfied, it is likely to be that the inaccessible reserves are greater than the total supply of LP tokens. (except for donating fyDAI to the pool, etc.)

See the Yield Space white paper for the rigorous proof! I read it myself, but there are many mistakes, so please be careful.

Inaccessible reserves and total supply of LP tokens

Finally, let’s look at a concrete example.

The following graph shows how reserves and minted LP tokens change as traders buy, sell, and provide liquidity.

You can also check the following properties from the graph.

  • The fyDAI price generally increases over time.
  • Implied rate only change when swaps occur.
  • Invariants (invariants here are power sums divided by s) are unchanged with swaps and liquidity provision. It is hard to read from the figure, but it increases slightly over time.

Summary and Conclusion

Yield Space has virtualized inaccessible reserves. If the implied rate is less than 75%, liquidity providers can reduce the amount of fyDAI that should be deposited by 75% or more.

In order to simplify the story, we have set the fee to zero and omitted some details. In reality, the formula is slightly modified to account for fees and donating fyDAI to the pool.

YieldSpace: An Automated Liquidity Provider for Fixed Yield Tokens

YieldSpace[public]

--

--