Margining
Margin computations follow similar formulas to Hyperliquid. Currently, all markets are in isolated mode, which allows an asset's collateral to be constrained to that asset.
Leverage and Margin Requirements
Leverage can be set by a user to any integer between 1 and the max leverage. Max leverage depends on the asset. The margin required to open a position is:
position_size * mark_price / leverage
Isolated positions support adding and removing margin after opening the position.
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.
Unrealized PNL and Transfer Margin Requirements
Unrealized pnl can be withdrawn from isolated positions or cross account, but only if the remaining margin is at least 10% of the total notional position value of all open positions. The margin remaining must also meet the initial margin requirement:
transfer_margin_required = max(initial_margin_required, 0.1 * total_position_value)
Liquidations
Isolated positions are liquidated when the isolated margin 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.
For more details, see: Hyperliquid Trading Margining