Skip to main content
Perpetual futures have no expiry, so they need a mechanism to pull their price toward the spot index. Funding is that mechanism. At the top of every hour, longs and shorts exchange a small payment based on how far the perp has drifted from the index. When the perp trades at a premium, longs pay shorts; at a discount, shorts pay longs. The protocol does not take any share of funding — it is a pure peer-to-peer transfer.

Funding fee formula

funding_fee = position_value × funding_rate
position_value = position_size × mark_price
Position value at settlement is measured using mark price, not index price, for manipulation-resistance. A positive funding rate means longs pay shorts; a negative rate means shorts pay longs.

Funding rate formula

The per-hour funding rate combines a base interest component and a premium component derived from the premium index:
F = (P_avg + clamp(I − P_avg, -0.05%, +0.05%)) / 8
F = clamp(F, lower_rate, upper_rate)
  • P_avg — arithmetic mean of the premium-index samples over the settlement period
  • I — interest rate coefficient, configured per contract. Most symbols use 0.0001 (0.01%); stablecoin pairs use 0.
  • The /8 divisor carries over from the 8-hour convention used by many exchanges; Intention still settles hourly, so effective per-hour impact is meaningful but small.
  • upper_rate and lower_rate cap extreme funding. Defaults: ±0.375% for majors, ±4% for small caps. Emergency conditions may temporarily tighten or relax the caps.

Premium index

P = (max(0, adj_depth_bid − index) − max(0, index − adj_depth_ask)) / index
  • When adj_depth_bid > index, the book has a positive premium (longs willing to pay up). P is positive.
  • When adj_depth_ask < index, the book has a discount. P is negative.
  • Otherwise, P = 0.

Depth-weighted prices

Depth-weighted bid/ask are the average prices at which an impact-margin notional (IMN = 50 USDC × max_leverage) of capital would fill into the book. For a 100× contract, IMN is 5,000 USDC. Intention walks the book from the best price outward, accumulating depth until cumulative value reaches IMN, then averages the fill price. To prevent deep-book extremes from dominating, the results are clamped against the best quote: adj_depth_bid = max(best_bid × 0.98, depth_bid) and symmetrically for ask. If total book liquidity is less than IMN, the sample is dropped and an alarm fires.

Sampling and aggregation

A premium sample is computed every block (subject to order-book validity checks). Every 5 seconds, Intention takes the median of that window’s samples as one data point. Over an hour, 720 points are collected and averaged into P_avg. If fewer than 20% of the expected points are available (for example, due to chain downtime), funding is skipped for that hour.

Settlement

Funding settles in the first block after each UTC hour boundary (00:00, 01:00, …). For each open position:
  • Long positions pay when F > 0, receive when F < 0.
  • Short positions receive when F > 0, pay when F < 0.
The protocol verifies that the total paid equals the total received (balance check). If the balance fails, the transaction is rolled back and a P0 alarm fires.

Settlement accounting

In isolated margin, funding is debited from or credited to the position’s margin; the liquidation price updates immediately. In cross margin, funding settles against available balance and MMR updates. If margin goes negative but unrealized profit can cover it, the position is not immediately liquidated — a warning fires. Otherwise, liquidation kicks in with the negative margin absorbed by the liquidation vault or, in extreme conditions, by ADL.

Downtime handling

If the chain stops producing blocks around an hour boundary, funding is deferred to the next block, using whatever premium data was collected before the pause. Hours where no blocks existed at all are skipped entirely.

What traders feel

Under normal conditions, hourly funding is a tenth of a percent or less — a small drag on positions held for many hours. In heavy one-sided markets, funding can hit the caps, imposing a real cost on the dominant side. That cost is the point: it is the pressure that pulls the perpetual back toward the underlying.