Stability Pool and Liquidations

What is the Stability Pool?

The Stability Pool is the first line of defense in maintaining system solvency. It achieves that by acting as the source of liquidity to repay debt from liquidated troves—ensuring that the total YUSD supply always remains backed.
When any Trove is liquidated, an amount of YUSD corresponding to the remaining debt of the Trove is burned from the Stability Pool’s balance to repay its debt. In exchange, the entire collateral from the Trove is transferred to the Stability Pool.
The Stability Pool is funded by users transferring YUSD into it (called Stability Providers). Over time Stability Providers lose a pro-rata share of their YUSD deposits, while gaining a pro-rata share of the liquidated collateral. However, because Troves are likely to be liquidated at just below 110% collateral ratios, it is expected that Stability Providers will receive a greater dollar-value of collateral relative to the debt they pay off.

Why should I deposit YUSD to the Stability Pool?

Stability Providers will make liquidation gains (see below) and receive early adopter rewards in form of YETI tokens.

What are liquidations?

To ensure that the entire stablecoin supply remains fully backed by collateral, Troves that fall under the minimum collateral ratio of 110% will be closed (liquidated).
The debt of the Trove is canceled and absorbed by the Stability Pool and its collateral distributed among Stability Providers.
The owner of the Trove still keeps the full amount of YUSD borrowed but loses ~10% value overall hence it is critical to always keep the ratio above 110%, ideally above 150%.

Who can liquidate Troves?

Anybody can liquidate a Trove as soon as it drops below the Minimum Collateral Ratio of 110%. The initiator receives a gas compensation (200 YUSD + 0.5% of the Trove's collateral) as reward for this service.

How am I compensated for liquidating a Trove?

The liquidation of Troves is connected with certain gas costs which the initiator has to cover. The cost per Trove was reduced by implementing batch liquidations of up to 160 - 185 Troves but with the aim of ensuring that liquidations remain profitable even in times of soaring gas prices the protocol offers a gas compensation given by the following formula:
gas compensation = 200 YUSD + 0.5% of Trove's collateral
The 200 YUSD is funded by a Liquidation Reserve while the variable 0.5% part comes from the liquidated collateral, slightly reducing the liquidation gain for Stability Providers.

How do I benefit as a Stability Provider from liquidations?

As liquidations happen just below a collateral ratio of 110%, you will most likely experience a net gain whenever a Trove is liquidated.
Let’s say there is a total of 1,000,000 YUSD in the Stability Pool and your deposit is 100,000 YUSD.
Now, a Trove with debt of 200,000 YUSD and collateral of 400 ibTKN is liquidated at an ibTKN price of $545, and thus at a collateral ratio of 109% (= 100% * (400 * 545) / 200,000). Given that your pool share is 10%, your deposit will go down by 10% of the liquidated debt (20,000 YUSD), i.e. from 100,000 to 80,000 YUSD. In return, you will gain 10% of the liquidated collateral, i.e. 40 ibTKN, which is currently worth $21,800. Your net gain from the liquidation is $1,800.
Note that depositors can immediately withdraw the collateral received from liquidations and sell it to reduce their exposure to ibTKN, if the USD value of ibTKN is expected to decrease (for an exception see Can I withdraw my deposit whenever I want?).

How do I benefit as a Stability Provider from early adopter rewards?

First you need to open a Trove, borrow YUSD, and deposit it to the Stability Pool. After making your deposit, you will start accumulating a reward (in YETI) proportional to the size of your deposit on a continuous basis. The reward is calculated according to the rewards schedule. Rewards will be the highest for early adopters of the system.
At any point in time, you can withdraw your pending rewards to your Avalanche address.

Can I withdraw my deposit whenever I want?

As a general rule, you can withdraw the deposit made to the Stability Pool at any time. There is no minimum lockup duration. However, you cannot withdraw while there are pending liquidatable Troves.

How to withdraw assets from the Stability Pool?

There are two ways to withdraw from the stability pool. With the standard withdraw functionality, you will receive YUSD as well as all the pending collaterals (from liquidations) you are eligible to receive. The secondary withdraw function will automatically sell any pending collaterals for YUSD and then send all the YUSD to your wallet. This functionality utilizes an approve "Router" which specifies a path to sell the collateral for YUSD.
Down the line, we will be introducing a vault to auto-sell any liquidation rewards for YUSD.

Can I lose money by depositing funds to the Stability Pool?

A trove should always be liquidated prior to the value of its collateral falling below 100% of the value of its debt. As long as that is the case, stability pool depositors should not lose money.
In recovery mode, we have an additional check which says that the stability pool is not even involved if a liquidation involves a trove with collateral ratio below 100%. In this case, the liquidation process does not go through the stability pool and instead debt/collateral is redistributed to active troves.
But in the event of an oracle failure or a flash crash, it is possible that the liquidated collateral is worth less than the YUSD taken from the stability pool. In this circumstance, an oracle could report that the trove has a collateral ratio above 100% but this might not actually be the case. This is a situation where you may experience a loss as a Stability Pool Depositor.
If YUSD is trading above $1, liquidations may become unprofitable for Stability Providers even at collateral ratios higher than 100%. However, this loss is hypothetical since YUSD is expected to return to the peg, so the “loss” only materializes if you had withdrawn your deposit and sold the YUSD at a price above $1.
Please note that although Yeti Finance has undergone multiple audits, a hack or a bug that results in losses for the users can never be fully excluded.

What happens if the Stability Pool is empty when liquidations occur?

If the Stability Pool is empty, the system uses a secondary liquidation mechanism called redistribution. In such a case, the system redistributes the debt and collateral from liquidated Troves to all other existing Troves. A trove can only be redistributed collaterals that it currently holds. I.e. if your trove has no WAVAX, you won't be redistributed WAVAX in the event that a trove with WAVAX gets liquidated while the stability pool is empty. Redistribution of debt occurs in a proportional fashion based on the RAV of collaterals in the trove that is liquidated.
I.e. if a trove has 20% RAV in WETH and 45% RAV in WAVAX, and 35% RAV in gOHM and gets liquidated, 20% of its debt will be proportionally redistributed to troves with WETH based on their ownership of the total WETH in the system, 45% to troves with WAVAX in the same fashion, and 35% of debt will go to troves with gOHM in the same way.