CometDocs
Contents

Perps

Perpetuals

A Comet perp is a leveraged long or short with no expiry, held as real tokens. Opening one borrows from Lend and swaps through the pool; its cost of carry is the lending market’s interest.

Long and short

A perp is two balances: tokens the position holds and tokens it owes. Which is which sets the side.

SOL-PERPBorrows from LendHoldsGains when
LongUSDCSOL, bought with margin and the borrowed USDCSOL rises
ShortSOLUSDC, from margin and the sold SOLSOL falls

Every pool is a perp market for its pair. JITOSOL-SOL-PERP trades the price of JitoSOL in SOL, up to 20×; SOL-PERP goes up to 10×.

Opening a perp

  1. 1

    Margin moves in

    Margin leaves your account’s deposits in the pool’s quote token: USDC for SOL-PERP.

  2. 2

    The reserve lends

    A long borrows the quote token; a short borrows the base token.

  3. 3

    The pool swaps

    A long swaps margin and borrowed USDC for SOL. A short swaps the borrowed SOL for USDC. The swap carries your minimum output.

  4. 4

    The position holds the result

    Its held tokens are supplied to their reserve and earn the supply rate. The swap’s average price is the entry price.

Size, debt and liquidation price

SOL-PERP · example inputs
Position25.00 SOL
Borrowed from Lend4,000.00 USDC
Liquidation price168.42 -15.8%
A SOL-PERP position from example inputs, before swap fees and carry.
long    liquidation price = debt ÷ (size × (1 − m))
short   liquidation price = held USDC ÷ (size × (1 + m))
size
margin × leverage ÷ entry price
m
maintenance margin, 5% on SOL-PERP

A long owes margin × (leverage − 1) in USDC. A short owes its size in SOL and holds margin × (leverage + 1) in USDC. Interest moves the liquidation price toward the market a little each day; adding margin moves it away.

Margin ratio and profit

equity = value held − value owed
margin ratio = equity ÷ position value
profit = equity − margin

Position value is size × the oracle price. A position opens at a margin ratio of at least 1 ÷ its market’s maximum leverage and can be liquidated at the maintenance margin.

Closing

Close all of a position or any fraction. The pool swaps the held tokens back, the reserve is repaid with interest, and the rest returns to your account as a deposit. A partial close repays the same fraction of the debt and keeps the margin ratio where it was.

Costs

CostWhenAmount
Swap feeOn open and on closeThe pool’s fee on the swap: 0.05% on SOL/USDC, 0.01% on JitoSOL/SOL
CarryWhile openBorrow rate on what is owed, less supply rate on what is held

Perps add no venue fee of their own.