On the delivery day of the delivery contract, the contract market price will return to the index price, and the perpetual contract has not expired or delivered. It is necessary to use the "capital cost mechanism" to anchor the contract price to the spot price.
Collection of Funding Fees
The perpetual contract is one period every 8 hours, and the settlement is made at the end of each period. The settlement is made on the hour every day, and the settlement is made three times a day at 00:00, 08:00, and 16:00. The above times are GMT+8 time.
Funding fees are only charged or paid for users who hold positions at settlement; no funding fees are charged or paid if positions are closed before settlement.
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 receive the funding fee; when the funding rate is negative, the long position will receive the funding fee, and the short position will pay the funding fee.
Funding fees are settled entirely between users, and the platform does not charge any fees from them.
Funding cost calculation
Funding fee = position value * funding rate
Position value = position number * face value * mark price
Calculation of Funding Rate
The funding rate is designed to ensure that the trading price of the perpetual contract closely follows the underlying reference price. The funding rate of each period, calculated from the data of the previous period, has been determined at the beginning of the current period, will not change during the period, and will be applied to the settlement of funding fees at the end of the current period. The forecast funding rate for the next period will also be calculated every minute in this period, and the last calculated forecast funding rate in this period will be used as the funding rate for the next period.
For example, the funding rate for this period from 08:00 to 16:00 is calculated from the data of the previous period from 00:00 to 08:00, and it has been determined at 08:00 and settled at 16:00. use. At the same time, during the period from 08:00 to 16:00, a forecast funding rate will be calculated every minute. The forecast funding rate is from 16:00 to 00:00 the next day. The predicted funding rate is used as the funding rate for the period from 16:00 to 00:00 the next day.
The funding rate consists of two parts: the comprehensive interest rate and the premium.

Comprehensive interest rate
Perpetual contracts are composed of two currencies: the underlying currency and the denomination currency. For example: BTCUSDT perpetual contract, the underlying currency is BTC, and the denomination currency is USDT.
Interest rate of the underlying currency: the daily lending rate of the underlying currency in the market. If the underlying currency of the BTCUSDT contract is BTC, the interest rate of the underlying currency is the daily lending rate of BTC.
Denominated currency interest rate: the daily lending rate of the denominated currency in the market. If the denominated currency of the BTCUSDT contract is USDT, the interest rate of the denominated currency is the daily lending rate of USDT.
Comprehensive interest rate = (interest rate of denominated currency – interest rate of underlying currency) / funding rate settlement frequency
At present, the interest rate of all perpetual contracts is 0.06% for the denominated currency, the interest rate for the underlying currency is 0.03%, and the frequency of funding rate settlement is 3 times (3 settlements per day). Therefore, the current comprehensive interest rate of all perpetual contracts is 0.01%.
2. Premium:
Perpetual contracts may have a premium or discount relative to their 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 higher the premium, the higher the funding rate, and the more motivated the bears are to go short; the lower the premium, the smaller the funding rate, and the more motivated the bulls are to go long. By raising or lowering the funding rate, the contract price is brought back to a relatively reasonable level.

1 .Funding rate basis rate Funding rate basis rate, which reflects the basis difference generated by the funding expenses of the current period. Funding rate basis rate = current funding rate * (time interval between current time and current settlement / settlement cycle) For example, the current BTC perpetual contract funding rate is 0.01%, the current time is 8:30, the current settlement time is 16:00, that is, there are 7 hours and 30 minutes before settlement, and the settlement cycle is 8 hours (every 8 hours settlement once), then the current funding rate basis rate = 0.01% * ( 450 / 480 ) = 0.009375%

2 .Reasonable price The reasonable price is the relatively reasonable reference price of 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) If the current BTC index price is 10000 USDT and the BTC perpetual contract funding rate basis rate is 0.005%, then the current BTC perpetual contract reasonable price = 10000 * ( 1 + 0.005% ) = 10000.5 USDT.

3 .Depthweighted bid/ask prices Depthweighted bid price refers to the average buy order price of contracts with cumulative pending orders reaching N USDT starting from the first tier of buying orders according to the current market pending order situation.
The depthweighted ask price refers to the average selling order price of the contract where the accumulated pending order volume reaches N USDT starting from the first tier of the selling order according to the current market pending order situation.
Among them, the value range of N: 8000USDT, that is, Sum (Pending order price * Pending order quantity) = 8000 USDT

1 .Premium Index The premium index reflects the current premium generated by the combined effect of the funding rate basis rate and the deviation of the depthweighted bid/ask price relative to the reasonable price. Premium Index = [ Max ( 0 , DepthWeighted Bid Price – Fair Price) – Max ( 0 , Fair Price – DepthWeighted Ask Price)] / Index Price + Funding Rate Basis Rate; It can be seen from the formula: a) When the depthweighted selling price ≥ the reasonable price ≥ the depthweighted buying price, the premium index = Funding rate basis rate b) When the depthweighted ask price > the depthweighted bid price > the fair price, the premium index = (depthweighted bid price – fair price) / index price + funding rate basis rate c) When the reasonable price > the depthweighted ask price > the depthweighted bid price, the premium index = (depthweighted ask price – reasonable price) / index price + funding rate basis rate The premium index is calculated every minute.

2 .Average Premium Index The current average premium index is the arithmetic mean of all current premium indices in the last hour. For example, during the period of 8:009:00, the average premium index at 8:30 is the arithmetic mean of all premium indices at 7:308:30; the average premium index at 9:00 is 8:009: 00 Arithmetic mean of all premium indices. Average premium index, calculated every minute.
The forecast funding rate for the next period is jointly determined by the comprehensive interest rate and the average premium index. The formula is as follows:
Predicted funding rate for the next period = clamp (average premium index + clamp (comprehensive interest 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, clamp is an interval limiting function. When the target value exceeds the upper and lower limits, only the boundary value is taken. For 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.
Comprehensive interest rate – the average premium index, limited by the upper limit of the premium deviation and the lower limit of the premium deviation, between the two; the final forecast funding rate for the next period is limited by the upper limit of the funding rate and the lower limit of the funding rate, between the two between. The specific parameters are as follows:
The premium deviates from the cap
The premium deviates from the lower bound
Funding rate cap
Funding rate minimum
0.05%
0.05%
0.375%