Maintenance Margin (CVA) Calculations
Provided by Rasa Capital
CVA and maxLeverage Formulas:
maxLeverage is (expect for 3 coins) is in the 20-60 range
Example:
Consider a scenario where User A desires to engage in a trade with a leverage of buying a 10,000 USDT 60x BTC Long (the maximum leverage for BTC is set at 60x).
User A navigates to the SYMMIO
frontend
.Upon arrival, User A expresses an intent:
Tade Size: 10,000 USDT
Leverage: 60x,
Notional value: 600,000 USDT.
Price: $34,676.1 per BTC,
Size: 17.31 BTC.
The frontend then responds with the Solvers required Maintenance Margin of:
CVA: 6499.84 USDT

The CVA (Credit Value Adjustment) for this trade is calculated as:
Should the unrealized profit and loss (uPnL) on his BTC position reach -$4000, User A will automatically be moved into the Liquidation Process by Liquidators. This example illustrates the interplay of leverage, CVA, and the liquidation threshold within the Rasa - Demo Solver environment facilitated through the SYMMIO frontend.
Integration with API endpoints
Solver endpoints provide real-time parameters for collateral requirements via a REST API. See Rasa's endpoints here.
Endpoint Structure
GET /get_locked_params/{symbol}?leverage={leverage}
Example:
https://base-hedger82.rasa.capital/get_locked_params/BTCUSDT?leverage=60
The endpoint returns the following response:
{
"cva": "40", // CVA (% of deposit)
"lf": "20", // Liquidation Fee (% of deposit)
"leverage": "60.0", // Allowed leverage
"partyAmm": "40", // Party A’s initial margin (% of deposit)
"partyBmm": "0" // Party B’s initial margin (0 for single-sided)
}
2. Deriving cn
(CVA/Notional Ratio)
cn
(CVA/Notional Ratio)cn
represents the total Maintenance Margin (CVA + LF) as a percentage of the notional value. The cn is ultimately defined by the solver. This should reflect the risk of the asset.
Formula
Example Calculation
Using the API response for BTCUSDT:
{
"cva": "40", // CVA (% of deposit)
"lf": "20", // Liquidation Fee (% of deposit)
"leverage": "60.0", // Allowed leverage
"partyAmm": "40", // Party A’s initial margin (% of deposit)
"partyBmm": "0" // Party B’s initial margin (0 for single-sided)
}
cva = 40%
,lf = 20%
,leverage = 60x
Deposit = 100 USDT (for illustration).
3. Calculating Maintenance Margin
The Maintenance Margin can derived from cn
and the notional value.
Formula
Example
Notional = Deposit × Leverage = 100USDT × 60 = 6,000 USDT
cn
= 1% (from above).
4. Calculating Max Leverage
The maximum allowed leverage (maxLeverage
) is determined by the CVA/Deposit cap (cd ≤ 60%
) and cn
.
Formula
Example
For BTCUSDT with cn = 1%
:
Example Scenarios:
Asset Type
cn
Max Leverage
BTC/ETH
1%
( 0.6 / 0.01 = 60x )
Blue-Chip Alts
1.5%
( 0.6 / 0.015 = 40x )
Exotic Coins
4%
( 0.6 / 0.04 = 15x )
The contract-symbols endpoint should return this maxLeverage as a parameter in the endpoint.
Example for Rasa BTCUSDT:
{
"price_precision": 1,
"quantity_precision": 3,
"name": "BTCUSDT",
"symbol": "BTC",
"asset": "USDT",
"symbol_id": 1,
"is_valid": true,
"min_acceptable_quote_value": 120,
"min_acceptable_portion_lf": "0.003000000000000000",
"trading_fee": "0.000600000000000000",
"max_leverage": 60,
"max_notional_value": 2100000,
"rfq_allowed": true,
"hedger_fee_open": "0.0006",
"hedger_fee_close": "0.0006",
"max_funding_rate": "200",
"min_notional_value": "100",
"max_quantity": "1000",
"lot_size": "0"
},
Last updated