ParaSpace
Search
⌃K

# Liquidation Threshold Calibration of LP Tokens

To further optimize the parameter configuration per each LP position’s individual risk profile, the liquidation threshold can be calibrated for each LP position. This is the next development to upgrade the currently simplistic design of determination of the LP token’s liquidation threshold.
Again, let’s discuss this section in the arch of the following scenario: ETH is at $1000. The user provides liquidity of 1 ETH and 1596.12 USDT within the$500-1500 price range. Furthermore, the liquidation threshold of ETH is 80%.
1. 1.
First, we calculate the liquidation risk margin implied by the ETH liquidation threshold. The liquidation risk margin denotes the margin that covers the potential loss in the case that actual liquidation proceeds are not enough to cover the loan. Therefore, the liquidation risk margin is calculated as:
$LRM=\frac{100\%-liq\_thld}{liq\_thld}$
where
$liq\_thld$
denotes the liquidation threshold. Therefore, we calculate the liquidation risk margin of ETH as:
\begin{aligned} LRM_{ETH}&=\frac{100\%-80\%}{80\%} \\ &=25\% \end{aligned}
This means, that when liquidation is triggered for a loan collateralized by ETH, as long as the liquidation proceeds do not fall 25% below the ETH price when liquidation is triggered, the liquidation proceeds will be enough to cover the loan and the platform stays solvent.
Note here the numeraire is changed to the price of ETH when liquidation is triggered, which is consistent with the measure under which the health factor is calculated at the time liquidation is triggered.
2. 2.
Second, we calibrate the water level ETH price (
$P_w$
). The water level ETH price is defined as the ETH price such that the LP position value equals to that of the loan.
$V_{LP}(P_w)-V_{loan}=0$
$V_{LP}=X(P_w)*P_w+Y(P_w)$
where
$X(P_w)$
and
$Y(P_w)$
denote the numbers of
$X$
and
$Y$
tokens redeemable from the LP position when the underlying X asset price is
$P_w$
. Note in this context, Y token is the stablecoin (i.e. USDT, USDC or DAI). And as defined in Uniswap V3 LP Token Analyzer,
$X(P_w)$
and
$Y(P_w)$
can be rearranged as below:
$\begin{cases} Y(P_w)=\max\left(0,L*\left(\sqrt{\min(P_w,P_b)}-\sqrt{P_a}\right)\right) \\ X(P_w)=\max\left(0,L*\left(\frac{1}{\sqrt{\max(P_w,P_a)}}-\frac{1}{\sqrt{P_b}}\right)\right) \end{cases}$
where
$L$
denotes the liquidity of the LP position, and
$P_a$
and
$P_b$
denote the lower and upper bound of the liquidity provision price range respectively.
3. 3.
Third, we imply the liquidation price of ETH (
$P_{liq}$
) such that when the LP position is liquidated when ETH touches such price, the implied liquidation risk margin is the same as that of ETH:
\begin{aligned} {P_{liq}}&={P_w}*\left(1+LRM_{ETH}\right)\\ \end{aligned}
Note there is a sanity check that loans should only be allowed if
$P_{liq} \le P_b$
. As the LP position has a constant value when ETH price is above
$P_b$
, liquidating the LP position at
$P_{ETH}=P_{liq}>P_b$
is equivalent to doing so at
$P_{ETH}=P_{b}$
. Therefore, the actual liquidation risk margin is lower than that of ETH and thus insufficient.
4. 4.
Finally, we calculated the liquidation price of the LP position when ETH hits such liquidation price, and calculate the liquidation threshold (in percentage) of the LP position as:
$liq\_thld_{LP}=\frac{V(P_w)}{V(P_{liq})}$
Note the liquidation threshold is a useful metric to analyze the risk of the loan. However, the health factor calculation, which dictates the triggering of liquidation, should be based on the ratio between ETH price and liquidation price
$P_{liq}$
rather than basing the health factor calculation on the value of the LP itself. When the ETH price moves, depending on the
$L$
,
$P_a$
and
$P_b$
of the LP position and ETH spot price, the LP position’s value could stay constant until ETH price drops below a critical level. Therefore, the conventional calculation of health factor may not appropriately reflect the health of a loan when collateralized by the LP token while its underlying ETH price is changing which lead to deterioration of the loan health. The health factor will be calculated as:
$health\_factor=\frac{P_{ETH}}{P_{liq}}$