# Funding Rate

The funding rate is the price rebalancing mechanism of the perpetual contract. Unlike traditional futures that need to be delivered when the futures expire (the delivery futures will be delivered at the index price, so the futures price will eventually return to the index price), the perpetual contract has no expiration or delivery, so it needs to use the funding rate mechanism to let the futures price anchor the spot price.

## Funding Fee Settlement Rules

Every 8 hours is a period, and settlement will be made at the end of each period. Settlement 3 times a day, namely 00:00, 08:00, 16:00 (GMT+8).

Only users who hold positions at the time of settlement need to charge or pay funding fees. If the position has been closed before the settlement, no funding fees will be charged or paid.

At the time of settlement, whether the user should charge or pay the funding fee is determined by the current funding rate and the user's position. When the funding rate is positive, the long position will pay the funding fee, and the short position will charge the funding fee; When the funding rate is negative, a long position will be charged a funding fee, and a short position will be charged a funding fee. The funding fee is completely settled between users, and the platform will not charge any fees for it.

> Example:&#x20;
>
> When Bitcoin continues to rise, most people prefer long positions. At this time, the future price is 30,000, and the spot price is only 29,500, so the price has deviated. If the funding rate is calculated to be 0.15%, the long positions will be paid 0.15% of the nominal value of the positions to the short positions every 8 hours. Because short positions are profitable, many people will buy BTC to charge a funding fee of 0.15% every 8 hours. This short-selling arbitrage behaviour will cause the future price to go back down, allowing it to return to the spot price.

The settlement of the funding fee is carried out in units of positions and is directly added or deducted from the position margin.

The funding fee charged is in the same currency as the margin. The position that is charged is the position that is judged to be a price deviation.

> Funding fee = position value \* funding rate&#x20;
>
> Position value = size \* contract size \* mark price

## Funding Rate Calculation

The funding rate consists of two parts: composite rate and premium.

### Composite Rate

A perpetual contract consists of two currencies: the underlying currency and the quote currency. For example: BTCUSDT perpetual contract, the underlying currency is BTC, and the quote currency is USDT.

Underlying currency interest rate: The daily lending rate of the underlying currency in the market. For example, the underlying currency of the BTCUSDT contract is BTC, and the interest rate of the underlying currency is the daily lending rate of BTC.

Quote currency interest rate: The daily lending rate of quote currency in the market. For example, the quote currency of the BTCUSDT contract is USDT, and the interest rate of the quote currency is the daily lending rate of USDT.

> Composite rate = (quote currency interest rate – underlying currency interest rate) / funding rate settlement frequency

Currently, the quote currency interest rate of all perpetual contracts is 0.06%, the underlying currency interest rate is 0.03%, and the funding rate settlement frequency is 3 times (3 settlements per day). Therefore, the base composite rate of all current perpetual contracts is 0.01%.

### Average Premium Index

The perpetual contract may have a premium or discount relative to its reasonable price. We use the premium index to measure the premium of the contract and add it to the calculation of the funding rate.

The premium index is an important parameter of futures. The higher the premium, the higher the funding rate; the lower the premium, the lower the funding rate. By raising or lowering the funding rate, the contract price will return to a relatively reasonable level.

**Funding Rate Basis Rate**

The **Funding Rate Basis** reflects the decaying premium of the current funding cycle over time. It is calculated as:

> **Funding Rate Basis = Latest Funding Rate × (Time Remaining Until Settlement / Settlement Interval)**
>
> **Example:**
>
> For the **BTCUSDT perpetual contract**:
>
> * Current funding rate = **0.01%**
> * Current time = **08:30 (UTC+8)**
> * Next settlement time = **16:00 (UTC+8)**
> * Time remaining = **7.5 hours (450 minutes)**
> * Settlement interval = **8 hours (480 minutes)**
>
> **Funding Rate Basis**\
> \= 0.01% × (450 / 480)\
> \= **0.009375%**

**Reasonable Price**

The reasonable price is a relatively reasonable reference price for the perpetual contract calculated based on the current spot index price and the current funding rate basis rate.

> Reasonable price = index price \* (1 + funding rate basis rate)&#x20;
>
> For example, if the current BTC index price is 10,000 USDT, the funding rate basis rate of the BTC perpetual contract is 0.005%. Then the current reasonable price of BTC perpetual contract = 10000 \* ( 1 + 0.005%) = 10000.5 USDT.

**Depth-Weighted Bid/Ask Price**

Depth-weighted bid price refers to the average buy order price of contracts whose cumulative pending order volume reaches N USDT starting from the first tranche of the buy order based on the current order status.

> Among them, the value range of N: 8000USDT, namely SUM (pending order price \* pending order quantity) = 8000 USDT

**Premium Index**

#### **Premium Index Calculation (Updated Every 5 Seconds).**&#x54;he **Premium Index** reflects the deviation between the depth-weighted bid/ask prices and the index price, measuring the current market premium/discount.

> **Premium Index = \[Max(0, Depth-Weighted Bid Price − Index Price) − Max(0, Index Price − Depth-Weighted Ask Price)] / Index Price**

**a) When Depth-Weighted Ask Price ≥ Index Price ≥ Depth-Weighted Bid Price:**

> Premium index = 0

**b) When Depth-Weighted Ask Price > Depth-Weighted Bid Price > Index Price:**

> Premium Index = **(Depth-Weighted Bid Price − Index Price) / Index Price**

**c) When Index Price > Depth-Weighted Ask Price > Depth-Weighted Bid Price:**

> Premium Index = **(Depth-Weighted Ask Price − Index Price) / Index Price**

**Average Premium Index**

The **Average Premium Index** is calculated every 5 seconds by applying **time-weighted averaging** to all premium index values within the current funding fee cycle.

> **Example:**
>
> * **Funding fee settlement cycles:** 00:00, 08:00, 16:00 (UTC+8)
> * **Current time:** 08:10 (10 minutes into the cycle)
> * **Number of premium index samples (updated every 5 sec):** 120 (12 per minute × 10 minutes)
> * **Time-weighted formula:**\
>   **Average Premium Index = (1×P₁ + 2×P₂ + 3×P₃ + ··· + 120×P₁₂₀) / (1 + 2 + 3 + ··· + 120)**\
>   \&#xNAN;*(Where **P₁** = First premium index, **P₂** = Second, etc.)*

### Funding rate

The funding rate is jointly determined by the composite rate and the average premium index, and the formula is as follows:

> Funding rate = clamp (average premium index + clamp (composite rate – average premium index, premium deviates from the upper limit, premium deviates from the lower limit), funding rate upper limit, funding rate lower limit)

Among them, the clamp is an interval-limiting function. When the target value exceeds the upper and lower limits, only the boundary value will be taken.

> Example:&#x20;
>
> clamp(a, max, min), when a > max, the result is max; When a < min, the result is min; when max ≥ a ≥ min, the result is a.
