Skip to main content

yPools

Definitions

  • yToken: A token received when depositing an LST into its corresponding yPool. (e.g. yETH)
  • st-yToken: A token received when staking a yToken. (e.g. st-yETH)

Overview

yPools are user-governed liquidity pool tokens consisting of various like-kind Liquid Staking Derivatives (LSTs).

The yPools protocol is an Automated Market Maker (AMM) for LSTs. Each LST in the pool is priced according to the amount of underlying assets it represents. This lets users deposit their LSTs into the pool and receive yPool tokens pegged 1:1 with the underlying. Users can also stake their yPool tokens to mint st-yTokens, accrue yield, and participate in their respective yToken governance.

This AMM model, combined with the governance and incentive mechanisms of the yPools protocol, aims to provide an optimal risk-adjusted yield for LST staking by dynamically adjusting the weights of the LSTs in the pool. It also offers users flexibility with single-sided deposits and withdrawals, and maintains the pool's balance and diversification through a weight management system.

Each yPool is governed by its users who can vote to adjust the weights of the LSTs in the pool, helping to maximize yield and mitigate risks associated with individual LSTs.

All yields generated by a yPool go to the Staked yPool token holders, making yTokens an ideal token for Liquidity Providing in stableswap pools like those on Curve. To acquire a yToken, users can mint it by depositing LSTs or swap against the Curve pool.

Staked yTokens

Users stake their yTokens to mint staked versions (st-yToken), accrue yield, and can later unstake to receive the yToken back according to their earnings. Stakers receive all yield and slashings from the underlying yield sources and earn incentives if they participate and vote in their respective yPool governance.

By bundling LSTs, yPools aims to generate the best risk-adjusted yield from LSTs. Through protocol governance, st-yToken users can readjust pool weights to maximize yield while mitigating catastrophic scenarios where one or several LSTs in the composition suffer adverse events like de-pegging or security incidents.

st-yToken User Vote Weight

Each user has an internal vote weight that increases asymptotically to the user's share count. After t seconds, their vote weight is s * t / (t + t_half) where s is the number of shares and t_half is the voting half-time. The voting half-time variable determines the time it takes until half the voting weight is reached for a staker.

The user's external vote weight equals the internal vote weight at the end of the previous week.

For yETH, you can find the current voting half-time on Etherscan in seconds. Thus the wait to get to half of your st-yETH voting power is 60 days.

Pool Weights For Each LST

Each Liquid Staking Derivative (LST) has an assigned weight representing its proportion in the pool. The weight management system ensures that the pool remains diversified and balanced. As an LST performs well or gains popularity, its weight in the pool may increase, attracting more liquidity and providing better returns. Conversely, if an LST underperforms or faces issues, its weight may decrease, reducing its impact on the overall pool performance. This dynamic adjustment helps maintain an optimal risk-adjusted yield for yPool users.

For each epoch, users can vote to adjust the weights of the LSTs in the pool. The voting process also involves a "do nothing" option, allowing the current weight distribution to remain unchanged. If a new LST is added during the voting process, it starts at 0% weight and gradually increases to 1% in the first epoch. In the subsequent epoch, they participate like all other LSTs.

Example

Suppose we have four LSTs: A, B, C, and D with weights 10%, 20%, 30%, and 40% respectively in epoch n. For the next epoch (n+1), C has incentives worth $100.

The voting outcome for epoch n+1 is:

  • Do nothing: 30%
  • A: 7%
  • B: 10%
  • C: 43%
  • D: 10%

Here's how the voting outcome affects the weights:

  1. The "do nothing" vote is distributed to the current weight, reducing the total redistribution to 7%.
  2. The incentives for voting are distributed only to those who explicitly voted for a particular LST, making the incentive system more effective.
  3. If a new LST, say E, is added during the voting process, they start at 0% weight and do not fight for the 7% redistribution. They are gradually increased to 1% in the first epoch. In the next epoch, they participate like all other LSTs.

Single-Sided Deposits and Withdrawals

Single-sided deposits and withdrawals allow users to add or remove a specific asset from the pool. This differs from balanced operations where users deposit or withdraw a proportionate amount of all assets in the pool. Single-sided operations can be more convenient but may also incur bonuses or penalties.

Single-Sided Deposits

When a user makes a single-sided deposit, they add a specific amount of one asset to the pool. The system calculates the equivalent amount of yPool tokens to mint based on the current rate of the deposited asset.

However, single-sided deposits can distort the balance of assets in the pool. The system applies a deposit penalty if the deposited asset's weight increases above its target weight due to the deposit. This penalty reduces the amount of yPool tokens minted for the depositor, making the deposit operation more expensive. The penalty serves as an incentive for users to maintain the balance of assets in the pool.

Conversely, the system applies a deposit bonus if the deposited asset's weight is below its target weight. This bonus increases the yPool tokens minted for the depositor, making the deposit operation cheaper. The bonus serves as an incentive for users to restore the balance of assets in the pool.

Single-Sided Withdrawals

Users who make a single-sided withdrawal burn a specific amount of yPool tokens to withdraw one asset from the pool. The system calculates the amount of the asset to send based on the current rate.

Like single-sided deposits, single-sided withdrawals can also distort the balance of assets in the pool. If the withdrawn asset's weight decreases below its target weight due to the withdrawal, the system applies a withdrawal penalty. This penalty reduces the amount of the asset sent to the withdrawer, making the withdrawal operation more expensive.

Conversely, the system applies a withdrawal bonus if the withdrawn asset's weight exceeds its target weight. This bonus increases the amount of the asset sent to the withdrawer, effectively making the withdrawal operation cheaper.

Example

Let's consider a pool with two assets, A and B, with a target weight of 50%. Due to market fluctuations, the current weights are 60% for A and 40% for B.

  • If a user deposits asset A, they will incur a deposit penalty because the deposit increases the weight of A above its target weight. The system will mint fewer yPool tokens for the depositor than the rate would suggest.
  • If a user deposits asset B, they will receive a deposit bonus because the deposit brings the weight of B closer to its target weight. The system will mint more yPool tokens for the depositor than the rate would suggest.
  • If a user withdraws asset A, they will receive a withdrawal bonus because the withdrawal brings the weight of A closer to its target weight. The system will send more asset A to the withdrawer than the rate would suggest.
  • If a user withdraws asset B, they will incur a withdrawal penalty because the withdrawal decreases the weight of B below its target weight. The system will send less asset B to the withdrawer than the rate would suggest.

For a deeper dive into the math behind the calculation of yPool weighted stable swap check this paper: https://github.com/yearn/yETH/blob/main/whitepaper/derivation.pdf

Protocol Specs