Skip to content

How Jetty Works

Jetty is an interest rate swap protocol on Solana. It lets you convert any variable rate into a fixed rate, or vice versa, for a duration you choose.

This page gives a high-level tour of the protocol's design.

The Problem

DeFi runs on variable rates. Perpetual funding, staking yields, borrow costs: every major source of return or expense in crypto fluctuates constantly. A delta-neutral desk earning 15% annualized carry today can watch it evaporate by Friday when funding flips negative. A leveraged strategy paying variable borrow can see its entire spread wiped out by a rate spike.

In traditional finance, interest rate swaps solved this decades ago. They're the largest derivatives market on earth, clearing over $1 trillion daily. DeFi has no equivalent.

Previous on-chain attempts used orderbook models that fragment liquidity across markets and expiries. None has produced the deep, continuous liquidity needed for institutional-scale hedging.

Pool-Based AMM

Instead of an orderbook, Jetty uses a single shared liquidity pool as the counterparty to every trade across every market. LPs deposit into the pool and earn fees from all trading activity. They don't need to quote prices or manage positions.

One pool, many markets. Liquidity is never fragmented.

The Yield Curve

Each market maintains a continuous term structure defined by a set of fixed maturity points (called knots) spanning from short-term to long-term horizons. You pick a tenor, say 30 days, and the curve interpolates a rate for you.

This is crypto's first on-chain yield curve. Its shape reflects the market's collective expectation of where rates will be at every horizon, much like the Treasury yield curve in traditional finance.

Pricing and Liquidity

When you trade, the protocol calculates your price impact using a concentrated liquidity system with three layers:

  • Core. The tightest range around the current rate, with the deepest liquidity. Most normal-sized trades stay here and get tight spreads.
  • Mezzanine. A wider range with additional depth for medium-impact trades.
  • Tail. The widest range, absorbing large market-moving trades at progressively steeper impact.

The layers are nested. Near the current rate, all three are active and liquidity is maximally concentrated. As a trade pushes the rate further, it exhausts the inner layers first, producing a smooth, convex impact curve. Small trades are cheap. Large trades cost progressively more.

Longer-tenor trades consume more depth than shorter ones for the same notional, because they expose the pool to more risk per dollar. A $1M trade at 30 days has roughly the same impact as a $167K trade at 180 days.

Fees

Fees are dynamic. They adjust in real time based on market conditions rather than charging a flat rate. Each swap fee is built from several components:

  • Base fee. A small minimum charged on every trade.
  • Utilization. Goes up when the market is busy. Think of it like surge pricing: the more crowded the market, the more it costs to trade.
  • Deviation. Goes up when your trade moves the rate far from its recent average. Bigger trades that push the price further pay more.
  • Staleness. Goes up when the rate feed (oracle) hasn't been refreshed recently. If the protocol is working with outdated information, trades cost more to protect LPs from being on the wrong side of a stale price.
  • Inventory. Goes up when the pool is lopsided. If most traders are betting the same direction, new trades in that direction cost more. This encourages people to take the other side and balance things out.
  • Volatility. Goes up when rates have been moving a lot recently. Choppy markets mean more risk for LPs, so fees rise to compensate.

Fees are also asymmetric. Trades that add risk to the pool pay more than trades that reduce it. This encourages balanced flow and protects the pool.

Open positions pay a small streaming fee, similar to a holding cost. This compensates the pool for keeping capital reserved against your position.

Settlement

Your PnL on a swap is the difference between the fixed rate you locked in and what the floating rate actually did over the life of your position.

If you're pay-fixed and the floating rate averages higher than your fixed rate, you profit. If it averages lower, you lose. The protocol settles this lazily: your funding accrual is computed whenever your position is touched, not on a fixed schedule.

For active positions, the protocol also tracks an unrealized mark-to-market value based on the current yield curve rate at your remaining tenor. This converges to zero as your position approaches maturity, while your realized funding PnL captures the actual cash flows.

Margin and Liquidation

Positions are margined, not fully collateralized. You post a fraction of your notional as collateral, which makes the system capital-efficient for both hedgers and speculators.

The protocol checks your health across your entire portfolio of open positions, not just the one you're trading. If your portfolio health drops below zero, meaning your equity can no longer cover the maintenance margin on all your positions, you become eligible for liquidation.

Liquidation works through direct transfer: a liquidator inherits a portion of your position directly, without going through the AMM. Only the minimum amount needed to restore your health is closed. A penalty is applied and split between the liquidator, the protocol, and LPs. You can't lose more than your posted collateral.