Liquidations and Stability Pool

Introduction

The stability pool serves as the primary safeguard to ensure the solvency of the system. Its main function is to provide the necessary liquidity to cover debt from liquidated vaults, ensuring that the total USDOX supply remains fully backed by collateral.

When a vault undergoes liquidation, an equivalent amount of USDOX from the stability pool is burned to cover the outstanding debt. In exchange, the vault's entire collateral is transferred to the stability pool.

Stability pools are funded by users, known as stability providers, who deposit USDOX into the pool. Over time, as liquidations occur, these providers see a reduction in their USDOX deposits but receive a proportional share of the liquidated collateral in return.

Since liquidations usually occur at a collateral ratio slightly below 150%, stability providers are expected to receive more collateral (in USD value) than the debt they absorb, making it an attractive way to accumulate assets at a discount.

Benefits for Stability Providers

Collateral Distribution

Stability providers receive liquidated collateral at a discount without needing to run liquidation bots or spend gas fees.

Since vaults are typically liquidated just below the Minimum Collateral Ratio (MCR), which is greater than 100%, stability providers receive collateral at a discount equal to MCR - 100% when a liquidation occurs.

For example:

  • The user owns 10% of the Stability Pool.

  • Vault Details

    • 2,000 USDOX debt backed by 2.5 wETH ($5,000 at $2,000 per wETH).

  • Price Drop: wETH falls to $1,200 per wETH.

  • Liquidation Impact:

    • 200 USDOX is burned from the user's share in the Stability Pool (10% of 2,000 USDOX).

    • The user receives 0.25 wETH (10% of 2.5 wETH), now worth $300.

    • Profit: $300 (collateral) - $200 (burned USDOX) = $100 profit.

Liquidations

To maintain full collateral backing for all USDOX in circulation, vaults that fall below 150% collateral ratio are subject to liquidation.

When a vault is liquidated:

  • Its outstanding debt is erased and absorbed by the stability pool.

  • The collateral is distributed proportionally among stability providers.

Although the vault owner retains the full borrowed USDOX, they incur a loss of up to 20% in value, making it essential to keep collateral ratios above 150%, and ideally closer to 200% or higher.

Liquidators

On the testnet, liquidations are handled by an automated liquidation bot that monitors vaults and executes liquidations when their collateral ratio falls below 150%.

To maintain protocol efficiency, the bot is incentivized with gas compensation, calculated as:

Gas Compensation = 200 USDOX + 0.5% of the vault's collateral
  • 200 USDOX comes from the Liquidation Reserve.

  • 0.5% of the collateral is deducted from the liquidated assets, slightly reducing rewards for stability providers.

To minimize gas costs, the bot supports batch liquidations, allowing multiple vaults to be liquidated in a single transaction, ensuring a cost-effective and seamless liquidation process.

Liquidation Process

The way liquidations are handled depends on different protocol conditions:

ICR = Individual Collateral Ratio

MCR = Minimum Collateral Ratio

GTCR = Global Total Collateral Ratio

SP = Stability Pool

Condition
Liquidation Behavior

ICR ≤ 100%

Debt and collateral (minus gas compensation) are redistributed to active vaults.

100% < ICR < MCR

Vaults becomes eligible for liquidation using the SP, with the SP covering its debt using USDOX deposits and receiving the corresponding collateral.

MCR ≤ ICR < GTCR during Recovery Mode (Recovery Mode: GTCR < 150%)

Only enough collateral to cover 110% of the debt is sent to the Stability Pool. Any remaining collateral is transferred to the liquidator.

SP is unfunded

Debt and collateral of the liquidated vault is redistributed among other active vaults proportionally.

What Happens If the Stability Pool is Empty?

If the stability pool has insufficient funds to absorb liquidated debt, an alternative liquidation process called "redistribution" occurs.

  • The system reallocates the debt and collateral from liquidated vaults to all other active vaults.

  • This redistribution is done proportionally based on the collateral value of each receiving vault.

This ensures that the system remains solvent even if the stability pool is not sufficiently funded.

Claiming Liquidated Collateral

Stability providers can claim their share of liquidated collateral once it has been fully allocated to their accounts.

Collateral must accrue before it can be claimed. This happens when a user performs the following actions:

  • Depositing USDOX into the stability pool

  • Withdrawing from the pool (even with a 0 amount transaction)

  • Claiming any pending collateral rewards

To avoid extra transactions, users can check their accrued balance before claiming using a simple client-side check:


claimable = sp.getDepositorCollateralGain(account)
for i in range(len(claimable)):
    if claimable[i] > 0:
        assert sp.collateralGainsByDepositor(account, i) == claimable[i]

if this check passes, the user can call claimCollateralGains using the indexes with non zero claimable amounts in the claimable array. if this check fails, they must either:

  1. claim any pending ZBU rewards first

  2. send a transaction to withdraw 0 USDOX from the corresponding stability pool, updating the claimable balance.

Last updated