Trading

How perps work here

A perp is a position on a price with no end date. You post margin, pick a side and a leverage, and your profit or loss follows the price until you close.

The words

WordMeaning
LongYou profit when the price rises.
ShortYou profit when the price falls.
MarginThe SOL you put up. It is the most you can lose.
LeverageHow many times your margin the position is worth. Up to 20x.
SizeMargin times leverage, in SOL. Fees and limits are counted on size.
UnitsHow much of the account you hold. Size divided by the entry price.

What is different here

Limits

How much leverage you can use depends on how large your position is next to the market, and on where in the band your order fills. The ticket shows the largest leverage on offer for your order. The size limits are shares of the market's depth, which does not change.

Position sizeTop leverageMargin to openLiquidated underAt the start depth of 15,000
up to 0.1% of depth20x5% of size2.0%up to 15 SOL of size, 0.75 SOL of margin at 20x
up to 0.4% of depth10x10%5%up to 60 SOL of size
up to 1% of depth5x20%10%up to 150 SOL of size

The margin to open in this table is the least a tier asks. The band rule can ask more, depending on where in the band the order fills; then less leverage is on offer than the tier's top.

The band

Every market's price lives inside a band that is fixed when the market is created.

What it is

Each side of a market may hold at most 1.2% of the curve's units. All longs together are one side and all shorts are the other. The test at every open: with every position on the other side gone, the curve must still be inside the band. So whoever closes, and in whatever order, the price stays between two fixed prices.

For a market that starts at 1 SOLValue
Lowest priceabout 0.9764
Highest priceabout 1.0244
From the band's highest price to its lowesta fall of 4.7%
From its lowest price to its highesta rise of 4.9%

The price stands at the top only when the long side is full and no short is open. It stands at the bottom only when the short side is full and no long is open. The two prices never move: a market keeps the band it was created with whatever settings change later.

Why it exists

Other perps liquidate on an outside price. Motion has none by design, so margin does that job. The band rule has two halves.

  1. To open, to add, and after taking margin out, a position must hold three things: what the band could cost it, which is what it would lose if the price went to the far edge of the band; its liquidation line, counted on what it is worth at that far edge; and 0.30% of its size. An order that leaves less is refused with band_margin.
  2. At all times a position must hold the first two: what the band could cost it and its line at the far edge. When funding has worn its margin under that, anybody may close it. See the band rule's close below.

Together they give this: a position that holds the margin the rule asks for cannot be liquidated by any price move inside the band, however long the price is held there. Funding is what wears that margin down. There are two exceptions: while a market's cushion is empty or short, a loss past another trader's margin is charged to the open positions on the other side, and so are single lamports of rounding from very small closes. Once the margin is worn, anyone may close the position at the market price of that moment and what is left goes back to its owner. Our keeper sends that close, and anybody else may. If nobody does for many hours, a price pushed to the far edge of the band and held there can liquidate a worn position: see liquidation.

Leverage on offer

Because the rule asks for the band's cost and the line at the far edge, the most leverage on offer depends on where in the band the order fills. The ticket and the API show it before you open. At the launch settings, in a market that starts at 1 SOL, for a small order:

PriceA long may useA short may use
0.9764, the bottom20x13.6x
0.981220x14.7x
0.988420x16.6x
0.995620x19.0x
0.9980 to 1.003820x20x
1.005219.5x20x
1.012417.2x20x
1.019615.5x20x
1.0244, the top14.5x20x

So 20x is on offer to both sides between 0.9980 and 1.0038, to a long from the bottom of the band up to 1.0038, and to a short from 0.9980 to the top. Away from there it tapers. A long is offered 10x everywhere in the band. A short is offered 10x from about 0.9846 up, and a little less in the lowest sixth of the band, down to about 9.6x at the very bottom. 5x is on offer everywhere, to both sides. The numbers are rounded down, never up; a larger order gets a little less.

Max. The most on offer moves with the price, so a number you picked can stop being offered. The ticket then says so, leaves your choice as it is, and waits for you to pick one that is offered. Pick Max and the ticket follows the most on offer by itself: the line under the choices says where Max stands, and your order is made at the most on offer at that moment, which can differ a little from the number the ticket showed a second before. If the market moves again before the order lands, the order is refused like any other, and you press once more.

The band rule's close

Funding comes out of margin hour by hour, while what a position must hold stays the same. When funding has worn a position's margin under what the band could cost it plus its line at the far edge, anybody may close it. We say the position was closed by the band rule.

How long it takes. The 0.30% of size a position posts on top of what it must hold is its runway against funding. At the launch settings funding takes at most about 0.041% of size an hour, so a position on the crowded side at the most leverage, that never adds margin, has about 7 hours after it last opened, added or took margin out before it can be closed by the band rule. Whatever the admin wallet sets, the funding limit compiled into the program, 0.075% an hour, keeps that at 4 hours or more. Positions that pay less funding, or receive it, take much longer.

What you can do. Top up margin before the hours shown on the position run out, or use less leverage on a crowded side. You can also close the position yourself.

What it means for you

Your worst fill

Every open and every close carries the worst price you accept. If the price moves past it before your transaction lands, the transaction fails and nothing is taken. The curve is public, so this is your protection against someone trading in front of you.

Profit and loss

Your profit is what closing your whole position on the curve would pay, minus your size at entry. A quick way to think about it: profit is close to your size times the price move since entry, less what your own close moves the price.

An example

You open a long with 0.5 SOL of margin at 10x in a new market. Size 5 SOL, entry price about 1.0003. Other traders then buy until the price is 1.0200.

Closing your units paysabout 5.10 SOL
Your size at entry5.00 SOL
Profitabout 0.10 SOL, 19% on your margin
Fees, open and closeabout 0.01 SOL

Had the price gone to 0.9800 instead, you would be down about 0.10 SOL, a fifth of your margin. The price cannot go below about 0.9764 in this market, and there you would be down about 0.12 SOL. So a price move alone cannot liquidate this 10x position.

Margin after opening

Who pays the winners

The losers do. Every loss stays in the market's vault and every profit is paid from it. Every trade is on the one curve, so what the winners take out is what the losers put in: all profit and all loss in a market add up to zero. Funding is paid between traders too. Motion's income is the fee and the liquidation penalty, not your loss.

The market's cushion is not a bankroll. It steps in when a loss is bigger than a margin. See when a loss is bigger than the margin.