Funding Rates & Funding Fees
The PayFundingRate is the Funding Rate for payers, and the ReceiveFundingRate is calculated based on the long-short ratio.
Funding fees are fully complemented between traders. MMs can earn the excess and will not bear the shortfall.
PayFundingRate=24SakeperpPriceTWAP−OracelPriceTWAP
If
PayFundingPositionSize>ReceiveFundingPositionSize
Then
ReceiveFundingRate=PayFundingRate PayFundingRate∗(PayFundingPositionSize−ReceiveFundingPositionSize) to the MM pool
ELSE
ReceiveFundingRate=ReceivePositionSizePayFundingRate∗PayPositionSize