Funding

Funding is a periodic payment between longs and shorts. It keeps the perpetual's price close to the oracle price:

  • if the book trades above the oracle, longs pay shorts;
  • if below, shorts pay longs.

The protocol only redistributes payments between positions and keeps nothing for itself.

How the rate is computed

  1. Price samples. Every block records two prices: index, the oracle price, and mark, the price from the book. Mark is the average price at which 500 USDC × the market's maximum leverage (5,000 USDC at 10x) can be bought or sold in the book. Deviations smaller than the dead zone (half of the market's execution band) are ignored.
  2. Averaging. Over the market's funding interval, 10% of the extreme values are dropped on each side and the rest is averaged. With samples for less than three quarters of the interval, the rate is 0.
  3. Rate. (mark - index) / index on the averaged prices, within the cap.

The rate is quoted per 8 hours. When it is applied, it is scaled to the time elapsed since the previous payment. Time when the network produced no blocks is not charged: of any gap between blocks, at most 10 seconds count toward funding.

Rate cap

The 8-hour rate never exceeds the lesser of 1% and 0.75 × the market's maintenance margin. Currently that is 0.375% for BTC and ETH, 0.75% for the other markets.

How often it is paid

IntervalMarkets
17,280 blocks, ~4 hBTC, ETH, LTC, SOL, XRP
1,800 blocks, ~25 minADA, ARB, BNB, DOGE, GRAM, HYPE, LINK, PUMP, SUI

Governance sets the interval for each market.

Who pays how much

  • Equal sides. If longs and shorts are equal, both sides pay or receive the full rate.
  • Unequal sides. The smaller side pays or receives the full rate, while the larger side's rate is reduced proportionally.

Total long payments always equal total short payments.

Example. Rate +0.1%, longs 4M USDC, shorts 1M USDC.

  • Shorts receive 0.1% of 1M = 1,000 USDC.
  • Longs pay the same 1,000 USDC, which is 0.025% of their notional.

Accrual on a position

Funding is not moved between subaccounts at every payment. It accumulates in the position and is counted in the subaccount's equity right away. It moves into collateral when the position changes or closes.

When prices are not recorded

While a pair is paused or the oracle circuit breaker is active, funding prices are not recorded.