Funding

Unlike other derivatives, perpetual futures never expire. To tether the price of the perp to the spot asset, traders pay hourly funding based on the deviation.

The payment amount is determined by the funding rate. If the perp price is higher than the spot price, then the funding rate is positive and longs pay shorts; if the perp price is lower than the spot price, then the funding rate is negative and shorts pay longs. Significant deviations in either direction cause proportionally higher funding rates.

Funding is entirely peer-to-peer, VDEX does not charge a funding fee.

Formulas

Funding Rate

Variables

  • pOracle = spot price

  • pImpact = order book impact price

  • s = position size

  • d = premium deviation

Formulas

d = (max(pImpactBid - pOracle, 0) - max(pOracle - pImpactAsk, 0))/pOracle

8-Hour Funding Rate (F) = dAverage + clamp (0.0001 - dAverage, -0.0005, 0.0005)

Funding Payment = s * pOracle * F

Methodology

The deviation between the perp price and spot price is measured through d. This is done through the impact and oracle prices respectively. The impact price is like the mid price, but incorporates order book depth.

d is sampled every 5 seconds and averaged over the hour, creating dAverage. This value represents the relative difference between the perp price and spot price, so a dAverage of -0.01 means the perp trades 1% below spot.

The funding rate tracks dAverage while filtering out small deviations. The clamp applies an interest rate of 0.0001 and bounds of ±0.0005, producing a baseline funding rate of 0.01% when dAverage remains within ±0.05%. The interest rate represents the difference in cost to borrow USD versus spot crypto, defaulting to longs paying shorts. The clamp ensures that the funding rate is predictable and stable under normal market conditions.

Due to precedent, the 8-hour funding rate is calculated. However, funding is paid and displayed hourly. The results in a baseline rate of 0.00125%.

Example
  • The interest rate is 0.01%

  • The spot price of XAU is $3,000

  • The impact price of the perpetual is $2,985; 0.5% below spot

  1. Calculate the premium deviation, dAverage

    d = (max(pImpactBid - pOracle, 0) - max(pOracle - pImpactAsk, 0))/pOracle

    d = (max(2985 - 3000, 0) - max(3000 - 2985, 0))/3000

    d = (0 - 15)/3000 = -0.5%

    dAverage=1720i=1720did_{\text{Average}} = \frac{1}{720} \sum_{i=1}^{720} d_i , sampled every 5 seconds

  2. Calculate the clamped difference

    clamped difference = min(max(0.01% - dAverage, -0.05%), 0.05%)

    clamped difference = min(max(0.01% - (-0.5%), -0.05%), 0.05%)

    clamped difference = min(max(0.51%, -0.05%), 0.05%)

    clamped difference = min(0.51%, 0.05%) = 0.05%

  3. Calculate the Funding Rate, f

    8-Hour Funding Rate (F) = dAverage + clamp (0.01% - dAverage, -0.05%, 0.05%)

    8-Hour Funding Rate (F) = -0.5% + 0.05%

    8-Hour Funding Rate (F) = -0.45%

    1-Hour Funding Rate = -0.05625%

Last updated