Funding
Funding keeps a perpetual's price near its index. Longs pay shorts when the rate is positive, and shorts pay longs when it is negative. It is paid every hour.
The rate
premium = (max(impact bid - index, 0) - max(index - impact ask, 0)) / index
8h rate = average premium + clamp(0.01% - average premium, -0.05%, +0.05%)
1h rate = 8h rate / 8, never beyond +/-0.5% an hour- The impact prices are what it would cost to buy or sell a set notional in the book right now.
- The premium is averaged over the hour from samples taken when the price is applied.
0.01%per eight hours is the interest part.
How it is charged
The market keeps a running index. A position settles against it the next time it is touched, for exactly the time it was held, so nothing is owed for an hour you were not in.