The price of the traditional futures contract may change with the spot price. This spread is what we often call the basis. When the futures contract is close to the delivery date, the basis will be close to zero. Since the perpetual contract is not delivered, the funding cost mechanism is used to anchor the market price of the perpetual contract to the spot price.**Collection of Funding Rate**

Funding costs are charged every 8 hours, and the collection time is at 08:00, 16:00 and 24:00 (HKT) every day. Only when holding positions at these moments, holders would need to pay or collect funds. If the position is closed before the cost is collected, no funding cost would be required.**Calculation of Funding Rate**

Funding rate consists of two parts: interest rate and premium/discount. This rate is designed to ensure that the transaction price of the perpetual swap contract closely follows the underlying reference price. In this way, swap contracts are similar to the spot market for margin trading, where buyers and sellers exchange funding rates regularly.**The funds you paid or received are calculated as follows:**

Funding cost = position value * funding rate

Position value = contract size *face value * latest mark price

The value of your position has nothing to do with leverage. When the funding rate is positive, longs pay shorts. When the funding rate is negative, shorts pay longs.

If Xiao Ming holds 100 long contracts with a contract face value of 0.001BTC, the current mark price of the BTC perpetual contract is 8000USDT, and the funding rate is 0.01%, then the funding fee that Xiao Ming needs to pay is 0.001*100*8000*0.01%=0.08USDT**Interest Rate Component**

The interest rate depends on the base currency and the borrowing rate of the pricing currency itself.

Interest rate (I) = (invoicing rate index -base interest rate index) / funding rate interval

Deepcoin uses a fixed interest rate in the funding rate. By default, the interest rate is set to 0.00% per day , and may be adjusted based on market factors such as the federal funds rate.**Premium/Discount Component**

Sometimes, the price of a perpetual swap contract has a significant premium or discount compared to the mark price. In this case, the premium index will be used to increase or decrease the next funding rate to make it in line with the current level of swap contract transactions. It is calculated as follows: Premium Index (P) = (Max (0, depth-weighted buying price-mark price)-Max (0, marked price-depth weighted bid price)) / spot price + reasonable basis of mark price**Depth Weighted Bid/Ask Price**

The depth-weighted bid price refers to the average buy order price of N contracts starting from the first tier of the buy order based on the current market order status.

The depth-weighted ask price refers to the average selling price of N contracts with the cumulative number of pending orders starting from the first tier of the selling order based on the current situation of pending orders.

Among them, the value range of N: 80 BTC perpetual contracts, and 800 other currency contracts.**Calculation of The Final Funding Rate**

Deepcoin calculates the premium index every minute, and then calculates its minute time weighted average every 8 hours. Funding rate is calculated based on the interest rate and premium/discount part every 8 hours. Add +/- 0.05% buffer.

Funding rate (F) = premium index (P) + clamp (interest rate (I)-premium index (P), 0.05%, -0.05%)

Therefore, if (I-P) is between +/-0.05%, then F = P + (I-P) = I. In other words, as long as the premium index is between -0.04% and 0.06%, the funding rate will be equal to 0.01% (interest rate).

Funding rate limit Deepcoin caps the funding rate to ensure that the highest leverage can be used. In order to do this, we have added two restrictions: The absolute upper limit of the funding rate is (initial margin-maintenance margin) * 75%.

If the initial margin is 1% and the maintenance margin is 0.5%, the maximum funding rate will be 75% * (1%-0.5%) = 0.375%. The funding rate shall not change more than 75% of the maintenance margin during the fund interval.

Deepcoin Team

## Comments

0 comments

Article is closed for comments.