Margin
Pod uses cross margin. There is a single collateral asset, USD, shared between perpetual and spot markets, so there is no need to transfer between the two.
Account state
Each account is summarized by a handful of quantities.
Start with cash - the part of the account not tied to any position's PnL. It accumulates bridge deposits, incoming transfers and incoming funding, and decreases on withdrawals, outgoing transfers and outgoing funding:
cash = deposits − withdrawals + transfers_in − transfers_out + funding_payments(See Per-position payment for how funding settles.)
Equity is the account's mark-to-market value: cash plus the PnL on every open position, where each position's PnL is (mark_price − entry_price) × position.size:
equity = cash + sum pnl over open positionsA position's notional is its mark-to-market size, and the account's effective leverage is total notional divided by equity:
notional = sum over open positions: |position.size| × mark_price
effective_leverage = notional / equityMargin requirements
Every open position contributes to two margin levels for the account: initial margin, required to open or increase a position, and maintenance margin, required to keep it open. Each contributes a fraction of its notional:
locked_margin = sum over open positions: |position.size| × mark_price × initial_margin_ratio
liquidation_margin = sum over open positions: |position.size| × mark_price × maintenance_margin_ratioinitial_margin_ratio and maintenance_margin_ratio are per-market parameters, with the maintenance ratio strictly smaller.
The headroom between equity and locked_margin is the available margin - new positions can be opened, or existing ones increased, only while it is non-negative:
A withdrawal or transfer must leave a transfer margin behind: the larger of the initial margin and a fixed fraction of the open notional, transfer_margin_ratio (a network parameter, 10% by default). Equity counts unrealized PnL, so it is withdrawable too; the withdrawal can take cash negative.
Without open positions both terms are zero, so the whole non-negative equity is withdrawable.
That is the ceiling the account imposes, and it bounds transfers to other accounts as well as withdrawals. What actually leaves the network is further bounded by the bridge: a withdrawal is claimed on another chain, so its amount must be a whole number of that chain's token units and must fall inside the token's [min, max]. See the Bridge precompile reference for the exact rules.
When equity < liquidation_margin, positions become eligible for liquidation.
Liquidation
Liquidations are submitted as market orders into the order book. They contribute to liquidity and are matched like normal orders.
If the account's equity falls below 2/3rd of
liquidation_margin, the entire portfolio is transferred to the backstop vault.If equity goes negative, auto-deleveraging (ADL) is triggered.
Auto-Deleveraging (ADL)
When an account's equity is negative, ADL closes positions on the profitable side of the market to cancel out the negative equity:
Positions on the opposite side are sorted by leverage (highest first).
These positions are closed at the last batch price until all negative equity is offset.
The underwater position itself is also closed.
Last updated

