How to calculate risk value?

Hi all,

This is a example for calculating the risk value,

Risk Value = Total Borrow / Borrow Limit * 100

Where:

Total Borrow = Sum of all assets borrowed by the user

Borrow Limit = ∑(Asset supplied by the user * Collateral factor of the asset)

Example:

A user supplies $100 worth of SUN tokens with a collateral factor of 50% and $200 worth of USDC tokens with a collateral factor of 75% on JustLend DAO. In this case, Borrow Limit = $100 × 50% + $200 × 75% = $200.

The user also borrows $90 worth of TRX tokens and $50 worth of JST tokens from JustLend DAO. In this case, Total Borrow = $90 + $50 = $140.

Therefore, the user’s Risk Value = Total Borrow / Borrow Limit * 100 = $140 ÷ $200 × 100 = 70.