Liquidation

Liquidations are set in place to protect the supplier's capital which should not be exposed to direct market risk that traders & farmers take. As a leverage user, you can avoid liquidations. This can also save you from incurring additional fees to the liquidators and the protocol.

NillaConnect has its own independent liquidators that will eliminate unhealthy positions for a percentage of liquidation fees.

Health Factor

The health factor is a quantitative representation of your N-Account's health calculated individually for each N-Account. The higher the number is, the healthier your account is, the safer you are from liquidation.

The health factor (HF) of an account is defined as:

HF(t)=TWV(t)b(t)+i(t)HF(t)=\frac{TWV(t)}{b(t)+i(t)}

Where:

TWV(t)TWV(t) = the Threshold Weighted Value of a position at time = tt

b(t)b(t) = the amount borrowed at time = tt

i(t)i(t) = the interest accrued in a position at time = tt

If HF(t)<1HF(t) < 1, then the position can be liquidated If HF(t)>1HF(t) > 1, then the position is healthy.

Total Value

The total value is the current balance of assets in an N-Account.

TV(t)=[ci(t)pi(t)]TV(t)=\sum[c_i(t)*p_i(t)]

Where:

ci(t)c_i(t)= the balance of assets in the N-Account at time = tt

pi(t)p_i(t)= the price of assets in the N-Account at time = tt

Threshold Weighted Value

This is the current balance of assets in an N-Account considering the liquidation threshold.

TWV(t)=[ci(t)pi(t)LTi]TWV(t)=\sum[c_i(t)*p_i(t)*LT_i]

Where:

ci(t)c_i(t)= the balance of assets in the N-Account at time = tt

pi(t)p_i(t)= the price of assets in the N-Account at time = tt

LTiLT_i= Liquidation Threshold, a constant representing the maximum allowable ratio of Loan-To-Value for the i-th asset.

Keeping your HF high enough should generally be fine for your position, unless there is a major market movement which severely affects the price, so make sure to take that into consideration too.

Keeping HF above 1

  1. Add more collateral - simply deposit more collateral to increase the SupplySupply variable

  2. Decrease debt - Simply reduce the portion of borrowed funds aka. repay a portion of debt to reduce the TotalBorrowTotalBorrow variable

  3. Adjust your strategy - if you are in a strategy that involves a volatile asset (which generally has a lower LT) and your HF is decreasing substantially, you might want to adjust to more stable assets (which generally has higher LT) to retain your HF above 1

These 3 methods directly relate to the HF formula, and you can adjust it in whichever way you like.

Last updated