🧯Liquidations

"An eye for an eye keeps DeFi protocols solvent" - Taylor Swift, Eras Tour.

First of all, Itos's Automated Market Taking is designed to prevent liquidations so if you're concerned about liquidations I'd read that first. However, if you wish to push the limits of capital efficiency we're happy to help. Here we'll discuss how our liquidations attempt to treat users fairly while still incentivizing liquidators.

Solvency

Once all credits and debts have been adjusted by the variance factor to get our virtual balances, a portfolio is solvent if it has a positive net virtual balance in USD terms for cross-margined tokens, and in each token's own balance for tail-tokens.

USD vs Tail Tokens

As mentioned in Cross-Margin Accounting, a portfolio has cross-margin-able balances which are settled in USD, and isolated balances which are settled on a per token basis.

When liquidating, the liquidator has to choose either USD, or a specific token to liquidate. If they're closing for USD, then the tail tokens, which have no USD value on Itos are left untouched. If they're liquidating for a specific tail token, then all other tail token balances and cross-margin-able balances are left untouched.

Some positions are a combination of both cross-margin and tail tokens. When those are closed, the unaffected token must be refunded by the liquidator to the portfolio so that the effective balance is unchanged. For example, if you have a USDC/PEPE AMM liquidity position worth 120 USDC and 1M PEPE getting liquidated for PEPE, then the USDC will be refunded to your portfolio. However, the effective balance is what is unchanged. So we use The Variance Factor to adjust the USDC balance by PEPE's variance factor of say 1.2. Since it's collateral we divide by 1.2 to get a 100 USDC refund. For Cross-Margin Accounting purposes, your USD portfolio remains as healthy as it was before. The liquidator receives 20 USDC as their premium for resolving the PEPE debts.

Full vs. Partial Liquidation

For USD insolvent portfolios with low total USD value, and tail token insolvent portfolios, the liquidation is a full liquidation, which closes all related positions.

A USD insolvent portfolio that is sufficiently large will instead be partially liquidated according to our dynamic liquidation scheme. The exact partial liquidation value cut-off is determined by governance. Sometimes, when partial liquidating we'll split an asset in two so that we can cleanly close only the exact amount we're interested in.

Dynamic Liquidation Sizing

Our partial liquidations don't have a pre-determined size like other protocols. A static size can often lead to insufficient liquidations or repeated liquidations. Instead we this formula which guarantees the resulting portfolio is solvent while also giving sufficient incentives to the liquidator.

q=ξ+μβ1μβ1V2q = \frac{\xi + \mu \beta - 1}{\mu \beta - \frac{1}{V^2}}

Here is what each variable means:

  • qq is the liquidation percent. How much of the portfolio can be liquidated.

  • ξ\xi is the minimum liquidation percent. How much of the insolvent portfolio's collateral the liquidator receives as aa reward. This is determined on per-chain basis by governance.

  • β\beta is the post-liquidation gap. The user can adjust this number for each of their portfolios. A larger β\beta increase the liquidation size, but results in a healthier portfolio which is less likely to get re-liquidated. This is useful for long-term holders who don't frequently monitor their positions. A smaller β\beta results in smaller liquidations that bring your portfolio ever so slightly into solvency. This is appropriate if you can respond to large market moves quickly and prevent further liquidations.

  • V2V^2is known as the variance gap. It is the real amount of collateral divided by the real amount of debt in a portfolio. On other platforms, the inverse of this is usually referred to as the utilization ratio. We frequently use both terms.

  • μ\mu measures how insolvent the portfolio is. It is the solvent variance gap divided by the current variance gap. Is it greater than 1 when a portfolio is insolvent.

Ultimately what this achieves is a properly incentivized liquidation scheme that always brings portfolios into solvency as long as there is more real collateral than real debt. All liquidation schemes fail when there is more real debt, and so we use a number of parameters, primarily the variance factor to prevent such a scenario in a user-friendly way.

Examples:

Here are a few examples of USD liquidations. Assume all positions are larger than the full-liquidation cutoff. By default, we use ξ=0.5%,β=1.02.\xi = 0.5\%, \beta = 1.02.

A Simple Borrow And Lend
  • A user has 1000 USDC as collateral with a variance factor of 1.01. Pretend here that USDC always has a USD value of 1.

  • They borrow 700 ARB who has a variance factor of 1.03.

  • Their virtual collateral is 1000 / 1.01 = 990 USD.

  • So as long as their virtual debt is less than their virtual credit they're healthy. So if P is the price of ARB in USD, as long as P * 700 * 1.03 < 1000 / 1.01 they're okay.

  • This means if ARB goes to more than $1.37, there can be a partial liquidation.

  • Say the price goes to $1.40 suddenly. Now we're insolvent.

  • V2=10001.40700=1.02V^2 = \frac{1000}{1.40 * 700} = 1.02. This is serious trouble! The portfolio is at 98% utilization, much higher than any other protocol allows. (1/1.02 = .98).

  • μ=1.011.031.02=1.02\mu = \frac{1.01 * 1.03}{1.02} = 1.02

  • q=.005+1.021.0211.021.0211.02=75.7%q = \frac{.005 + 1.02 * 1.02 - 1}{1.02 * 1.02 - \frac{1}{1.02}} = 75.7\%. So we can return the portfolio all the way from 98% utilization to healthy by liquidating three quarters of this portfolio's virtual debt.

  • Thus we have to clear .757 * 1.4 * 700 * 1.03 = 764.1 of the virtual debt.

  • The liquidator repays 764.1 / (1.4 * 1.03) = 530 ARB, dropping the virtual debt to now 245.1 USD.

  • The liquidator collects 764.1 of virtual collateral = 764.1 * 1.01 = 772 USDC.

  • In real terms, the liquidator spent 1.4 * 530 = 742 USD to repay the ARB debt, and gained 772 USDC thus giving them a premium of 30 USD for clearing more than 700 dollars of debt. This is roughly a 5% premium which is in line with other protocols.

  • The final portfolio now has 258 USDC and 170 ARB worth 238 USD, thus giving a final utilization ratio of 92.2% which is lower than we started and considered safe by Itos. Had the user used a higher β\beta we would have liquidated more and ended up with less utilization.

  • At the end, the virtual debt is now 245.1 USD and the virtual credit is 255.4 USD which gives us a 10.4 USD buffer!

Last updated