yearn / yearn-vaults

Yearn Vault smart contracts
https://yearn.finance/
GNU Affero General Public License v3.0
522 stars 318 forks source link

Question about withdrawal behavior when Aave Utilization Rate is at 100% #560

Open parkerburchett opened 1 year ago

parkerburchett commented 1 year ago

How will will Aave Yearn strategy handle withdrawals when the Aave Utilization Rate is at 100%? When Utilization rate is 100% all the supplied assets have been lent out and there is no liquidity to redeem for the a tokens on Aave.

For example in the aWETH Strategy

Yearn Aave WETH address 0xfafEB6C262517d7d1171a3bA836E3e2d2897835f that holds the aEthWETH. This Yearn Aave V3 strategy contract 0xec2DB4A1Ad431CC3b102059FA91Ba643620F0826

On the Yearn website it says

Supplies WETH to AAVE v3 and v2 to generate interest and earn rewards. Earned tokens are harvested, sold for more WETH which is deposited back into the strategy.

Here is what Aave says about liquidity risk during high utilization rates.

Each currency reserve is characterized by its utilization rate U which represents the share of borrowed liquidity: U = TotalBorrows / TotalLiquidity As U gets closer to 100%, the capital becomes scarcer until no liquidity is left at U=100%. This situation can be problematic if depositors wish to withdraw their liquidity, but no funds are available.

If I have WETH deposited in this strategy but it can’t be withdrawn from Aave because the Utilization Rate is at 100% and I attempt to withdraw ETH from this strategy what will happen?

many321 commented 6 months ago

ok

0xValJohn commented 6 months ago

Hi @parkerburchett,

The strategy can indeed become illiquid if it reaches 100% utilization. Trying to withdraw from it will cause a revert.

These strategies are part of the Yearn V2 multi-strategy vault. Fortunately, other liquid strategies are placed earlier in the withdraw queue, ensuring that depositors can withdraw at all times.

Similar mechanics are built into the Yearn V3 infrastructure, with the distinction that single-strategy vaults are now also offered. These vaults have an availableWithdrawLimit parameter, and trying to withdraw from them while the utilization of the underlying CDP is at 100% will also result in a revert.