CLAMP
BTC7D+15.90%BTC14D+16.61%BTC30D+17.65%BTC60D+18.83%BTC90D+19.75%ETH7D+10.68%ETH14D+11.13%ETH30D+11.90%ETH60D+12.90%ETH90D+13.75%HYPE7D5.01%HYPE14D3.60%HYPE30D1.69%HYPE60D+0.23%HYPE90D+1.46%

MECHANICS

What a funding swap actually is.

Nothing here is novel finance. A funding swap is an interest rate swap where the floating leg happens to be a perpetual’s funding rate instead of a term rate. What is unusual is the setting: the floating leg is computable on chain from the same two prices the venue uses, and it is capped, which is what makes the whole thing collateralisable rather than merely reportable.

01

Two legs, and why they cancel.

A perp long pays funding. A pay-fixed swap receives it. Put them side by side and the only thing left is the fixed rate — that is the entire product, and it is worth seeing drawn.

A LONG PERP, HEDGED
PERP ON HYPERLIQUIDfunding you pay, hour by hourCLAMP — PAY FIXEDreceives the same stream, pays a flat rateNETthe stream is gone; the fixed leg is all that remainsFIXEDOPENMATURITY
02

The floating leg is an index, not a report.

Everything settles against one number per market: a cumulative funding index, signed, that only ever moves forward in time.

A keeper pokes the oracle. It reads the perp mark price and the spot oracle price out of the HyperCore read precompiles, turns them into a premium, runs Hyperliquid’s funding formula over it, and integrates the result forward at that rate until the next poke. The realised funding over any window is one subtraction: F(t₁) − F(t₀).

Sampling is deliberately backward-looking. The rate observed at a poke applies to the interval that follows it, never the one before, because a forward-looking scheme would let a single manipulated sample be integrated across an interval whose length the manipulator gets to choose. The cost of that choice is a lag bounded by the poke interval.

If nobody pokes for longer than the staleness window, accrual freezes rather than extrapolating a stale rate across a gap of unknown size, and the market stops accepting new positions. Funding the venue charged during the blackout is not recovered. That is the protocol’s largest single source of basis against Hyperliquid, and the reason the keeper set is a real part of the design rather than an afterthought.

THE SETTLEMENT GRID

Every maturity sits on a daily grid at 08:00 UTC. The first accrual that crosses a grid point freezes the index there permanently, and because the rate is piecewise constant between pokes, that frozen value is exact rather than interpolated.

Two things fall out of that. Settlement never depends on when somebody gets round to calling it, and the number of maturities that can exist stays small enough for a term structure to be quoted as a curve rather than as a cloud of one-off dates.

PAYOFF
dir      = +1 pay-fixed, −1 receive-fixed
realised = ΔF                     over [t₀, t]
carry    = r × hours(t₀, t)
mark     = (r_mark − r) × hours(t, T)

value    = dir × N × [realised − carry + mark]
03

Where the fixed rate comes from.

There is no order book, so the rate has to be produced. It is three terms and a spread, all quoted per hour, all set per market by governance.

01

Anchor

An exponentially weighted average of realised funding, straight off the oracle. Starting from what funding has actually been doing is what keeps the curve tethered to the venue it settles against.

02

Term

A curve, not a slope. Funding mean-reverts, so ninety days of exposure is not thirteen times seven days of it. Each market carries a handful of knots and the model interpolates between them, which lets a curve be steep, flat, humped or inverted without a redeploy.

03

Skew

Price impact, charged on inventory measured in notional-hours rather than notional. A long-dated swap loads the pool with far more funding exposure than a short one at the same size, and the quote says so. Impact is taken at the midpoint of the inventory walked through, so slicing an order costs exactly what sending it whole costs.

04

Spread

Half a spread either side of the mid, widening with utilisation. It is the only lever the pool has to slow down flow it cannot absorb before the hard caps bite.

AND ONE THING THAT IS EASY TO GET WRONG

Open positions are marked at the midpoint of the book’s skew, not at the skew itself. Marking at the current skew would hand a trader back the price impact they had just paid and book it as an instant loss for the pool — a quiet, compounding leak that shows up as LPs losing money on flow they were supposed to earn from. The midpoint is the average rate the book would trade through if it were unwound back to flat, which is what it is actually worth.

04

Margin, liquidation, and the order of loss.

Initial margin is sized to survive an adverse move in the average funding rate for the rest of the term, scaled linearly by the time left. That means a position frees margin as it ages instead of holding it all until settlement, and it means the requirement is interpretable: a market’s margin rate is a statement about how far the term rate could plausibly run against you.

Health is measured at the mid, so nobody is liquidated purely for having crossed the spread on the way in. The unwind itself executes at the pool’s real quote. The penalty is a fraction of initial margin, split between the liquidator and the insurance fund, and it is never paid out of another trader’s margin — if a position exits with almost nothing left, the penalty shrinks to what is there.

When losses outrun margin anyway, the shortfall goes to the insurance fund, which is built out of a share of every opening fee. Only what the fund cannot cover reaches the vault. Depositors are underwriting the tail, and it is worth knowing exactly where in the queue they sit.

WHY THE 4% CAP MATTERS

Hyperliquid caps hourly funding at 4%. An uncapped floating leg has an unbounded payoff and cannot be fully collateralised at any margin level, which is why floating-for-fixed products on uncapped rates need a credit relationship somewhere. Here the leg is bounded, so it can be margined, liquidated and backstopped like any other position.

WHAT HAPPENS TO A MATURED BOOK

Maturities come off the pool’s live book a whole expiry at a time, not a position at a time. Each maturity owns a bucket carrying the same sums restricted to it; once it has passed, anyone can roll it, and its settled value is computed in closed form against the frozen index and moved into a single number.

After that the book holds only unexpired positions, so skew, duration and marks are exact however long the holders take to claim. Settlement rolls the bucket first if nobody else has, which means the same bounty pays for both.