RAI Liquidations: What They Mean for Safe Owners

Liquidation Overview

Liquidations are required in the RAI system to a ensure sufficient collateralization of the system. If a safe’s collateral(ether) to debt(RAI) ratio goes under a certain threshold, the safe will be liquidated.

During a liquidation, the safe’s collateral and debt are seized and the collateral is sold to raise the required debt. The liquidation will raise extra debt on top of the safe’s existing debt as a penalty to the safe owner for liquidation. The debt is raised by selling the safe’s collateral at a discount price in exchange for RAI. If there are no immediate bidders, the system will increase the discount to make the sale more attractive to buyers.

The liquidation process incurs a loss for the safe owner due to

  1. the extra debt that is raised
  2. the collateral being sold at a discount

Depending on the safe’s collateral/debt ratio at liquidation, the safe may or may not receive a small amount of leftover collateral after liquidation. The safe owner keeps the orignal debt generated by the safe.

Liquidation Parameters

These are parameter relevant to liquidation for the mainnet RAI system.

Parameter Description Value
liquidationRatio Smallest amount of collateral/debt ratio allowed by the system before a safe is liquidated. RAI debt is valued at the redemption price(USD) and collateral is the value of ether locked(USD) 1.35
liquidationPenalty The amount of extra RAI that is raised when a safe is liquidated 10%
collateralDiscount The discount offered to liquidators as an incentive to liquidate the safe 8-10%
liquidationQuantity The maximum amount of RAI per auction. 90,000 RAI
minDiscount The minimum discount collateral is sold for 8%
maxDiscount The maximum discount collateral is sold for 10%
maxDiscountUpdateRateTimeline The time it takes for the discount to go from minDiscount to maxDiscount 2700 secs

Detailed Steps of a Liquidation

1) The conditions of liquidation are met for a safe.

When the following condition is met, a safe can be liquidated:

Where debt value and collateral value are denominated in USD.

The above inequality can be caused by:

a) a decrease in collateral value

A decrease in the ETH/USD price is the most common catalyst for safe liquidation. The ETH/USD price enters the system w/ a one-hour delay through the OSM.

b) an increase in debt value

An increase in debt value can occur due to interest charged to the safe(the borrow fee) and/or an increasing redemption price. Since both of the these factors typically alter the debt value very slowly, increasing debt value inside the system will rarely cause liquidations.

2) The safe is liquidated and an auction is started

A collateral auction keeper bot calls liquidateSAFE() on the LiquidationEngine for the underwater safe.

If a safe has more debt than liquidationQuantity/liquidationPenalty, then liquidateSAFE() can be called multiple times for a single safe, starting multiple auctions. Each auction will have an amount of collateral for sale proportionate to the amount of RAI to raise.

Liquidation Engine then calls confiscateSAFECollateralAndDebt() on the SAFE Engine.
This transfers the safe’s collateral to the Liquidation Engine in preparation for auction and transfers the debt of the safe to the Accounting Engine.

Finally, Liquidation Engine calls startAuction() on the Increasing Discount Collateral Auction House. The starting discount price for collateral sold in the auction is 8%.

3) Collateral is sold

A collateral auction keeper bot calls buyCollateral() on the Increasing Discount Collateral Auction House. The keeper pays RAI in exchange for discounted ether.

The collateral discount is calculated using the Chainlink spot ETH/USD price, not the OSM price that initiated the safe liquidation. This is to ensure the latest price is used in order to improve profitability of the auction and stability of the system

The discount price of the collateral increases from 8% to 10% over a period 2700 seconds.

After 2700 seconds, the discount remains at 10%.

Collateral can be bought from an auction until:

  1. The target amount of RAI has been raised
    or
  2. All collateral has been sold.

Finall, any leftover collateral is transferred back to the liquidated safe, where it can be claimed in the Reflexer UI.

Liquidation Examples

Liquidation Example #1: Minimum Discount

Starting Parameters:

safe locked collateral = 10.0 ether
safe generated debt = 6000 RAI
Redemption Price = 3.0
ETH/USD = $2600
safe C-ratio = 10.0 * $2600/6000 * 3.0 = 144%

