Funding Rates
Perpetuals futures have no expiry date, final settlement, or delivery. As such, funding rate payments are used as the incentive mechanism to bring the perpetual futures’ mark price in line with the oracle price.
(For instance, a user with a long position in a market whose mark price is, on average, below the oracle price will receive a payoff proportional to their position size).
| Field | Description |
|---|---|
| Funding Rate % Calc | 1/24 \* (market_twap - oracle_twap)/oracle_twap, plus the floor and dead-zone described below |
| TWAP Parameters | EMA with span = 1 hour |
| Mark TWAP Calc | (bid TWAP + ask TWAP) / 2 |
| Frequency | End of Hour* (9:00 AM, 10:00 AM, …) |
Funding Floor and Dead Zone
Velocity always adds a baseline offset to the funding premium so funding never fully flattens to zero: the floor is 10.95% annualized (FUNDING_RATE_OFFSET_DENOMINATOR = 3333).
On top of the floor, each market has a continuous dead zone around zero divergence, rather than the flat per-tier clamp used elsewhere:
fundingClampThreshold(default 5 bps of the oracle TWAP): while|mark_twap − oracle_twap|stays inside this band, it’s treated as noise and the premium collapses to the floor-only value.fundingRampSlope(default 1.0×): once the spread exceeds the threshold, the excess is shrunk by the threshold and then scaled by the ramp slope, so the premium leaves the dead zone smoothly instead of jumping by the full threshold at the boundary.
Both are per-market and admin-configurable (update_perp_market_funding_dead_zone).
Note: this dead zone can also be delayed at large oracle divergences (see Oracles). Individual Market TWAP updates utilize the side of the book for trade executions, Bid and Ask TWAPs in the market are calculated and/or estimated on every trade.
Funding Bias Spread Widening
While the AMM is on the paying side of funding (i.e. its inventory means it owes the offset-floor funding rather than receiving it), each market can widen the AMM’s quote on that paying side via AMM.fundingBiasSensitivity (s, admin-set via update_perp_market_funding_bias_sensitivity) — up to 1 + s/100 at the funding offset floor. This makes it costlier to trade further into the side the AMM is already paying funding on. Default is 0 (off); enabling it doesn’t change quotes until sensitivity is set above zero.
*If no market trades and/or funding update calls occur within the first ~20 minutes of the hour, the next funding update will be delayed an additional hour.
Unrealised -> Realised Funding
-
Funding rates are updated lazily every hour.
-
Any time a user opens or closes a position, the exchange tries to update the funding rate.
-
The funding rate will still be updated if enough time has passed and no position has been opened or closed.
-
The update will reflect the premium or discount between the AMM’s mark price and the oracle’s price TWAP over the previous hour.
-
The cumulative funding rate is checked against user positions in case the off-chain funding rate bot does not trigger on the hour. This will show up as “Unrealised P&L” until your next user action within the market (such as a trade, deposit, withdraw etc.), see also P&L.
-
Funding payments may not pay out for markets that trade infrequently.
Capped Symmetric Funding
Velocity aims to provide a symmetric funding rate to both sides of the market. When there is a long-short imbalance within the AMM, the AMM’s own retained equity (total_fee_minus_distributions — its accumulated fees and trading PnL net of what it’s already paid out) covers the cost delta between longs and shorts.
Each funding period, the AMM can spend at most 1/3 of its retained equity paying asymmetric funding. If the imbalance would cost more than that, the payout side’s funding rate is capped so the AMM’s retained equity never goes negative — the receipts for funding will be capped to the available amount. This budget lives entirely inside the AMM’s own books; the Insurance Fund is never drawn on to cover a funding shortfall.
As the AMM collects more fees over time, its retained equity — and therefore its funding budget — grows, so any existing predicted capped rate should move closer to being balanced.
Example:
For SOL-PERP you can check the recent history to get a better idea of what shorts will receive.
Oracle Resilience
Velocity’s on-chain calculation of a market’s oracle TWAP is updated only on trades which incorporates the oracle’s confidence interval and a few interpolations to provide the most accurate and resilient value.
Read more about protective checks in Oracles.
APR calculation
Funding rates can be showcased in annual terms for easier comparison.
-
APR (annual percentage rate) is calculated
rate x 24 x 365.25 -
APY is calculated
(1 + rate) ^ (24 x 365.25) - 1
One can approximately track APY by allocating funding receipts back into the position (excluding fees/rebates).