Understanding Interest Rate Swaps
What Is a Swap?
An interest rate swap is an agreement between two parties to exchange cash flows based on two different rates over a period of time:
- One side pays a fixed rate, locked in at the start.
- The other side pays a floating rate that changes over time based on market conditions.
No one is exchanging the actual money being lent or borrowed (the "principal"). You're only settling the difference between the two rates. If the floating rate ends up higher than your fixed rate, one side profits. If it ends up lower, the other side profits.
Why Would You Use One?
Swaps are the most basic tool for managing rate risk. A few examples:
Lock in income. You're earning carry from a delta-neutral basis trade, and the funding rate is great right now. But funding can flip negative tomorrow. A swap lets you lock in today's rate for 30 or 90 days, turning unpredictable income into a known quantity.
Cap your costs. You're borrowing at a variable rate to fund a leveraged position. If rates spike, your strategy bleeds money. A swap lets you fix your borrow cost so you know your worst case upfront.
Trade a view on rates. You think funding rates are going to rise. Instead of just hoping, you can take a position that profits directly from that move.
How PnL Works
When you open a swap on Jetty, you lock in a fixed rate for a chosen duration (say, 30 days). Over those 30 days, the oracle reports what the floating rate actually was.
Your profit or loss is the difference:
- If you're pay-fixed / receive-floating and the floating rate averages higher than your fixed rate, you profit.
- If the floating rate averages lower, you lose.
The reverse applies if you're on the other side of the trade.
Settlement happens lazily. Your PnL accrues in the background and gets calculated whenever you interact with your position: trading, closing, or getting liquidated.
Mark-to-Market
While your position is open, the protocol tracks an unrealized value based on where the yield curve currently prices your remaining tenor. If market rates have moved in your favor since you opened, your mark-to-market is positive and your account health improves. If rates moved against you, it's negative.
This unrealized value naturally shrinks toward zero as your position approaches maturity, while your realized funding PnL captures the actual cash flows over time.
Risks to Be Aware Of
- Rate risk. The market moves against your position, reducing your mark-to-market value.
- Funding risk. The realized floating rate diverges from your fixed rate unfavorably.
- Liquidity risk. Larger trades face more price impact, which affects your entry and exit rates.
- Oracle risk. If the rate feed is stale or incorrect, settlement may be distorted.
- Liquidation risk. If your account health drops below maintenance margin, part of your position can be liquidated.
Next Steps
- Trading Basics for how to open, manage, and close positions.
- Markets for what you can trade on Jetty.