The funding rate is represented by the formula below:
TWAP (Premium, 1 hour, 1 second) *ɑ) + (Previous Funding Rate) * (1-ɑ)
Where
Premium = (Mark price - Index Price) / Index Price / 24
ɑ = smooth / (n + 1);
smooth = 6;
n = number of previous periods used = 7 (funding interval)