Funding rate on WhiteBIT Futures market

The formula

Please note:  in case of extreme market conditions or inability to perform proper calculations, WhiteBIT reserves the right to apply a different rate than the calculations described below.
The cap and floor values are determined according to risk-management protocols and can differ across various markets. These limits are selected to maintain fairness and stability in funding, even when market volatility is high.

 

The standard Interest Rate for markets with an 8-hour interval is 0.01%

I = 0.01% / (8 / fundingPeriodInHours)

Fraw = TWAP + clamp(I - TWAP, Cmin, Cmax)

Ffinal = clamp(Fraw, Ffloor, Fcup)

where:

Fraw funding rate before cap/floor limits applied

Ffinal – funding rate

TWAP – time-weighted average premium index 

I – interest rate

Cmin, Cmax clamp min and max values

clamp(value, min, max) - a function that restricts a value to a specific range, defined by a minimum and a maximum (see more explanation below)

Premium index

It is the value that reflects the price difference between a futures contract and its underlying asset:

Premium Index (P) = (max(0, Pbid − Pindex) − max(0, Pindex − Pask)) / Pindex

where:

Pbid – impact bid price

Pask – impact ask price

Pindex – index price

max(value1, value2) - function returns the greater of the two input values

In other words, Pbid > Pindex results in a positive premium index, and Pask < Pindex means a negative premium index.

Time-weighted average premium index 

The premium index is calculated every minute. The time-weighted average is calculated as follows:

TWAP = (P1 * 1 + P2 * 2 … Pn * n) / i=1ni

where

P1…Pn premium indexes collected during this funding period

n – number of last time series in this calculation

i=1ni also n * (n + 1) / 2

Example:

Funding period is set to 480 minutes, and now it is 16:04 UTC, so n=4

TimePremium indexWeight
16:010.00011
16:020.0042
16:030.0083
16:04-0.00014

TWAP = (0.0001 * 1 + 0.004 * 2 + 0.008 * 3 + (-0.0001 * 4)) / (1+2+3+4) 

= 0.0317 / 10 

= 0.00317

Funding rate at this moment will be:

F = 0.00317 + clamp(0.0001 - 0.00317, -0.0005, 0.0005)

= 0.00317 + clamp(-0,00307, -0.0005, 0.0005)

= 0.00317 + (-0.0005)

= 0.00267

Impact ask/bid price

Impact Bid Price is the average price at which an order of the Impact Margin Notional can be filled at the current bid depth.

Impact Ask Price is the average price at which an order of the Impact Margin Notional can be filled at the current ask depth.

It is basically calculated as a weighted average price:

Impact Price = IMN / sum(amount)

where:

IMN – impact margin notional

sum(amount) - the sum of the amounts of the n orders in the order book, where the cumulative sum of their totals equals the IMN

Let's say Impact Margin Notional is set to 10000 USDT, and we need to calculate the impact ask price while we have the following order book:

Order in the order bookPrice, USDTAmountTotal (price*amount)
1100505000
2100.50303015
3101.20606072

We sum up the full 1st and 2nd orders' amount and what is left to get 10000 from the 3rd order:

AmountPriceTotalCumulative value
5010050005000
30100.5030158015 (now it is only 1985 left to reach IMN)
≈19,6101.20≈1.98510000

Hence, the amount to cover IMN is 99.6 = 50+30+19.6.

Then, Impact Ask Price is 100.402 = 10000 / 99.6

Index price

The index price is calculated as a weighted average of the spot price on several exchanges:

Pindex = (Pe_1 * We_1 + … + Pe_n * We_n) / (We_1 … + We_n)

where:

Pe_1…Pe_n – price on designated exchanges

We_1…We_n – weight of the designated exchanges

The price of the underlying asset on each exchange is taken as Mid Price, which is calculated via the following formula:

Pe_n = (Best Bid + Best Ask) / 2

Example:

Let's assume that three exchanges (A, B, and C) are used to calculate the Index Price for the BTC_PERP market:

ExchangeMid priceTrading volume
A1000006000
B1005005000
C995004000

With the Mid Price and Weight for each exchange, we can calculate the Index Price:

Index Price = (100000 * 6000 + 100500 * 5000 + 99500 * 4000) / (6000 + 5000 + 4000)

≈ 100033.33

Clamp function

The clamp function keeps a number within a specific range. If the number is higher than the allowed maximum (Cmax) it returns the maximum (Cmax) If it's lower than the allowed minimum (Cmin), it returns the minimum (Cmin). Otherwise, it returns the number unchanged.

Funding period

The funding period describes the frequency with which the exchange calculates the funding rate.  The value is set in minutes and available via API /api/v4/public/futures.

Under extreme market conditions, WhiteBIT reserves the right to adjust the funding period with the intention to set the futures contract price closer to its index price.

Clients will be notified about such changes in a reasonable time to adjust their trading strategies in a proper way.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request