How does the protocol ensure over-collaterization while allowing users leveraged operations?
When trading with Gearbox, your Credit Account becomes the collateral: both your initial funds and the borrowed amount you got from the protocol. Gearbox Protocol sees which tokens your portfolio consists of and can determine its value at all times, which are always calculated in the underlying borrowed asset which you opened that Credit Account in.
Gearbox uses a risk model to continuously assess the quality-value of a Credit Account. For each Credit Account, it computes its health factor.
Anyone can check the health factor and liquidate positions with a health factor less than 1.
As a user with a leverage position, you need to watch out for your health factor. Having it just above 1 puts you in risk of getting liquidated. Learn how to avoid liquidations.
Health Factor is a numeric representation of your account health. If your health factor drops below 1 or close to it, you might be liquidated. The higher the number is, the safer you are. There are some tips on how you can avoid liquidations, check them here.
where b(t) is borrowed amount.
Let's dive into some math formulas to clarify how computation of the health factor works.
Represents the Credit Account's balance in the underlying asset.
where c_i - balance of i-th asset in credit account, p_i - price of i-th asset calculated in underlying asset(from ChainLink oracle).
Threshold Weighted Value
c_i - balance of i-th asset in credit account,
p_i - price of i-th asset calculated in underlying asset(from ChainLink oracle),
LT_i - liquidation threshold, the credit account manager constant showing the maximum allowable ratio of Loan-To-Value for the i-th asset.
Liquidation thresholds represents maximum allowable ratio of Loan-To-Value for the i-th asset (LTV is reciprocal of over-collaterization ratio of i-th asset). LT_i for underlying asset is constant and equals:
How is Liquidation Threshold defined?
Gearbox Protocol uses statistics of 5-min, 15-min, 1h change of i-th asset's price (price is in the underlying asset) for the last 180 days.
Anybody can run a liquidator bot and secure the protocol. You can chat about setting up your bot and other liquidator-things in this Discord channel. Help users minimize the risks!