Perpetual futures contracts don’t have an expiration date, settlement, or delivery. Instead, funding fees create incentives drive the price closer to the mark price.
Every hour, for each open position in a market, participants pay clampedFundingRate * markPrice * positionSize
in the direction from long positions to short positions.
markPrice
is the external oracle mark price, at the instant of funding.positionSize
is the base size of the position.clampedFundingRate
is the clamped hourly funding rate, as determined below.If this value is positive, then the long positions will pay the short positions. If this value is negative, then the short positions will pay the long positions. Funding payments are considered realized P&L and immediately reflected in an account’s wallet balance.
An endpoint is available to view funding fee payments.
The funding rate is made up of two components: The average premium index over the last hour, and a fixed interest-rate.
fundingRate := averagePremium / fundingIntervalDivisions + clamp(interestRate - averagePremium, interestRate - interestDamping, interestRate + interestDamping)
averagePremium
is the average premium index over the past hour, measured each minute.interestRate
is a fixed interest rate for the contract.interestDamping
damps the value of the funding rate near the interest value.fundingIntervalDivisions
is a fixed value for the contract to slow down funding payments.All of these parameters are available in the market specifications.
If the premium index is within interestDamping
of the interestRate
, the funding rate will be equal to the interestRate
. If the premium index is greater than interestDamping
from the interest rate, the funding rate will equal the averagePremium / fundingIntervalDivisons
shifted by interestDamping
towards the interestRate
.
Finally, the funding rate is clamped.
clampedFundingRate = clamp(fundingRate, -maxFundingRate, maxFundingRate)