Margin
The margin engine ensures that users who place trades always have sufficient capital to open and maintain their intended positions.
Initial Margin: The amount required to open a position; calculated as a percentage of notional value based on the asset's risk profile.
Maintenance Margin: Minimum collateral required to keep a position open; if breached, liquidation is triggered
Initial margin requirements on Perpl are dynamic and may vary by market, depending on volatility and position size.
Liquidation Distance
Your liquidation distance is how far the price can move against you before your position is liquidated. It's set by two things: the leverage you choose (which determines your initial margin) and the market's maintenance margin.
For example, on a market with a 5% maintenance margin, opening at 5x means posting 20% initial margin. The position is liquidated once your equity falls to the 5% maintenance level — roughly a 16% adverse move:
(20% − 5%) ÷ (1 − 5%) ≈ 16%
Lower leverage widens this distance; higher leverage narrows it. Maintenance margin varies by market, so the exact figure for your position is shown live in the Adjust Leverage dialog. You can add collateral to an open position at any time to increase it.

Margin Mode
The difference between a cross and an isolated margin is:
Isolated Margin: Each position has its own margin
Cross Margin: All collateral in the account is shared across positions
Hybrid Margin: Manually manage margin between positions
To begin with, Perpl will be restricted to isolated margin.

Position Equations
Perpetual contracts can be implemented using the following representation of lot sizes, L:
{L : L > 0, L ∈ Z}
Position Notional Value, N:
N=P⋅L
P = The mark, entry, or realized price, depending on whether or not the value being calculated is unrealized, position, or realized notional value, respectively. L = The position lot size (the number of contracts of the position).
Position Margin Requirement, MR:
MR=N/MF
N = The position notional value. MF = The margin fraction (analogous to leverage).
Position Initial Margin Requirement, IMR:
IMR=N/IMF
N = The position notional value. IMF = Initial margin fraction (maximum leverage allowed to open a position).
Position Maintenance Margin Requirement, MMR:
MMR=N/MMF
N = The position notional value. MMF = Maintenance margin fraction (minimum collateralization permitted before a position can be liquidated).
Collateral Management
Increase Collateral
Traders can add margin to an existing position at any time to reduce the risk of liquidation. This increases the position's depositCNS without affecting the entry price or lot size.
Decrease Collateral (DCP)
Traders can remove excess margin from a position, subject to the following constraints:
120-second expiry: A DCP request must be executed within 120 seconds of submission. After this window, the request expires and must be resubmitted.
Margin tolerance check: The remaining collateral after the decrease must still satisfy the initial margin requirement for the position.
OI threshold: DCP is blocked when the perpetual's open interest exceeds the
dcpBorrowThreshHdthsthreshold (default 85% of capacity), as the market is under stress.
The 120-second expiry on DCP prevents stale withdrawal requests from being executed after market conditions have changed significantly.
Margining Criteria
The price used to determine the notional value in the invariants presented in this section is the most accurate price available. For example, the best price to use for the notional value of a new position is the price at which the position is entered (realized).
In some situations, for example, auto-deleveraging a position, a realization price is not available, and the failed position's bankruptcy price is used. In other situations, the mark or synthetic perpetual price may be used to calculate the position's fair market value (for the value of an existing position).
Collateralization for establishing or changing a position:
FMV>=IMR
FMV = Position fair market value. IMR = Position initial margin requirement.
Reduce-only exemption: Closing or decreasing a position does not require FMV >= IMR. This allows traders to close underwater positions that would otherwise be trapped.
Collateralization for liquidation:
0<FMV<=MMR
FMV = Position fair market value. MMR = Position Maintenance margin requirement.
Collateralization for Auto Deleverage (ADL):
FMV<=0
FMV = Position fair market value.
Last updated