Margining

Margin computations follow similar formulas to major centralized derivatives exchanges.

When opening a position, a margin mode is selected. Cross margin is the default, which allows for maximal capital efficiency by sharing collateral between all other cross margin positions. Isolated margin is also supported, which allows an asset's collateral to be constrained to that asset. Liquidations in that asset do not affect other isolated positions or cross positions. Similarly, cross liquidations or other isolated liquidations do not affect the original isolated position.

Cross positions are liquidated when the account value (including unrealized pnl) is less than the maintenance margin times the total open notional position. The maintenance margin is currently set to half of the initial margin at max leverage.

Isolated positions are liquidated by the same maintenance margin logic, but the only inputs to the computation are the isolated margin and the notional value of the isolated position.

Leverage can be set by a user to any integer between 1 and the max leverage. Max leverage depends on the asset. The leverage of an existing position can be increased without closing the position. Leverage is only checked upon opening a position. Afterwards, the user is responsible for monitoring the leverage usage to avoid liquidation. Possible actions to take on positions with negative unrealized pnl include partially or fully closing the position, adding margin (if isolated), and depositing USDC (if cross).

Isolated positions support adding and removing margin after opening the position.

Last updated