# 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= \frac {SakeperpPriceTWAP-OracelPriceTWAP}{24}
$$

\
**If**

&#x20; $$PayFundingPositionSize>ReceiveFundingPositionSize$$&#x20;

Then

$$
ReceiveFundingRate=PayFundingRate
$$

$$
PayFundingRate ∗ (PayFundingPositionSize − ReceiveFundingPositionSize)
$$

to the MM pool



**ELSE**

$$
ReceiveFundingRate= \frac {PayFundingRate*PayPositionSize}{ReceivePositionSize}
$$

\
