Liquidation

When does Liquidation happen

Liquidation happens when the Safety Buffer shown for your position falls to 0.

  • Debt Value is how many tokens you borrowed from lenders

  • Position Value is the total value of the farmed position (i.e. the value of your LP tokens, including your provided assets and the assets you borrowed)

  • Debt Ratio is the Debt Value divided by the Position Value -> DR=DV/PVDR = DV/PV


The maths behind the Safety Buffer

FormulaValueDesc.

Deposit value in $

100

You, the user, starts the farm with 100$ worth of assets

Leverage

3

3x leverage

Borrowed amount (debt) in $

Deposit * (Leverage - 1)

200

To create 3x leverage, 2x the amount you deposited has to be borrowed

Position size in $

Deposit * Leverage

300

Total position size after leverage is applied

Liquidation threshold

90%

(Explanation below)

Safety Buffer

Leverage / Position size - (1 - Liquidation threshold)

23%

Tells you how much (in %) your position can lose in value before you get liquidated

The liquidation threshold in the context of JewelSwap is a dynamic metric rather than a fixed percentage; it is adjusted per farm based on an assessment of each farm's unique risk profile and market volatility. While the threshold itself may vary, it is not an indicator that typical users should monitor.

For normal users, the more important figure is the 'Safety Buffer'. The safety buffer is the actual value indicating when a position gets liquidated. In the above scenario, the position would have to fall by 23% in value for it to get liquidated.

To clarify, the liquidation threshold is instrumental in determining the Safety Buffer—it is a behind-the-scenes calculation that informs JewelSwap when to preemptively close a position to ensure it is managed effectively, especially in unpredictable markets. This preemptive measure is designed to safeguard the position from reaching a state where it is "underwater," meaning the market value has fallen below the debt value, which could result in a more severe financial loss.


Why does my Position Value fluctuate?

All position values are calculated and displayed in one token. Therefore, you might see your position value go down on some days - this is normal. Here is an example:

Why does my position value fluctuate instead of going only up?

Example: JWLEGLD-EGLD

Assume: Position value on JewelSwap is displayed in EGLD

Position value is the same or even went down in the last days (displayed in JWLEGLD) Why, since you earn rewards?

Explanation: JewelSwap displays the market value of your position, displayed as (as we wrote in the assumption) EGLD. So you have a JWLEGLD-EGLD position. But JewelSwap simplifies the display into just displaying the worth of your position in EGLD. So it will ask Ashswap "hey, how much is my JWLEGLD worth in EGLD?" through the SDK.

If JWLEGLD lost value to EGLD (due to people selling JWLEGLD to EGLD) then your position value will stay the same, or even fall, despite the rewards you get every day.

But, if you were to withdraw your Farm and count the JWLEGLD + EGLD together that you now have, you would see your actual position value.

And while you get rewards every day, they cannot compensate market volatility, so your displayed Farm value may go down or stay the same at times, other times, it may even go up faster than it should. However, after a prolonged time period, you will see that you indeed received on average the APR that was displayed.

Same applies for all other Farms. If EGLD loses value against USDC, and your position value is displayed in USDC, the amount of USDC your position is worth will logically go down.

That's how AMMs and Impermanent Loss work. Price impact always means, that the Trader gets less out than he put in (even on stableswap exchanges) and the liquidity provider suddenly holds more of token A than token B, in fact, he gained more of Token A than he lost of Token B.

JewelSwap now additionally displays the amount of LP tokens your position is worth. This allows you to see the continuous growth of your investment, based on the autocompounded rewards, but of course ignores any Impermanent Loss.


Avoiding Liquidation

In the case of a liquidation, the position would be closed, and the debt repaid. When the tokens you are holding drop in value significantly, then you need to careful about potential liquidation.

  • Monitor your Safety Buffer. It tells you how close you are to potential liquidation. Once it reaches zero, you will be liquidated.

  • Farm less volatile assets. If you are farming stablecoins, liquidation is extremely unlikely. Farming less volatile high marketcap assets is also safer than farming altcoins. But usually, higher risk assets will have higher APYs.

Last updated