Perpetual funding fee mechanism

Published on Dec 21, 2020Updated on Jun 3, 20267 min read

At OKX, our perpetual futures adopt a funding fee mechanism designed to align the market price of the perpetual market with the index price.

When the funding rate is positive, traders with long positions pay a funding fee to traders with short positions. Conversely, when the funding rate is negative, traders with short positions pay a funding fee to traders with long positions. Note that our platform only facilitates the exchange of funds between traders and doesn’t charge any service fees under this mechanism.

The funding fee will be charged or paid out every 8 hours (00:00, 08:00, and 16:00 UTC) by default, unless specified otherwise (i.e. every 1, 2 or 4 hours). For each perpetual futures contract, fees are assessed within milliseconds and trading won’t be interrupted. You’re obligated to pay or receive the funding fee if you hold open positions at the point of fee assessment. If you close your position before the funding fee assessment, you’re exempt from paying or collecting the fee. Additionally, if a perpetual futures contract is delisted before the assessment, the current cycle’s funding fee becomes void. The actual fee assessment may take up to a minute. For example, if you open a position at 00:00:20 UTC, you could still be subject to the funding fee (either collecting or distributing the funding fee) if the fee assessment has yet to end.

The funding fee settlement time and funding rate cap/floor may be adjusted in real-time according to market conditions.

Funding rate calculation

Funding rate = clamp [ ( Average premium index + clamp ( Interest rate − Average premium index, 0.05%, −0.05% ) ) / ( 8 / N ), Funding rate cap, Funding rate floor ]

  • Interest rate = 0.01% (fixed across all settlement intervals)

  • N = the contract's funding settlement interval, in hours. Supported values are N ∈ {1, 2, 4, 8}. The (8 / N) divisor normalizes the per-period rate so that the daily-equivalent funding cost remains consistent across all supported settlement cycles.

  • Effect of the 8 / N interval factor by settlement cycle:

    • 8h cycle (N=8): ÷ 1

    • 4h cycle (N=4): ÷ 2

    • 2h cycle (N=2): ÷ 4

    • 1h cycle (N=1): ÷ 8

  • For more information on the cap and floor, refer to this page.

  • Premium index = [Max (0, Impact bid price – Index price) – Max (0, Index price – Impact ask price)] / Index price

  • The average premium index is calculated using a weighted moving average of the premium index over the last settlement interval.

    • For example: Average premium index at Tn = (1 × Premium index at T1 + 2 × Premium index at T2 + ... + n × Premium index at Tn) / (1 + 2 + ... + n). Assuming the settlement interval of a perpetual futures contract is 8 hours, the funding rate at 07:59 will be calculated using the premium index for every minute between 00:00 to 07:59. In other words, n = 480.

  • Impact bid/ask price is the average fill price to execute the impact value on the bid/ask price.

    • Impact bid/ask price = Impact value / Total base amount required to meet impact value

      • Impact value = 200 × Max leverage allowed for this perpetual

  • The funding rate used to calculate the funding fee during fee assessment will be the most recent funding rate that was calculated in the previous minute before fee assessment.

    • For example, the fee assessment at 16:00 will use the funding rate calculated at 15:59.

Impact bid price calculation using BTCUSDT perpetual as an example:

Assuming impact value = 20,000 USDT

Bid order book level

Bid price

Base amount in each order book level (BTC)

Calculation

1

90,000

0.02

Value of orders up to this level = 90,000 × 0.02 = 1,800 USDT

The entire base amount of 0.02 BTC at this level will be used for impact bid price calculation.

2

89,900

0.06

Value of orders up to this level = Value of orders in bid 2 + Value of orders in bid 1 = 89,900 × 0.06 + 1,800 = 7,194 USDT

The entire base amount of 0.06 BTC at this level will be used for impact bid price calculation.

3

89,700

0.16

Value of orders up to this level = Value of orders in bid 3 + Value of orders in bid 1 and 2 = 89,700 × 0.16 + 7,194 = 21,546 USDT

Impact value required for this level = 20,000 – 7,194 = 12,806 USDT

Amount required from this level (BTC) = 12,806 / 89,700 = 0.14276 BTC

Impact bid price = 20,000 / (0.02 + 0.06 + 0.14276) = 89,780.8 USDT


Impact ask price calculation using BTCUSDT perpetual as an example:

Ask order book level

Ask price

Base amount in each order book level (BTC)

Calculation

1

90,000

0.02

Value of orders up to this level = 90,000 × 0.02 = 1,800 USDT

The entire base amount of 0.02 BTC at this level will be used for impact ask price calculation.

2

90,100

0.06

Value of orders up to this level = Value of orders in ask 2 + Value of orders in ask 1 = 90,100 × 0.06 + 1,800 = 7,206 USDT

The entire base amount of 0.06 BTC at this level will be used for impact ask price calculation.

3

90,200

0.16

Value of orders up to this level = Value of orders in ask 3 + Value of orders in ask 1 and 2 = 90,200 × 0.16 + 7,206 = 21,638 USDT

Impact value required for this level = 20,000 – 7,206 = 12,794 USDT

Amount required from this level (BTC) = 12,794 / 90,200 = 0.14184 BTC

Impact ask price = 20,000 / (0.02 + 0.06 + 0.14184) = 90,154.9 USDT

Worked example — 1-hour-cycle perpetual

Assume a perpetual contract with a 1-hour settlement cycle (N = 1) and an average premium index of 0.10% in the latest settlement window.

  • Interest rate = 0.01% (fixed)

  • Interest − Premium = 0.01% − 0.10% = −0.09% → clamped to −0.05%

  • Pre-divisor rate = 0.10% + (−0.05%) = 0.05%

  • Funding rate = 0.05% / (8 / 1) = 0.00625% per 1-hour period (assume within funding rate cap/floor)

Funding fee calculation

Funding fee = Position value × Funding rate

USDT-margined/USDC-margined perpetual futures

Position value = Number of contracts × Contract size × Contract multiplier × Mark price

Example:

You have a long position of 10 BTCUSDT perpetual futures contract with a current mark price of 60,000 USDT, 0.01 BTC face value per contract, and the funding rate is 0.1%.

Position value = 60,000 × 10 × 0.01 × 1 = 6,000 USDT

Funding fee (platform collects) = 6,000 × 0.1% = 6 USDT

Crypto-margined perpetual futures

Position value = Number of contracts × Contract size × Contract multiplier / Mark price

Example:

You have a short position of 100 ETHUSD Perpetual contracts with a current mark price of 4,000 USD, 10 USD face value per contract, and the funding rate is 0.1%.

Position value = 100 × 10 × 1 / 4,000 = 0.25 ETH

Funding fee (platform distributes) = 0.25 × 0.1% = 0.00025 ETH

Collection and distribution of funding fees

Funding fees are settled directly between users holding long and short positions. OKX does not collect or retain any portion of the funding fee.

Funding Fee Collection

The full funding fee will be deducted from the paying user's position. A reduction in account equity following deduction may trigger position size reduction or liquidation.

  • Isolated margin mode: The funding fee is deducted from the isolated margin of the position. No pending orders will be cancelled upon deduction.

  • Cross margin mode (Single-currency, Cross-currency, Portfolio margin): The funding fee is deducted from the currency equity of the cross margin account. No pending orders will be cancelled upon deduction.

Funding Fee Distribution

The full funding fee will be credited to the receiving user's position.

  • Isolated margin mode: The funding fee is credited to the isolated margin of the position.

  • Cross margin mode (Single-currency, Cross-currency, Portfolio margin): The funding fee is credited to the currency equity of the cross margin account.