Funding fee formula
Funding rate formula
The per-hour funding rate combines a base interest component and a premium component derived from the premium index:P_avg— arithmetic mean of the premium-index samples over the settlement periodI— interest rate coefficient, configured per contract. Most symbols use0.0001(0.01%); stablecoin pairs use 0.- The
/8divisor 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_rateandlower_ratecap extreme funding. Defaults: ±0.375% for majors, ±4% for small caps. Emergency conditions may temporarily tighten or relax the caps.
Premium index
- When
adj_depth_bid > index, the book has a positive premium (longs willing to pay up).Pis positive. - When
adj_depth_ask < index, the book has a discount.Pis 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 intoP_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 whenF < 0. - Short positions receive when
F > 0, pay whenF < 0.