ATLAS Math: Risk Based Valuation
General
The risk based portfolio valuation provides a conservative estimate of portfolio value under adverse conditions.
Market participants must maintain a positive risk based valuation at all times.
If the valuation becomes negative, the account is subject to liquidation.
The exchange operator defines two risk parameters per token:
Risk Price
Risk Slippage
Adjusted Token Balance
For each token, define the adjusted balance:
where:
tokenBalance= user’s holdings of the tokenborrowedQuantityWithInterest= borrowed amount plus 10 days of interestlendQuantity= total amount lent to others
📌 For efficiency, lending values are aggregated as the sum of all borrowed positions with the maximum 10-day interest rate.
Margin & Portfolio Valuation
The risk-based valuation of the portfolio is:
Token Value
For each non-base token:
where:
Adjusted Token Prices
The adjusted token prices are computed as:
Adjusted Perp Values
For perpetual positions, we compute high and low valuations:
Perpetual Position Valuation
The perp value at a given price is:
SDKs & Optimization
ATLAS Math: Risk Based Valuation have the above formulas built in, so you can test and simulate margin requirements for different position sets.
Last updated
Was this helpful?