Sequence of events:

  1. The system is updated with a new, 1-hour delayed ETH/USD price of $2400

    The safe’s new c-ratio is now 10.0 * $2400/6000 * 3.0 = 133.3%

    Since 133% is less than the system liquidation ratio of 135%, the safe is “underwater” and eligible to be liquidated by a collateral auction keeper.

  2. The safe is liquidated and an auction is started at Chainlink spot ETH/USD price of $2390

    The safe’s debt and collateral are confiscated by the SAFE Engine and an auction is started on the IncreasingDiscountCollateralAuctionHouse.

    Auction Parameters:

    Parameter Value Notes
    amountToRaise 6000*1.10=6600 RAI amountToRaise=debt*liquidationPenalty
    amountToSell 10.0 ether safe collateral
    currentDiscount 8% minDiscount price = (1- 0.08) * $2390 =$2198.8
    maxDiscount 10% maxDiscount price - (1 - 0.10) * $2390 = $2151
  3. A collateral keeper buys collateral at a discount

    No time passes between safe liquidation and collateral purchase, so the collateral discount price used will be calculated from the minDiscount of 8%

    Collateral bought = value of amountToRaise/ discounted price of collateral
    = 6600 * 3.0 / $2198.8
    ~= 9.005 ether

    Leftover collateral = starting collatral - bought collateral
    = 10.0 - 9.005 = 0.995 ether.

Liquidation Example #2: Increasing Discount

Starting Parameters:

safe locked collateral = 10.0 ether
safe generated debt = 6000 RAI
Redemption Price = 3.0
ETH/USD = $2600
safe C-ratio = 10.0 * $2600/6000 * 3.0 = 144%

Sequence of events:

  1. The system is updated with a new, 1-hour delayed ETH/USD price of $2400

    The safe’s new c-ratio is now 10.0 * $2400/6000 * 3.0 = 133.3%

    Since 133% is less than the system liquidation ratio of 135%, the safe is “underwater” and eligible to be liquidated by a collateral auction keeper.

  2. The safe is liquidated and an auction is started at Chainlink spot ETH/USD price of $2390

    The safe’s debt and collateral are confiscated by the SAFE Engine and an auction is started on the IncreasingDiscountCollateralAuctionHouse.

    Auction Parameters:

    Parameter Value Notes
    amountToRaise 6000*1.10=6600 RAI amountToRaise=debt*liquidationPenalty
    amountToSell 10.0 ether safe collateral
    currentDiscount 8% minDiscount price = (1- 0.08) * $2390 =$2198.8
    maxDiscount 10% maxDiscount price - (1 - 0.10) * $2390 = $2151
  3. A collateral keeper buys collateral at a discount

    >45 minutes passes between safe liquidation and buying of collateral. The collateral discount price used will then be calculated from the maxDiscount of 10%.

    Collateral bought = value of amountToRaise/ discounted price of collateral
    = 6600 * 3.0 / $2151
    ~= 9.21 ether

    Leftover collateral = starting collateral - bought collateral = 10.0 - 9.21 = 0.79 ether.

Liquidation Example #3: No Leftover Collateral

Starting Parameters:

safe locked collateral = 10.0 ether
safe generated debt = 6000 RAI
Redemption Price = 3.0
ETH/USD = $2600
safe C-ratio = 10.0 * $2600/6000 * 3.0 = 144%

Sequence of events:

  1. The system is updated with a new, 1-hour delayed ETH/USD price of $2100

    The safe’s new c-ratio is now 10.0 * $2400/6000 * 3.0 = 133.3%

    Since 133% is less than the system liquidation ratio of 135%, the safe is “underwater” and eligible to be liquidated by a collateral auction keeper.

  2. The safe is liquidated and an auction is started at Chainlink spot ETH/USD price of $2100

    The safe’s debt and collateral are confiscated by the SAFE Engine and an auction is started on the IncreasingDiscountCollateralAuctionHouse.

    Auction Parameters:

    Parameter Value Notes
    amountToRaise 6000*1.10=6600 RAI amountToRaise=debt*liquidationPenalty
    amountToSell 10.0 ether safe collateral
    currentDiscount 8% minDiscount price = (1 - 0.08) * $2100 =$1932
    maxDiscount 10% maxDiscount price - (1 - 0.10) * $2100 = $1890
  3. A collateral keeper buys collateral at a discount

    No time passes between safe liquidation and collateral purchase, so the collateral discount price used will be calculated from the minDiscount of 8%

    Collateral bought = value of amountToRaise/ discounted price of collateral
    = 6600 * 3.0 / $1932
    ~= 10.25 ether

    Since the keeper can afford to purchase 10.25 ether, which is more than the amount for sale, only 10.0 ether is sold.

    Leftover collateral = starting collatral - bought collateral
    = 10.0 - 10.0 = 0 ether.

Visualizing Leftover Ether

Using the same starting safe parameters as above:

safe locked collateral = 10.0 ether
safe generated debt = 6000 RAI
Redemption Price = 3.0

Here are charts of how much ether will be leftover after liquidation for both 8% and 10% discounts.

2 Likes