Impact Bid Price = The average fill price to execute the Impact Notional on the Bid side
Impact Ask Price = The average fill price to execute the Impact Notional on the Ask side
The Impact Margin Notional (IMN) for USDT-Margined Contracts is the notional available to trade with 200 USDT worth of margin (price quote in USDT), IMN is used to locate the average Impact Bid or Ask price in the order book.
The maximum leverage FxDex perpetual contract is 25x, and its corresponding Initial Margin Rate is 4%, then the Impact Margin Notional (IMN) is 5000 USD, and the chain will take an IMN of 5000 USD every minute in the order book to measure the average Impact Bid/Ask price.
Mark Price = Avg Oracle Price
Premium Index (P) = (Max(0, Impact Bid Price - Mark Price) - Max(0, Mark Price - Impact Ask Price)) / Spot Price
Avg Premium Index is the Time Weighted Average Premium Index, FxDex will calculate and record AvgP every minute.
AvgP = (1 * P_1 + 2 * P_2 + 3 * P_3 +...+ 480 * P_480) / (1 + 2 + 3 +···+ 480)
Funding Rate = Avg Premium Index+ clamp (Interest Rate - Avg Premium Index , 0.05%, -0.05)
clamp() is a bounding function:
funding rate is equal to interest rate if (interest rate - avg premium index rate) is within +/- 0.05
Funding periods are: 5.5 hrs, 6.5hrs and 8hrs.