The following steps are followed to determine funding rate:
Fair Impact Bid/Ask
Calculate average fill prices for a set notional amount on both the bid and ask sides.
Fair Price
Take the median of:
Average of Fair Impact Bid/Ask
Average of best bid/ask
Last traded price
Index Price
A weighted average from several external exchanges.
Premium
Computed every second:
Premium = Fair_Price – Index_Price
Premium Rate
The median of
(Premium / Index_Price)
over the past minute.Updated every minute.
Capping the Rate
Limited to ±1% (configurable) to prevent extreme funding swings.
Cap_Rate = 0.01 (1%, configurable) - this is the max payment, in % of your position.
Capped Premium Rate = Max( Min(Premium Rate, Cap_Rate),
-Cap_Rate )
Funding Index
Tracks cumulative funding changes, starting at 0.
Updated every minute:
Funding_Index += Capped_Premium_Rate * (Index_Price) / (8 * 60)
e.g.
Funding_Index_1 = Funding_Index_0 + Capped_Premium_Rate * (Index_Price) / (8 * 60)
Funding Payment
Triggered whenever a position changes size (due to trades, transfers, deposits, etc.).
If your position size was
Last_Position_Size
and the Funding Index isF
, then:Funding_Payment = -1 × (Last_Position_Size) × (F - Funding_Index_Start)
Afterward,
Funding_Index_Start
is updated to the current Funding Index if you still have a position, or reset to 0 if you fully closed it.A note on the sign convention for Funding Payments in the "Funding History" tab of the UI : a negative number in the "Funding Amount" column (e.g. like in the screenshot below) indicates that user is paying ( a reduction in user's USDT Balance), and a positive amount indicates that user is receiving payment ( an increase in user's USDT Balance).
for more details, see this PDF and this Excel file