funding_fee = nominal_value * funding_rate
nominal_value = mark_price * contract_size
funding_rate = premium_index + clamp(interest_rate - premium_index, 0.05%, 0.05%)
premium_index(P) = Max(0, Impact Bid Price - Price Index ) - Max(0, Price Index - Impact Ask Price) / Price Index
impact_bid_price = The average fill price to execute the Impact Margin Notional on the Bid Price Impact
ask_price = The average fill price to execute the Impact Margin Notional on the Ask Price
The clamp function ensures the value to the right of the + may not be greater than 0.05% or less than -0.05%?