Funding Rate
Perpetual futures never expire, so a periodic cash transfer between longs and shorts — funding — anchors the contract's price to the oracle (spot) price. During each funding interval the Exchange samples the instantaneous premium index — the perpetual's own traded price against the oracle, not the mark (F.1) — and accumulates it weighted by the time elapsed since the previous sample. At any point in the interval the rate is the time-weighted average premium plus a fixed interest component, pro-rated from an 8-hour quote convention to the actual settlement window and clamped to a symmetric cap (F.3). At settlement, each position pays or receives an amount proportional to its notional value at the oracle price (F.4): with a positive rate, longs pay shorts; with a negative rate, shorts pay longs. The construction is exactly zero-sum between matched long and short open interest.
The funding rate is a fan-in of the premium accumulator and the interval clock, and settlement feeds back both into a fresh accumulator and into the positioning pressure that moves the next premium.
Setting
oracle_price
External index (oracle) price of the underlying asset. Samples with a non-positive oracle price are skipped by the implementation, so the effective domain is strictly positive.
USDX per unit of asset
(0, ∞)
perp_reference_price
The perpetual's own traded price on the Exchange's book — the volume-weighted median of the recent-trade window (O.7). This is the perp side of the premium index. OracleValidator::trade_reference_price returns the last trade price when the window is empty, and None when that is also unset — a market that has never traded, or one whose trade history and last trade price were both just cleared by a large oracle re-anchor (OracleValidator::accept_trusted) — at which point the oracle commit path substitutes (commit_oracle_and_sample_funding); there is no time-based staleness check on the window otherwise, so on a market that traded a few times and then went quiet without a re-anchor, keeps reflecting those trades — however old — until enough new trades displace them.
USDX per unit of asset
(0, ∞)
mark_price
The Exchange's mark price, . Drives margin and liquidation — but NOT the premium index (see F.1) or the settlement notional, which is struck at (see F.4).
USDX per unit of asset
(0, ∞)
interest_8h
Fixed interest component of the rate quote — the value the average premium is pulled toward, bounded by (F.3). (0.01% per 8h).
dimensionless (per 8h)
fixed
interest_pull_clamp_8h
How far the interest term may pull the average premium toward itself, per 8 hours (F.3). Matches Binance, Hyperliquid, Aster, EVEDEX and Lighter. (0.05% per 8h).
dimensionless (per 8h)
fixed
window_secs
Length of one funding settlement window. Hourly in production (3600).
seconds
(0, ∞)
time_delta_secs
Seconds elapsed since the previous sample in the interval. Samples at or before the previous sample time are ignored, so the effective domain is strictly positive. Derived in code from millisecond timestamps divided by 1000.
seconds
(0, ∞)
accumulated_premium
Running sum of premium-index samples weighted by their time deltas, , over the current funding interval. Reset to zero at each interval boundary.
dimensionless-seconds (premium × seconds)
unbounded
total_time_secs
Total elapsed time in the current interval, from the interval start to the most recent sample. Derived, not stored: when zero (no samples yet) the implementation short-circuits and returns a zero rate rather than dividing.
seconds
(0, ∞)
funding_rate_cap
Per-market symmetric cap on the funding rate, stored in market parameters. Two configured values: (0.1% per settlement window) on the crypto perps, on the FX, commodity, and index perps. Which markets in each class are actually deployed changes with the venue's rollout state — see Market Specifications for the live per-market set rather than a fixed snapshot here.
dimensionless (fraction per funding interval)
(0, ∞)
funding_rate
The clamped funding rate applied to positions at settlement; always lies in .
dimensionless (fraction per funding interval)
[-c, +c]
size
Absolute position size in units of the underlying asset (always non-negative; direction is carried separately by the position side).
units of asset
[0, ∞)
side_sign
Direction indicator for the position: for a long position, for a short position. Encodes the match on position side in the implementation.
dimensionless
[-1, 1]
The mechanism
Premium Index Sampling
Each oracle tick produces one sample of the instantaneous premium index: the relative deviation of the perpetual's own traded price from the oracle price.
The numerator is , not , and the distinction is load-bearing. Since , substituting the mark would give — the true premium scaled by , i.e. 5% of it at the production , with a damping factor that moves silently whenever a margin parameter is retuned. The premium is defined against the traded price so that it measures the deviation it is named for. A positive premium means the perpetual trades rich to the index (longs are crowded); a negative premium means it trades cheap. The implementation skips any sample whose oracle price is not strictly positive, leaving the interval state unchanged, so the division is always well defined.
Samples arrive at an irregular cadence, so each premium index (F.1) is weighted by the time elapsed since the previous sample before being added to the interval accumulator . This makes the accumulator the exact time integral of the (piecewise-constant) premium index over the interval, independent of sampling frequency: 1-minute and 5-second cadences produce identical averages for the same premium path. Samples with a timestamp at or before the previous sample time are ignored, so is strictly positive.
Funding Rate
The funding rate is built in four steps: the time-weighted average premium (the accumulator (F.2) divided by total elapsed time ); a bounded pull toward the fixed interest component , capped at rather than added unconditionally; pro-rating that 8-hour-basis quote to the actual settlement window ; and finally clamping to the symmetric per-market cap .
The inner clamp (ENG-13673, matching Binance, Hyperliquid, Aster, EVEDEX and Lighter) makes the interest term a bounded pull toward , not an unconditional addition: when is within of , the rate rests exactly at ; when it is further away, the interest term contributes at most rather than the full . The quote convention still matters: the whole bracket is a per-8-hour rate, the industry standard, and the amount charged at an hourly boundary is that rate scaled by . The outer clamp is applied last, to the pro-rated value, so bounds the wealth transfer per settlement window regardless of how dislocated the perpetual becomes. When no time has elapsed in the interval (, i.e. no samples yet), the implementation returns zero rather than dividing by zero. The predicted funding rate published mid-interval is defined to be this same value: the current average is the best estimate of the final rate.
Because the outer clamp binds on the composed quantity, and the inner clamp already caps the interest term's contribution at once is far from , the basis at which the outer clamp engages is : at the production , that is a 0.85% basis, not 0.1%.
Funding Payments
At settlement each open position exchanges cash proportional to its notional value at the oracle price. The signed amount is the position's notional times the funding rate (F.3), with the sign flipped for shorts via . The convention is: a positive amount means the account pays; a negative amount means the account receives. So with a positive rate (, perpetual rich to index) longs pay and shorts receive, and with a negative rate shorts pay and longs receive. For equal long and short size at the same rate, the two amounts cancel exactly.
The notional is struck at rather than so that both sides of a matched pair are valued on the same external anchor — the two counterparties must exchange identical magnitudes, and the oracle is the price neither side's own trading can move.
Invariants
The funding rate is always bounded: for every interval state ((F.3)).
Zero premium implies a rate of exactly the pro-rated interest: if for the whole interval, then , is within so the inner clamp passes it through unchanged, and . (Earlier revisions of this model omitted the interest term and read this as a zero rate; the interest term makes the resting rate non-zero.)
The rate rests exactly at the pro-rated interest rate for a whole band of premiums, not only at zero: whenever the inner clamp passes through unchanged, so regardless of the exact premium within that band (ENG-13673). Outside the band, tracks almost 1:1, offset by at most , but only below the band: above it () the inner clamp saturates at , so , which is always positive there since . Below the band () the inner clamp saturates at , so , and needs — not , which only marks where the inner clamp starts saturating, not where the sign flips. At (inside 's neighborhood but above ) the inner clamp saturates at and comes back , still positive.
Funding is exactly zero-sum for matched open interest: for equal long and short size at the same oracle price and rate, ((F.4)); verified by property-based testing across the full rate range.
Payments are linear in position size: tripling triples exactly.
The rate is well defined at all times: with no samples in the interval () the rate is exactly , never a division error.
Samples with non-positive oracle price or non-increasing timestamps leave the interval state unchanged.
The TWAP is sampling-cadence invariant for a constant premium: any positive sampling frequency yields the same for a given premium , equal to (when below the outer cap) — not to itself, since the bounded interest pull and the window pro-rating both apply.
Worked example
Consider the BTC perpetual with the oracle steady at , observed over 8 hours of premium accumulation. For the first 4 hours the perp reference is , a premium index of per (F.1); for the last 4 hours it is , so . Sampling once per minute, each phase contributes its premium times its duration to the accumulator per (F.2): premium-seconds.
Over seconds the raw time-weighted average premium is — exactly the duration-weighted mean of the two phases, . The interest pull is — inside the band, so it passes through unclamped — giving an 8-hour quote of , exactly the interest rate.
Production settles hourly, so per (F.3) the rate actually charged at a boundary is that quote pro-rated: . With a cap of this is far inside the band, so the outer clamp does not bind.
Now settle a 2 BTC long. Its notional is USDX, so per (F.4) the payment is USDX — positive, so the long pays. A 2 BTC short of the same size has USDX and receives the same amount: the transfer is exactly zero-sum.
Had the perpetual instead sustained a 10% premium, the interest pull would saturate at (since is far outside ), giving an 8-hour quote of , which would pro-rate to and be clamped to , so every position would settle at the cap. Note where that boundary sits: the outer clamp engages at a basis of , i.e. 0.85%, not at 0.1%.
Analysis
Stale relative to the model above. The Sensitivity, Response curves, and Parameter space sections below are machine-generated by the math-engine pipeline (
eng/ops/intelligence/math-engine, owned by the Modeling & Security pod) from an earlier revision of this model — they still elasticize/plot againstmark_pricerather thanperp_reference_price/oracle_price, and the surfaces still hold the cap at±0.0075(0.75%) rather than the production0.001(0.1%) discussed above. Regenerating them requires that pipeline to re-derive the model from the current Rust source, which is out of scope for this doc-alignment pass; flagging here rather than hand-editing generated output or silently leaving it uncaveated.
Sensitivity
Elasticities ε = (∂y/∂x)·(x/y), computed numerically from the verified expressions at each worked-example point. |ε| > 1 means the output moves more than proportionally with that input.
premium_index
mark_price
1.43e+03
premium_index
oracle_price
-1.43e+03
sample_contribution
mark_price
1.43e+03
sample_contribution
oracle_price
-1.43e+03
sample_contribution
time_delta_secs
1
funding_rate
accumulated_premium
1
funding_rate
total_time_secs
-1
funding_rate
funding_rate_cap
0
funding_payment
side_sign
1
funding_payment
size
1
funding_payment
mark_price
1
funding_payment
funding_rate
1
Response curves
The instantaneous premium index is linear in the mark price and crosses zero exactly where mark equals the fixed $50,000 oracle price.
Over a full 8-hour interval (T = 28,800 s) the funding rate rises linearly with the accumulated premium until the average hits the ±0.0075 cap, where it saturates.
At a positive 0.05% rate and $50,000 mark price, payments scale linearly with size and are exactly mirrored between long and short, so matched open interest nets to zero.
Parameter space
Joint parameter effects evaluated from the verified expressions over 2-D grids.
The clamp carves wedge-shaped saturation zones where |accumulated premium / time| exceeds the ±0.75% cap, so short accumulation windows saturate at far smaller premiums; cap held at 0.0075.
The bilinear size × rate interaction produces hyperbolic level sets of equal payment, with the sign flip at rate = 0 splitting payers from receivers; mark price held at 50,000 for a long position.
References
Derived from and adversarially verified against the Exchange's Rust implementation and its test suite.
Sibling model: insurance-fund
Sibling model: liquidation-engine
Sibling model: margin-math
Sibling model: oracle
Sibling model: order-book
Sibling model: position-tracker
Sibling model: settlement
Last updated

