Appearance
Trading Basics
This page explains how swap positions work, how PnL is produced, and how risk is enforced.
1. Core Contract
Concept
A Jetty position exchanges a fixed rate against a floating oracle index over a chosen tenor.
Example
- Pay fixed / receive floating: benefits when floating realization is above your locked fixed rate.
- Receive fixed / pay floating: benefits when floating realization is below your locked fixed rate.
Technical Detail
notional > 0: pay fixed, receive floating.notional < 0: receive fixed, pay floating.- Position collateral and PnL live inside a margin account.
2. Market Structure
Concept
Markets are rolling instruments. The market account persists, while each position has its own expiry bucket.
Example
In a market with daily buckets and a 365-day window, you can pick any valid daily-aligned expiry inside that window.
Technical Detail
- One pool can host multiple markets under the same quote token.
- All tenors draw from the same unified liquidity pool, but each tenor interpolates its rate from the 8-knot curve engine.
- Longer tenors have higher carry-equivalent exposure and typically face more price impact.
3. Pricing and Liquidity
Concept
Pricing comes from the curve engine's 8-knot term structure and 3-tranche Impact Kernel, not an order book or real reserve swaps.
Example
A larger trade pushes further along the curve and receives a worse fixed rate than a smaller trade, all else equal.
Technical Detail
- The Impact Kernel consumes carry-sized notional (pricing notional) for impact calculation.
- Risk-increasing trades are constrained by DV01 reserve and utilization scaling.
- Risk-reducing trades can access full allocated depth.
4. Settlement and PnL
Concept
Settlement is accounting-based. The program updates position and market accumulators instead of transferring tokens at every funding event.
Example
When oracle index rises between touches, pay-fixed positions receive funding; receive-fixed positions pay funding.
Technical Detail
text
funding_delta = notional * (index_now - index_last)- Funding and fees accumulate in
position.realized_pnl_wad. - Unrealized MTM uses current mark rate and time to expiry.
- Deposits and withdrawals are explicit token-movement instructions.
5. Margin and Liquidation
Concept
Health determines whether a position can stay open or add risk.
Example
If mark moves against your position and health falls below zero, a liquidator can close enough notional to restore health.
Technical Detail
- Initial margin gates risk increases.
- Maintenance margin gates liquidation eligibility.
- Health checks run before and after risk-increasing swaps.
- Risk-reducing swaps remain available in stressed states.
6. Execution Checklist
- Select market and expiry.
- Verify wallet network and collateral balance.
- Review quoted fixed rate, fee, and margin impact.
- Submit swap.
- Monitor
realized_pnl_wad, unrealized MTM, and health. - Close or reduce before expiry when operationally possible.
7. Operational States
- Normal: opening and closing allowed.
- ClosingOnly: only risk-reducing swaps.
- Halted: trading disabled, liquidation path may remain enabled by config.