Collateralization & liquidations
Last updated
Last updated
How does collateralization work?
How does liquidation work?
While investing in the leveraged vaults, the principal deposited by the user as well as the borrowed funds acts like collateral for the borrowed funds.
Every strategy vault enforces a maximum leverage ratio and every user has a leverage ratio that is a function of the value of their assets and the value of their debt. If the value of a user's assets falls and their leverage ratio breaches the max limit, they can be liquidated.
The leverage ratio is calculated as the difference between the user's vaultShareValue (their total assets) and their debt, divided by the value of their debt.
By this metric, the closer to 0 the vaultShareValue - debt
is, the riskier the position. Upon liquidation, a user's leverage ratio will decrease and their position will become less risky.
The maximum leverage ratio is decided in such a manner that in no circumstances does an account's collateral drop beyond the value deposited by the investor without liquidation.
In the event of liquidation, a liquidator can purchase a portion of the user's vaultShares at a discount for cash that is used to pay down the liquidated user's debt.
Maximum leverage ratio: This is the leverage ratio that will trigger a liquidation upon breach.
Target leverage ratio: The target leverage ratio is lower (less risky) than the maximum leverage ratio, and is used within the liquidation function to determine how much of a user's vaultShares the liquidator is eligible to purchase.
Liquidation bonus: The bonus that the liquidator receives during liquidation.
Minimum debt size: The minimum amount of debt a user can hold. No liquidation can bring an account below the minimum debt size unless the liquidation fully zeroes out the user's debt.
Liquidators can specify the number of vaultShares that they want to purchase from an account during liquidation but they can't liquidate an account past the target leverage ratio.
The target leverage ratio sets a cap on the amount of assets that the liquidator can purchase unless the liquidator is forced to close out the account's position completely because they would otherwise have a debt that is below the minimum debt size.
Consider the following vault and account:
Maximum leverage ratio: (1/0.2) = 5
Target leverage ratio: (1/0.4) = 2.5
Liquidation bonus: 5%
Minimum debt size: 50,000 USDC
Value per vaultShare: 1 USDC
Account vaultShares: 590,000
Account debt: 500,000 USDC
Account leverage ratio: (1/0.18) = 5.56
This account is over-levered and eligible for liquidation. The max amount of vaultShares that the liquidator can purchase (math obscured for simplicity check appendix for detailed calculation) is 330,000 for a price of 314,285 USDC. This liquidation will return the account to the target leverage ratio of 2.5 and it will leave the account with a debt of 185,715 USDC so the account will not be in violation of the minimum debt size.
THIS IS CONFUSING Note that the account's debt at maturity is closed out one to one with the cash that the liquidator puts in today. This is effectively like the liquidated account lending the liquidator's cash deposit at 0% from the time of liquidation until maturity. Because cash in Notional is held as cTokens, the account is giving up any money-market interest that it would earn on that deposit between the time of liquidation and maturity. Instead, that interest accrues to Notional and can be thought of as a protocol liquidation fee.
To illustrate how the minimum debt size comes into play during liquidations, let's consider that the account instead held 59,000 vaultShares vs 50,000 USDC debt. In this case, returning the account to a leverage ratio of 2.5 would leave it with a debt of only 18,571 USDC. This amount is below the minimum debt threshold.
In this case, the liquidator would be required to zero out the account's debt completely. So the liquidator would be allowed to purchase 52,500 vault shares for 50,000 USDC, leaving the liquidated account with 6,500 vaultShares and no debt.
Consider the following scenario:
Maximum leverage ratio: (1/0.2) = 5
Target leverage ratio: (1/0.4) = 2.5
Liquidation bonus: 5%
Minimum debt size: 50,000 USDC
Value per vaultShare: 1 USDC
Account vaultShares: 590,000
Account debt: 500,000 USDC
Account leverage ratio: (1/0.18) = 5.56
The above equation is derived based on the following equations:
Continuing the calculation part,
Which equals 314,285 USDC and liquitableVaultShare will be 314,285x1.05 i.e. 330,000.