Liquidation Rules

Hi all,

The following is the Liquidation Rules and Examples,

Your assets may be liquidated when the risk value of your account reaches 100.
The liquidator will repay your debt and charge fees equal to 108% of the debt repaid in jTokens.
The liquidator can pay back at most 50% of a user’s debt at a time, but the user’s assets can be liquidated multiple times until the risk value falls below 100.

Example:
The calculation process in this example is simplified for clarity.

Time A:
A user supplies $100 worth of SUN tokens with a collateral factor of 50% and $200 worth of USDC tokens with a collateral factor of 75% on JustLend DAO. Therefore, the user can borrow up to $200 worth of tokens (Borrow Limit = $100 × 50% + $200 × 75% = $200).

The user then borrows $90 worth of TRX tokens and $50 worth of JST tokens from JustLend DAO. At this point, the total value of tokens that this user has borrowed is $140 (Total Borrow = $90 + $50 = $140).

In this case, the user’s Risk Value = Total Borrow / Borrow Limit * 100 = $140 ÷ $200 × 100 = 70.

Time B:
While the value of SUN and USDC remains unchanged, the value of TRX and JST both has increased by 50%.

At this point, the risk value of the user’s account has changed. Risk Value = Total Borrow / Borrow Limit * 100 = ($90 x 150% + $50 x 150%) ÷ ($100 x 50% + $200 x 75%) × 100 = 105. As the value has exceeded 100, the user’s asset will therefore be liquidated.

The liquidator repays 50% of the user debt ($105 worth of TRX), and charges a fee equal to 108% of the debt repaid, or $113.4 in USDC.

After the liquidation, the assets supplied by the user are $86.6 worth of USDC tokens ($200 - $113.4 = $86.6) and $100 worth of SUN tokens.

The user’s remaining debt is $30 worth of TRX tokens ($90 x 150% - $105 = $30) and $75 worth of JST tokens ($50 x 150% = $75). At this point, the user’s Risk Value = ($30 + $75) ÷ ($100 x 50% + $86.6 x 75%) × 100 = 91.34.

As the risk value is now below 100, the user’s assets will not be further liquidated.

However, liquidation will occur if the risk value exceeds 100 again.