Driftprotocol funding rates
Drift Protocol’s v2 perpetual markets on Solana used funding payments to encourage contract prices to track an oracle reference. Payments depended on averaged price differences, position size, and the applicable rate adjustments and safeguards. The original Drift program is paused following the April 1, 2026 exploit; its funding mechanics are historical.
How the price gap affected funding
Neodyme’s 2024 audit of Drift Protocol v2, updated June 27, 2024, described hourly funding based on time-weighted perpetual and oracle prices. A time-weighted average price, or TWAP, reflects observations across a period. A single current quote does not provide the same input.
A perpetual TWAP above the oracle TWAP pushed the price-gap component toward longs paying shorts. A lower perpetual TWAP pushed it in the opposite direction. The audit described the transfer as roughly the price difference over 24 hours for each base token in a position.
The unadjusted hourly price-gap relationship can be expressed as
hourly_gap_rate = (perpetual_twap - oracle_twap) / oracle_twap / 24
. Both prices must use the same units. The result is a fraction; multiplying it by 100 expresses it as a percentage.
This relationship describes the gap component. Oracle-validity safeguards, value clamps, and the applicable funding adjustments also affected the final rate. The final signed rate determined which side paid and which side received.
The offset depended on the code version
The
migration guide for Velocity SDK 0.20.0
identifies its fork point as Drift SDK
v2.163.0-beta.0
. In that code comparison, it records an increase in the annualized funding offset setting from 7.3% in Drift to 10.95% in Velocity. The 7.3% figure belongs to the Drift code at that fork point. It is an annualized calculation parameter, not a promised return to a position holder.
What determined the position’s funding amount
Funding scaled with the perpetual position’s base-asset quantity. Collateral supported the account’s margin, while the position quantity determined its funding exposure. A percentage funding rate therefore needs the corresponding position exposure to become a payment amount. Historical Drift mainnet used USDC as its quote asset.
Trading fees arose from executed fills. Funding concerned perpetual positions across funding periods. Borrow interest and deposit yield belonged to the lending markets’ separate accounting, even when those balances shared an account with perpetual positions.
Reading a saved v2 funding record
The
legacy Drift v2 API reference
describes
fundingRate
in quote-asset-per-base-asset units. It needs both a precision adjustment and normalization by
oraclePriceTwap
before it becomes a percentage. When positions were imbalanced, fundingRateLong and fundingRateShort could differ from fundingRate. A position’s payment used the rate for its side.
| Stage | Operation | Unit and interpretation |
|---|---|---|
| Read the matching inputs |
Take
fundingRate
and
oraclePriceTwap
from the same market’s funding record.
|
The funding amount and reference price must describe the same record. |
| Scale the funding amount |
funding_amount = fundingRate / 1e9
|
Quote asset per base asset for the recorded funding interval. |
| Scale the oracle price |
oracle_price = oraclePriceTwap / 1e6
|
Quote asset per base asset, expressed as a price. |
| Normalize by the price |
rate_fraction = funding_amount / oracle_price
|
A dimensionless funding rate for that interval. |
| Express the rate as a percentage |
rate_percent = rate_fraction * 100
|
A percentage rate, rather than an account’s settled payment amount. |
| Archive boundary | The legacy reference states that its S3 flat-file archives stopped updating in January 2025. Those files cannot establish funding rates for subsequent periods. | |
Driftprotocol funding rates: How Drift v2 funding worked
- How the price gap affected funding
- What determined the position’s funding amount
- Reading a saved v2 funding record
Converting units preserves the record’s funding interval. It does not annualize the rate. An annualized display extrapolates a rate across a longer period without establishing what later funding rates will be.
Why Velocity funding needs separate rules
Velocity is a fresh Solana deployment forked from Drift v2. Its migration guide states that the Drift program is paused and that account state does not carry over. The mainnet quote asset changed from USDC to USDT.
Velocity’s documented funding model includes a per-market dead zone and ramp slope, alongside the 10.95% annualized offset setting. These parameters describe the new deployment. Reconstructing an older Drift v2 payment requires the applicable Drift version and market records.
Updated