Funding Calculation
Funding Fee:
F: Amount received/paid
R: 8-hour rate
B: Net position (+, -)
X: On-chain price;
T: Interval time between funding fees (8 hours)
The funding rate is updated every minute and paid on an 8-hour basis.
Funding Rate (R) Calculation:
where:
: Clamp(x, min, max) represents when X<min, then X=min; if x>max, then X=max; If ,then return X.
: A dampening factor, D=0.05%
: Interest Rate = 0.01%
: maintenance margin rate
: Premium Rate
Premium Rate Calculation:
We need to calculate the premium first to get the funding rate R. The premium rate is calculated every minute based on the current distribution of price in the order book:
At the end of every 8-hour period, we first calculate the premium of each minute(Premium(mins)), and then take the arithmetic mean of the sum of Premium(mins) to get the 8-hour premium(Premium(hours)).
where:
Index Price: Off-chain price, the average of the index prices of major exchanges
Impact Bid Price: Calculated based on Impact notional value (INV) of the bid-side order book
Impact Ask Price: Calculated based on the Impact notional value (INV) and the ask-side order book
Impact Notional Value(INV): A system default effective impact amount. Different trading pairs may have different INV. Current INV is
Impact Ask Price calculation:
Ask-side order book
1
2
3
...
...
...
...
...
n
Find the first X level such that , e.g. If the first level satisfied the condition, then the Impact Ask Price = .
Impact Ask Price:
Impact Bid Price Calculation:
Similar to the impact ask price calculation.
Last updated