Developers
Mainnet AlphaContribute-2-Earn
  • Introduction
  • Permissible CDR
  • Automated Liquidity Provision
  • Slippage Control
  • Integrations
  • Proxy/Upgrade Structure
  • Mainnet Deployed Contracts
  • Frontend Tech Stack
  • πŸ’°Supply and Borrow
    • Introduction
    • Supply
    • Borrow
      • Use Cases
      • Isolated margin
      • Debt management
      • Health factor
  • 🀝Contribute
    • Hashstack Layer 3 Integration
    • Creating Proposals on Github
  • Additional Documentation
    • 🏰Document Hub
Powered by GitBook
On this page
  • dToken health:
  • User loan health:

Was this helpful?

Edit on GitHub
  1. Supply and Borrow
  2. Borrow

Health factor

We compare the total current debt of the token with underlying loans current value and collateral(s) to determine the health.

Hf=Ccv+LAcvLnetHf = \frac{C_{cv} + LA_{cv}}{L_{net}}Hf=Lnet​Ccv​+LAcv​​

where,

Hf=Hf = Hf= Health factor

Ccv=C_{cv} = Ccv​= Collateral current value in USD

LAcv=LA_{cv} = LAcv​= Loan account current value in USD

Lnet=L_{net} = Lnet​= Net liabilities (Original loan + interest) in USD

Note: For on-chain computations, we use USDT as base value to compute values.

Health is monitored at two levels:

  1. dToken level: Determines the total health of the protocol for this asset

  2. user loan level: Determines health of a user’s individual loan

dToken health:

Lnet=L_{net} = Lnet​= total value of the debt issued by the contract across the protocol

Ccv=Ξ£1nCicv,C_{cv} = \Sigma_{1}^{n} C_{icv},Ccv​=Ξ£1n​Cicv​, n is the total number of supported collaterals, CicvC_{icv} Cicv​ is the net value of the ith collateral locked.

LAcvLA_{cv} LAcv​ unspent loan amounts + Sum (spent loan amounts)

User loan health:

For the above loan discussed, the health factor can be computed as below:

  1. Before partial withdrawl

    • Ccv=C_{cv} =Ccv​= 1 ETH * 100 = 100

    • LAcv=LA_{cv} =LAcv​= 300 USDC = 300

    • Assuming an interest of 2 USDC accrued,

      300 + 2 USDC = 302

So, Health factor (Hf)=(Hf) =(Hf)= (100 + 300)/302 = 1.32


  1. Post spend

LAcvLA_{cv}LAcv​ = 3 ETH x $100 = $300

So, Health factor (Hf)=(Hf) =(Hf)= (100 + 300)/302 = 1.32

Health factor determines if a loan can be liquidated. Read Liquidations for more info.

PreviousDebt managementNextHashstack Layer 3 Integration

Last updated 1 year ago

Was this helpful?

πŸ’°