🧯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.

Here is what each variable means:

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:

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.

  • 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.

  • 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