vires.finance
  • Introduction
  • FAQ
    • Depositing and Earning
    • Borrowing
    • Account Health
    • Asset Parameters
    • vTokens
    • Deployed Contracts
    • ⓥ Governance
      • FAQ and User Guide
      • gVires Math
      • System parameters
  • KNOWLEDGEBASE
    • APY vs APR
    • How is Net APY calculated?
    • Liquidation Penalty
  • GUIDES
    • Lending and Borrowing Guide
    • Liquidators' Guide
    • Troubleshooting
    • API
  • Community Video Guides
  • Agreement
    • Terms of Use
    • Privacy policy
Powered by GitBook
On this page
  • What is Account health?
  • Special case: Supply and Borrow in the same asset
  • Why has my Account health changed?
  • What is liquidation?

Was this helpful?

  1. FAQ

Account Health

Avoiding liquidation risk

PreviousBorrowingNextAsset Parameters

Last updated 3 years ago

Was this helpful?

What is Account health?

In essence, Account health is a proportion between your Borrow Limit(Borrow Capacity) and your Borrow Capacity Used.

BCu=∑(CFa∗C(u,a)∗Deposit(u,a)∗Pricea)BC_{u} = \sum(CF_a * C_{(u, a)} *Deposit_{(u,a)} * Price_a)BCu​=∑(CFa​∗C(u,a)​∗Deposit(u,a)​∗Pricea​)

where, for user u and asset a:

  • CF is asset's Collateral Factor

  • C is 1 for assets used as collateral, otherwise 0

  • Deposit is amount of asset deposited

  • Price is the equivalent asset's price in U.S. Dollars

BCUu=∑((Borrow(u,a)∗Pricea)/LTa)\\ BCU_{u} = \sum((Borrow_{(u,a)} * Price_a) / LT_a)BCUu​=∑((Borrow(u,a)​∗Pricea​)/LTa​)

where

  • Borrow is amount of asset borrowed

  • LT is Liquidation Threshold for the asset a.

Altogether,

Special case: Supply and Borrow in the same asset

It's a completely healthy situation to borrow the same asset as the collateral: Depositing amount D and borrowing amount B should effectively be seen as Deposit D-B, but only until Borrow starts exceeding Deposit. In this moment, a healthy account can become burned-out(with total negative saldo) and there's nothing liquidators can do about it.

To prevent that, an overlap_factor is introduced to smoothen the account health formula while still be tolerable with the same deposit-borrow asset:

If

Then

Otherwise

Given

Liquidators can liquidate part of your debt when your Account Health goes below 0.

Why has my Account health changed?

Even if you don't interact with the protocol, your account health is subject to change:

  • Your Deposit increased or decreased its value

  • Your Borrows increased or decreased its value

  • Interest on your deposits/borrows has been accounted.

  • Your debt has been liquidated in order to increase your account health

What is liquidation?

Liquidators can liquidate part of your debt when your Account Health goes below 0%. This means, when your Account Health goes below 0%, a liquidator can step in and take up to 50% of your debt for one asset and the corresponding amount of your deposit + premium. The related parameters(Liquidation Threshold and Liquidation Penalty) are listed in "Asset Parameters" section.

AccountHealthu=1−BCUu/BCuAccountHealth_u = 1 - BCU_u/BC_uAccountHealthu​=1−BCUu​/BCu​
Borrow(u,a)>C(u,a)∗Deposit(u,a) Borrow_{(u, a)} > C_{(u,a)} *Deposit_{(u,a)}Borrow(u,a)​>C(u,a)​∗Deposit(u,a)​
BCu,a=0BCU(u,a)=((Borrow(u,a)−C(u,a)∗Deposit(u,a))LTa+OverlapCharge(u,a))∗PriceaBC_{u,a} =0 \\ BCU_{(u,a)} =( \frac{(Borrow_{(u, a)} - C_{(u,a)} *Deposit_{(u,a)})}{ LT_a} + OverlapCharge_{(u,a)}) * Price_aBCu,a​=0BCU(u,a)​=(LTa​(Borrow(u,a)​−C(u,a)​∗Deposit(u,a)​)​+OverlapCharge(u,a)​)∗Pricea​
BCu,a=CFa∗(Deposit(u,a)−Borrow(u,a))∗PriceaBCU(u,a)=OverlapCharge(u,a)∗Pricea BC_{u,a} = CF_a *(Deposit_{(u,a)}- Borrow_{(u,a)}) * Price_a \\ BCU_{(u,a)} = OverlapCharge_{(u,a)} * Price_aBCu,a​=CFa​∗(Deposit(u,a)​−Borrow(u,a)​)∗Pricea​BCU(u,a)​=OverlapCharge(u,a)​∗Pricea​
OverlapCharge(u,a)=min(Borrow(u,a),C(u,a)∗Deposit(u,a))∗overlap_factorOverlapCharge_{(u,a)} = min(Borrow_{(u, a)} , C_{(u,a)} * Deposit_{(u,a)}) * overlap\_factorOverlapCharge(u,a)​=min(Borrow(u,a)​,C(u,a)​∗Deposit(u,a)​)∗overlap_factor