Funding Rates
Funding rates are a critical mechanism in perpetual futures markets that ensures the convergence of perpetual contract prices with their underlying spot market prices. This document explains the purpose, implementation, and technical details of how funding rates work on Ethereal.
Perpetual markets use hourly funding to keep prices aligned with spot. When funding is positive, longs pay shorts; when negative, shorts pay longs. Payments occur every hour on the hour, with rates calculated based on the premium or discount to the index price. Current funding rates are displayed at the top of each market in hourly, daily, and annualized formats, alongside a dedicated chart displaying the historical funding rates.

Basis Calculation
The basis measures the premium or discount between the perpetual market and the underlying spot price (index) provided by Pyth Lazer. The system captures basis measurements at random intervals throughout each hour. These samples are averaged at hour's end to produce the funding rate.
A configurable notional impact size (e.g., 100k USD for BTC) determines price bounds by simulating market impact:
Upper bound: Average execution price when the impact size consumes liquidity on asks
Lower bound: Average execution price when the impact size consumes liquidity on bids
Basis calculation:
If index price is within the bounds:
basis = 0If index price > upper bound:
basis = index_price - upper_boundIf index price < lower bound:
basis = lower_bound - index_price
Sampling occurs at random intervals throughout the hour to prevent manipulation.
Hourly Rate
At hour's end, the collected basis measurements are averaged. The rate then passes through three adjustments:
Dead zone: Basis values within ~0.01bps (hourly) of zero are clamped to zero, filtering noise from minor deviations
Baseline rate: A small positive baseline is added to create a slight bias toward longs paying shorts, incentivizing short liquidity provision
Cap: The final rate is capped at ~25bps (hourly) to limit extreme funding events
Funding payments are applied to realized PnL at the end of each hour, proportional to position size.
For positive rates:
For negative rates:
The baseline APR serves as a minimum funding cost that helps maintain market stability. Currently, all markets are configured with a 15% APR baseline funding.
Using the determined rate and current spot price, we calculate the charge per unit in USD:
This charge is then applied to each position based on its size and direction. Once calculated and applied, funding charges are relayed and settled sequentially onchain. Processing is sequential; If a funding charge occurred at 13:00:00 and a trade at 13:00:01, the funding will always be relayed before the trade.
Charge Retries & Edge Cases
Funding charges may occasionally fail to apply due to technical reasons. While rare, the exchange will retry the funding charge application for the first 15 seconds of the current hour. If all retry attempts fail, that hour's funding is discarded and not applied retroactively. This ensures the system can handle transient failures while maintaining operational integrity.
Last updated