Sub topic 10
Perpetual Swaps
This chapter assumes you understand spot trading, basic percentages, and the idea of margin. A perpetual swap is a crypto derivative that tracks an asset price without an expiry date. It lets you take a long or short position without owning the underlying coin.
How a perpetual swap differs from a future
A dated future has a settlement date. On that date, the contract is closed or settled according to its rules. A perpetual swap has no scheduled expiry. You can keep it open while you maintain enough margin and the trading venue continues to operate.
| Product | Owns the asset? | Expiry? | Typical way positions stay aligned |
|---|---|---|---|
| Spot BTC | Yes | No | Direct buying and selling |
| Dated BTC future | No | Yes | Expiry settlement and arbitrage |
| BTC perpetual swap | No | No | Periodic funding payments |
A perpetual position represents price exposure rather than ownership. A long position gains when the contract price rises. A short position gains when it falls.
Position value and profit and loss
Many crypto perpetuals are linear contracts. A linear contract calculates profit and loss in the quote currency, such as USDT:
\[ \text{PnL} = \text{quantity} \times (\text{exit price} - \text{entry price}) \]
For a short position, reverse the sign. For example, a long position of 0.5 BTC entered at $60,000 and closed at $66,000 earns:
\[ 0.5 \times (66{,}000 - 60{,}000) = 3{,}000 \]
This is gross profit. Trading fees, funding payments, and possible slippage reduce the final result.
def linear_pnl(quantity, entry, exit_price, side):
sign = 1 if side == "long" else -1
return sign * quantity * (exit_price - entry)
print(linear_pnl(0.5, 60000, 66000, "long"))
print(linear_pnl(0.5, 60000, 57000, "short"))The contract specification determines how quantity is measured. Some venues quote quantity in coins, while others use a fixed number of contracts with a defined dollar value. Always read the contract size before calculating risk.
Margin and leverage
Margin is collateral reserved for a position. Leverage is the ratio between the position's notional value and the margin supporting it.
A $60,000 BTC position backed by $6,000 of margin uses 10× leverage. A 10% price move in the favorable direction produces roughly a 100% return on the initial margin before costs. A similar move against the position can consume that margin and trigger liquidation.
Perpetual swaps therefore separate two ideas:
- The position's notional value, which determines price exposure.
- The margin balance, which absorbs losses and supports the position.
With isolated margin, the venue normally limits the collateral at risk to the margin assigned to that position. With cross margin, the venue can use eligible balance elsewhere in the account. Cross margin may delay liquidation, but it can also expose more of the account to one losing trade.
The perpetual price and funding
Because a perpetual has no expiry, it needs a mechanism to keep its contract price near the spot market. Exchanges compare the perpetual price with a spot-based reference called an index price. When the perpetual trades above the index, longs are usually charged funding and shorts receive it. When it trades below the index, the direction usually reverses.
Funding is a transfer between traders, not normally a fee paid directly to the exchange. The rate, calculation interval, and settlement rules vary by venue. Funding can become a substantial cost when a position remains open for a long time.
A perpetual swap is therefore a leveraged price contract with no expiry, collateral requirements, and recurring funding transfers. Its behavior depends on the contract specification and the venue's risk engine.
Exercise
You open a 1 BTC linear perpetual long at $60,000 and close it at $58,000. Ignoring fees and funding, what is the gross PnL?
Show answer
The gross PnL is 1 × ($58,000 − $60,000) = −$2,000.