Funding Payment
A walkthrough of how funding payment works and how it is calculated
Funding payments are used to incentivise counterparties to trade perpetuals closer to the spot price.
The funding rate is calculated based on the index price (the price of the spot or reference price) and mark price (market price) for the perpetual. When the rate is positive (perpetual trades at a premium relative to the index), long traders will make payments to short traders. While shorts make payments to longs when the rate is negative (perpetual trades at a discount relative to the index).
This mechanism ensures that both parties are incentivized to add/close positions and thus bring the perpetual price closer to the index price.
In an order book setting since a contract will always have two counterparties, the payment is always exchanged between them. Traders make or receive payments in proportion to the size of their market position.
In the case of a VMM structure, since any party long or short can open a trade, the counterparty is always the protocol. In this case, the total long positions and total short positions need not be equal and will be skewed in the direction of the price. This will impose risk on the protocol or insurance fund to pay/receive the balance amount. To avoid this fluctuation and the risk to the insurance fund a different mechanism is used.
Funding payments will always be exchanged between longs and shorts on the platform irrespective of the skew. Protocol won’t be a participant in this mechanism. Therefore longs and shorts will have a separate funding rate based on the skew in open positions and total funding payment to be exchanged.
In an extreme case where there are no longs or shorts open, funding rate will be 0% and no funding payments will be exchanged.

Calculating funding payment

The funding payment is exchanged every hour based on the formula below:
Hourly TWAP (Time Weighted Average Price) is used here for computation.
The funding rate is clamped between -0.05% and 0.05%
The price feed from Chainlink is used as the data source for the index price.

Example

Let's say the funding rate for a given period is calculated to be 0.04%. Since the funding rate is positive, longs will pay shorts.
​
Total Longs Notional = $10,000
Total Shorts Notional = $1,000
​
Total Funding Payment paid by Longs = $10,000 * 0.04% = $4
Total Funding Payment received by Shorts = $4
​
Realised Funding Rate (Longs) = 0.04%
Realised Funding Rate (Shorts) = Funding Payment/Total Notional = $4/$1,000 = 0.4%

Funding Rate FAQs

When is the funding payment made?

Funding payment is exchanged between longs and shorts at the end of each hour.

Who will make the funding payment if there are only longs or shorts with open positions?

Such cases are an extreme event and no funding payment will be exchanged