Funding Rate

I. Overview

Funding fees are a mechanism designed to ensure that the price of perpetual futures contracts aligns closely with their underlying asset's spot market price. These fees are periodically exchanged between traders holding long and short positions to incentivize the convergence of the futures price with the spot price.

· Funding fees are exchanged every hour between holders of long and short positions. The funding rate, which dictates the fee exchange, fluctuates in real-time.

· Only traders holding positions at the time of settlement are liable to either pay or receive funding fees.

· The calculation of the funding fees is based on the position value at the time of settlement, using the formula:

Funding fee = Position size * Index price * Funding rate

· Funding intervals (1h, 2h, 4h, 8h) vary by trading pair.

II. How Funding Rate Is Calculated

The funding rate consists of two parts: Interest Rate (I) and Average Premium Index (P).

Funding rate (F) = Average premium index (P) + Clamp (Interest (I) - Average premium index (P), 0.05%, -0.05%)

Hence, if (I - P) is within the range of ±0.05%, then F = P + (I - P) = I. In other words, the funding rate will equal the interest rate.

1. Interest (I)

Formula

Interest (I) = (Quote currency interest rate - Base currency interest rate) / Funding frequency

· Quote currency interest rate: The interest rate for borrowing the quote currency

· Base currency interest rate: The interest rate for borrowing the base currency

· Funding frequency = 24 / Funding interval (hour)

2. Average Premium Index (P)

Formula

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

· Impact bid price: The average fill price to execute the Impact Margin Notional on the Bid side.

· Impact Ask Price: The average fill price to execute the Impact Margin Notional on the Ask side.

· Impact margin notional (IMN) is the notion available to trade with a certain amount of margin. It's used to determine how deep the order book is and to measure the impact bid or ask price.

SunX calculates the average premium index (P) every minute by performing an N-hour Time-Weighted-Average-Price (TWAP) over the series of minute rates. (N = Funding interval) The closer to the funding fee settlement time, the greater the weight of the premium index.

Taking a 4-hour funding interval as an example, the average premium index (P) is calculated using the formula:

(Premium index a * 2 + Premium index b * 2 +... + Premium index n * 240) / (1 + 2 +... + 240).

III. Summary

SunX calculates the premium index (P) and the interest rate (I) every minute, and then performs an N-hour Time-Weighted-Average-Price (TWAP) over the series of minute rates. Funding rates (F) adopt a damping mechanism of ±0.05% based on the average value to mitigate fluctuations.

Funding rates (F) are applied to a trader's position value to determine the funding fee to be paid or received at the funding timestamp.

Last updated