## Funding Fee Settlement Rules

Example: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 pay 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.

Funding fee = position value * funding ratePosition value = size * contract size * mark price

# Funding Rate Calculation

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

### Composite Rate

**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.

### Average Premium Index

**Funding Rate Basis Rate**

Funding rate basis rate = funding rate of the current period * (time interval from the current time to the settlement of the current period/settlement cycle)Example:The current BTC perpetual contract funding rate is 0.01%. The current time is 8:30, and the settlement time for this period is 16:00. That is, there are still 7 hours and 30 minutes before the settlement. The settlement cycle is 8 hours (settlement every 8 hours), then the current funding rate basis rate = 0.01% * ( 450 / 480 ) = 0.009375%.

**Reasonable Price**

Reasonable price = index price * (1 + funding rate basis rate)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**

**Premium Index**

Premium index = funding rate basis rate

b) When depth-weighted ask price > depth-weighted bid price > reasonable price:

c) When reasonable price > depth-weighted ask price > depth-weighted bid price:

**Average Premium Index**

Example:During the period from 8:00 to 9:00, the average premium index at 8:30 is the arithmetic mean of all premium indices from 7:30 to 8:30; The average premium index at 9:00 is the arithmetic mean of all premium indices from 8:00 to 9:00.

## Funding rate

Example: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.

The specific parameters are as follows:

- Premium deviation from the upper limit: 0.05%
- Premium deviates from the lower limit: -0.05%
- The lower limit of the funds rate: 0.375%
- The lower limit of the funds rate: -0.375%