SIP-148: Upgrade Liquidation Mechanism

Author
Discussions-Tohttps://research.synthetix.io
StatusFeasibility
Created2021-06-11

Implementor

Kain Warwick (@kaiynne), Jackson (@jacko125)

Simple Summary

This SIP proposes a modification to the existing liquidation mechanism defined in SIP-15, the purpose is to reduce the likelihood of cascading liquidations leading to a destabilization of the stability mechanisms.

Abstract

  1. Allow the protocol to mint sUSD to liquidate delinquent accounts internally to the protocol.
  2. Add a function to instantly liquidate a delinquent account if it falls below specified c-ratio configurable via SCCP (150% initially)
  3. Add a function to liquidate accounts that fall and remain below a specified c-ratio for more than n days configurable via SCCP (3 initially)
  4. Add a function to self liquidate at any time below the target c-ratio
  5. All three liquidation functions will have a liquidation penalty applied, configurable via SCCP (20%, 10% and 3% initially)
  6. A liquidation pool will be created where liquidated SNX will be sent and distributed based on the instantaneous debt distribution at the time of the liquidation, using the debt register entry as the basis for the claims.
  7. SNX claimed from the liquidation pool will be added to the escrow balance of the claimer and locked for 12 months as per other claims.

Motivation

As we have seen with the liquidations on 10-11th of June 2021, there is a possibility for cascading liquidations to have substantial market impact, this happens when new accounts get flagged for liquidation resulting in fear amongst the token holders who take action by selling, this depression in price then causes more accounts to be flagged for liquidation and the cycle continues. This could result in a catastrophic failure of the system leading to large losses by synth holders.

Moreover, users are not effectively incentivized to restore their c-ratio in some cases, as they essentially hold a free put option, which could be very valuable in times of market stress.

Accounts with very large stakes may also believe that they are unable to sell their SNX without incurring more than 10% slippage, which may make walking away and eating the liquidation preferable. Fear from this liquidation of large accounts could also lead to substantial adverse market impact in the anticipation of the liquidation event.

The goal of this SIP is:

  1. To more heavily incentivize stakers to act in the best interests of the system during times of stress.
  2. To lower uncertainty about bad debt for synth holders and make it clear that SNX holders are the ultimate backstop for the system.
  3. To remove forced liquidations at inopportune times and encourage insolvent stakers to explore other options such as self-liquidating in order to avoid costly penalties.

This redesigned liquidation mechanism creates much better incentive alignment within the system by providing options for stakers to repair their c-ratio with a minimal penalty if they are unable or unwilling to buy Synths on market to restore their ratio. It also ensures that in extreme scenarios liquidations happen instantly without creating a negative feedback loop on the price of SNX. It relaxes the current liquidation mechanism and relies more on self-liquidation and the backstop of instant liquidation for protecting system solvency. Fundamentally it creates several layers of penalties that transfers ownership of the protocol from inefficient stakers to more efficient stakers, this combined with the existing incentives to repair ratios should result in a more responsive and stable network collaterisation ratio.

Specification

Overview

A new contract will be deployed that will receive SNX liquidated using any of the three new liquidation functions. This SNX will be assigned to stakers based on their instantaneous debt percentage at the time of the liquidation using the debt register entry. The protocol will mint new sUSD to liquidate positions and pay-off the debt of the delinquent account with a fixed liquidation reward denominated in SNX, paid to keepers who perform functions within the liquidation suite.

Rationale

TBD

Technical Specification

The upgraded Liquidation contract would replace the existing Liquidations contract to implement the new functions that allow SNX to be liquidated with sUSD minted against the debt pool.

In order to fairly distirbute the SNX liquidated, the liquidated SNX will be distributed to a new rewards contract that tracks the debt percentage of each staker. This will use a new debt shares mechanism to track the % of debt each staker represents at the time the SNX is liquidated. The debt shares mechanism is explained in detail in SIP to be added.

Each minting, burning and claim action will update the debt shares of each staker and allow stakers to claim the SNX liquidated based on their effective % of the debt pool. The staking rewards contract will be updated to support tracking the debt shares of each staker, allowing them to claim the liquidated SNX at anytime.

Repaying the

  1. The issuer contract will calculate the amount of SNX that is liquidated + penalty based on the liquidation type and the sUSD debt to burn from the liquidated staker.
  2. The amount of SNX liquidated from the staker is used to repay their debt balance in sUSD.
  3. The debt shares of the liquidated staker is updated (during the debt burn action) within the liquidation transaction before the liquidated SNX is rewarded to the liquidated SNX contract.
  4. Liquidated staker will recieve less of the liquidated SNX as their debt % is lower after the burning of the debt.
  5. The effective debt % of other stakers would increase after the liquidated staker's debt is burned.
  6. The SNX claimed will be escrowed for 12 months on the escrow contract.

Liquidation Reward Contract

  • An updated version of the current Staking Rewards contract that will remove the time based component of the staking rewards.

  • When staker's mint and burn sUSD, the amount of debt shares they have will be updated in the liquidation rewards contract.

  • The debt shares mechanism will be used in the liquidation reward contract to distribute the liquidated SNX.

  • Claiming liquidated SNX will create a vesting entry for 12 months on the escrow contract.

Liquidation Contract Interface

pragma solidity >=0.4.24;

interface ILiquidations {
    // Views
    function liquidationOpen(address account) external view returns (bool);

    function instantLiquidationOpen(address account) external view returns (bool);

    // Mutative Functions
    function flagAccountForLiquidation(address account) external;

    // Restricted: used internally to Synthetix contracts
    function removeAccountInLiquidation(address account) external;

    function checkAndRemoveAccountInLiquidation(address account) external;
}

Issuer Contract Interface

interface IIssuer { // Restricted: used internally to Synthetix contracts

// Liquidate account if c-ratio below 300%
function liquidateDelinquentAccount(address account, address liquidator) external;

// Liquidate account if c-ratio below 150%
function instantLiquidation(address account, address liquidator) external;

// Self liquidate account back to target c-ratio
function selfLiquidation(address account, address liquidator) external;

}

SystemSettings Contract Interface

SystemSettings contract is used to keep the liquidation related parameters

interface ISystemSettings { // Views function liquidationPenalty() external view returns (uint);

function selfLiquidationPenalty() external view returns (uint);

function instantLiquidationPenalty() external view returns (uint);

function flagReward() external view returns (uint);

function liquidationReward(uint reward) external;

// owner only
function setLiquidationDelay(uint time) external;

function setLiquidationRatio(uint liquidationRatio) external;

function setInstantLiquidationRatio(uint liquidationRatio) external;

function setLiquidationPenalty(uint penalty) external;

function setInstantLiquidationPenalty(uint penalty) external;

function setSelfLiquidationPenalty(uint penalty) external;

function setFlagReward(uint reward) external;

function setLiquidationReward(uint reward) external;

}



### Test Cases

TBD

### Configurable Values (Via SCCP)

<!--Please list all values configurable via SCCP under this implementation.-->

- inactiveLiquidate threshold delay: 3 days
- inactiveLiquidate threshold: 300%
- inactiveLiquidate penalty: 10%
- instantLiquidate threshold delay: 0 days
- instantLiquidate threshold: 150%
- instantLiquidate penalty: 20%
- selfLiquidate threshold: target ratio
- selfLiquidate penalty: 3%
- flagReward: 1 SNX
- liquidateReward: 2 SNX

##Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).