Funding
Overview
Funding is the mechanism that converges perpetual contract prices toward the underlying index price.
- Positive rate: longs pay shorts
- Negative rate: shorts pay longs
Funding is a peer-to-peer transfer between counterparties, not an exchange fee.
Funding Rate
At each settlement interval:
The clamp bounds the per-interval funding rate to ±1% (hourly cap). The premium index is averaged over a 1-hour rolling window of 60 one-minute samples. The divisor 8 is the standard 8h-to-1h scaling convention, not the window size.
Premium Index
Computed from impact prices:
Impact prices are simulated execution prices for a predefined impact notional, not top-of-book quotes. This filters out thin-quote noise and measures executable dislocation at meaningful depth.
If book depth is insufficient to compute impact prices, index-based fallbacks are applied per market rules.
Funding Payment
Per settlement event:
Sign convention:
- Positive payment: account pays
- Negative payment: account receives
Worked Example
Scenario
Long position of 0.5 BTC-PERP at funding settlement.
Inputs
| Input | Value |
|---|---|
| Position size | 0.5 |
| Mark price | 60,000 |
| Funding rate | +0.01% (0.0001) |
Calculation
Settlement Outcome
Funding payment = +3 USDC, so the long account pays 3 USDC for this funding event.
Operational Considerations
- Funding accrual and settlement timing are defined per market.
- Use the
modefield to determine exactly which operations are allowed (see Market Lifecycle). Theenabledandpost_onlyboolean fields are legacy; prefermodefor all operation checks.
Funding Telemetry for Integrators
Use market metadata and WebSocket streams to pre-compute carry impact:
- Funding interval configuration and next settlement timing
- Predicted upcoming funding direction and magnitude
- Real-time funding updates from market-data channels
For carry-sensitive strategies, monitor predicted funding jointly with mark-vs-index divergence and open-interest saturation.
For exact field names and stream payloads, see: