Margin is the USD that backs your positions. You need **initial margin** to
open a position, and **maintenance margin** to keep it open.

<PerpsMarketLimits variant="margin" />

Percentages are of position value. The app shows the current leverage limit in
the order form.

Every market uses [margin tiers](#margin-tiers), and the table shows the first
tier.

## Leverage

You set leverage per market in the order form, from 1x up to the market's max,
which is where it starts. **Leverage sets how much initial margin a new position
needs, not your maintenance margin.** The higher the leverage, the less you
need. For a cross position you already hold, lowering the setting doesn't move
your liquidation price; adding USD or reducing the position does.

## Margin tiers

In every market, a larger position needs a larger share of its value as margin,
and allows less leverage. All markets use the same tier rates:

| Max leverage       | 50x | 25x | 20x  | 10x | 5x  |
| ------------------ | --- | --- | ---- | --- | --- |
| Initial margin     | 2%  | 4%  | 5%   | 10% | 20% |
| Maintenance margin | 1%  | 2%  | 2.5% | 5%  | 10% |

Each market's tiers end at these position values. Its first tier starts at $0
and each later one where the previous one ends, so SOL's 20x tier covers $20,000
to $50,000. **—** means the market has no such tier.

| Market              | 50x     | 25x     | 20x      | 10x      | 5x       |
| ------------------- | ------- | ------- | -------- | -------- | -------- |
| BTC, ETH            | $20,000 | $50,000 | $100,000 | $250,000 | $500,000 |
| SOL                 | $10,000 | $20,000 | $50,000  | $100,000 | $200,000 |
| ZEC                 | $10,000 | $20,000 | $50,000  | $100,000 | —        |
| HYPE                | —       | $25,000 | $50,000  | $100,000 | —        |
| JUP                 | —       | —       | $10,000  | $20,000  | $50,000  |
| SPCX, SNDK, SKHYNIX | —       | —       | $50,000  | $75,000  | $100,000 |

- **Your leverage caps your position.** Your position and open orders in a
  market can total up to the end of the last tier whose max leverage is at
  least yours. ETH starts at 50x, which allows $20,000. At 30x that's still
  $20,000, and $50,000 needs 25x or lower. The leverage slider marks each
  tier's max.
- **Initial margin is one rate on the whole position**: its value divided by
  your leverage. A $50,000 ETH position at 25x needs $2,000.
- **Maintenance margin rises gradually.** Each slice of a position pays its own
  tier's percentage, so a $50,000 ETH position needs $800: 1% of the first
  $20,000 plus 2% of the next $30,000.
- **A position above the first tier is liquidated one tier at a time.** See
  [Liquidation](/perps/liquidation#what-happens).

## Cross and isolated margin

- **Cross** (the default) backs all of a sub-account's positions and orders
  with its USD, so a loss can draw on the whole balance.
- **Isolated** sets aside margin for one position, based on your leverage. Only
  that margin backs it, so a liquidation doesn't touch the rest of the
  sub-account.

In one sub-account, a market is either cross or isolated. To keep both modes
open for the same market, use separate sub-accounts. Otherwise, close the
existing position and cancel its open orders before switching.

## Return on position margin

**Position ROE** is unrealized PnL divided by the margin backing the position,
multiplied by 100. Cross uses the venue's required initial margin at its
reported mark price. The margin equals mark notional times the effective initial
margin rate, which accounts for the position's leverage setting and risk tier.
A stricter risk tier can require more margin than the displayed leverage
implies. At the same PnL, a higher margin requirement moves ROE closer to zero.
Isolated uses posted collateral when available and required initial margin
otherwise. Adding isolated collateral reduces the size of the percentage at
the same PnL.

The percentage beside the account value divides unrealized PnL by the
current account value shown on the tab, multiplied by 100. GUM account tabs use
cross-position PnL and cross-account value. If all open positions are isolated,
a funded GUM cross account shows 0.00%.

The Jupiter Account tab includes the full unrealized PnL of its cross and
isolated positions. Its displayed account value is cross equity plus the
positive equity in each isolated account. For example, with $1,000 in cross
equity and one isolated account at −$50 equity carrying a −$150 open loss,
the tab shows $1,000 and −15.00%. Both tabs show a percentage only when
the displayed account value is at least $0.01. The calculation uses the
unrounded account value.

## Account health

**You're liquidated when your account value drops below the maintenance margin
plus the fees to close your positions**: the taker fee and the market's
[liquidation fee](/perps/liquidation). Account value is the sub-account's USD
plus unrealized PnL, including funding not yet paid.

The app shows this as **Liquidation risk**: above 95% it flags elevated risk,
and at 100% the sub-account can be liquidated. With isolated positions, it shows
whichever margin is closest to liquidation, because each one is liquidated on
its own.

## Liquidation price

The app shows an **estimated** liquidation price for each position, and a
preview in the order form. It assumes only that market's price moves, so
funding, other positions and transfers shift it. Liquidation itself is triggered
by your actual account value, checked on-chain. If the app shows **--**, no
liquidation price falls within the valid market range. The order form skips the
preview for markets with margin tiers, which is currently every market.
