Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pacifica-fi/docs-migrate/llms.txt

Use this file to discover all available pages before exploring further.

Pacifica’s margin system is designed for capital efficiency: your USDC balance, unrealized perpetual PnL, and spot holdings are all recognised within a single unified account, reducing the need to lock up idle capital across separate pools. You can choose between cross margin and isolated margin on a per-market basis, and leverage can be configured up to 50x depending on the asset.

Margin Mode Comparison

FeatureCross MarginIsolated Margin
Collateral poolShared across all cross positionsDedicated per position
Spot collateral contributionYes (LTV-adjusted)No
Liquidation triggerAccount-level equityPosition-level assigned margin
Liquidation price stabilityVaries with other positionsStable, position-specific
Capital efficiencyHigherLower
Best forMulti-position strategies, basis tradesSingle high-conviction positions
Margin mode cannot be changed while a position is open. Leverage can be increased on an open position but cannot be decreased until the position is closed.

Cross Margin

Cross margin pools all available capital into one equity figure that simultaneously supports every cross-margin position on your account. Account value is calculated as:
account_value = usdc_balance + unrealized_pnl - pending_interest + spot_collateral_value
Unrealized PnL updates continuously as Mark Price moves. pending_interest — unsettled interest on any outstanding money-market borrow — is deducted from equity the moment it accrues. Isolated positions and their assigned margin are fully excluded from this pool. Because all cross positions share equity, a sharp loss on one position reduces the margin available to all others. This can move liquidation prices on positions that have barely changed in value.

Isolated Margin

Isolated margin assigns a fixed, dedicated margin amount to each position. That position’s liquidation is determined solely by its assigned margin and notional value — losses elsewhere on the account have no effect. Spot collateral is not contributed to isolated positions. Isolated margin gives you predictable, position-specific risk, making it the preferred choice when you want strict loss containment on a single trade without affecting the rest of your portfolio.

Unified Margin

Pacifica’s unified margin system extends cross margin to include spot holdings as collateral. Rather than keeping USDC and spot assets in separate silos, the system nets them together:
equity_without_spot = usdc_balance + unrealized_pnl_from_cross_perps - pending_interest
account_equity      = equity_without_spot + spot_collateral_value
Spot collateral value is calculated per asset using a piecewise LTV curve, a per-user collateral cap, and an optional hedging bonus for delta-neutral positions (see below).

Implicit Borrowing

If equity_without_spot turns negative — for example because cross perp losses exceed your USDC balance — Pacifica covers the shortfall implicitly through the money market:
required_borrow = max(0, -equity_without_spot)
No explicit borrow transaction is required. Interest accrues on the outstanding amount from the moment the shortfall appears. Implicit borrowing only proceeds if your spot collateral covers the borrow under effective LTV; an account without adequate collateral is flagged for deleveraging.
Isolated margin positions are an exception: the full initial margin required is borrowed upfront when the position is opened, rather than implicitly as needed.

Carry Trades and Hedged Positions

Because spot and perpetual PnL are netted in the same equity figure, holding a long spot position alongside a short perpetual on the same underlying constitutes a carry trade without separate collateralisation of each leg. Matched hedge positions also receive an elevated LTV rate on the spot collateral side, improving overall capital efficiency.

Excluding an Asset from Unified Margin

A specific spot asset can be excluded from unified margin at the account level by toggling unified_margin_excluded in the portfolio page. The balance remains available for spot trading but contributes zero collateral to perpetual margining.

Initial Margin and Withdrawable Balance

Placing an order reserves initial margin based on the entry price, position size, and leverage:
initial_margin = position_size * entry_price / leverage
Unrealized PnL can be withdrawn from cross-margin accounts and isolated positions, subject to a 10% initial-margin floor. Open spot buy orders also lock their USDC from the withdrawable balance:
withdrawable_balance = usdc_balance + unrealized_pnl - pending_interest + spot_collateral_value
                     - max(initial_margin_required, 0.1 * total_position_value)
                     - spot_buy_order_locked_usdc

Leverage

Perpetual markets on Pacifica support leverage from 3x to 50x, with the specific maximum determined by each asset’s liquidity, volatility, and Pacifica’s dynamic risk model. Spot trading is always 1x. The maintenance margin for any market is always 50% of the initial margin fraction:
maintenance_margin_ratio = (1 / max_leverage) / 2
For example, an asset with a 20x maximum leverage has a 5% initial margin and a 2.5% maintenance margin.

Dynamic Margin Adjustment

When open interest rises sharply relative to orderbook liquidity, Pacifica automatically increases initial margin requirements in a super-linear fashion. This prevents outsized positions from accumulating that would be difficult to liquidate without significant market impact.
Max LeverageInitial Margin FractionMaintenance Margin
50x2.0%1.0%
20x5.0%2.5%
10x10.0%5.0%
5x20.0%10.0%
3x33.3%16.7%

Sub-accounts

Sub-accounts are margined independently. Spot collateral and USDC held in a sub-account back only that sub-account’s positions. Assets can be transferred between a master account and its direct sub-accounts via subaccount spot transfers.
For details on what triggers liquidation and how to calculate your liquidation price, see the Liquidations page.

Build docs developers (and LLMs) love