Funding Payments

An overview of how funding payments and their calculation

Funding payments are a mechanism used in perpetual futures markets to ensure that the mark price (the current price of the asset on the exchange) of the perpetual contract remains anchored to the index price (the underlying asset's spot price). In a perpetual protocol, these payments are exchanged between long and short position holders and can fluctuate based on market conditions. Here are the main reasons funding payments are used:

  • Price Convergence: Funding rates encourage the mark price to converge with the index price. When the perpetual price is higher than the spot price, long position holders pay short position holders, making it costly to hold long positions and incentivizing traders to sell or short, which can help lower the mark price towards the index price.

  • Fair Market Conditions: They prevent the market from being skewed too far in one direction for too long. If many traders are long (buying), funding rates become positive, and these traders will have to pay funding to the short (selling) traders, which could encourage some long traders to close their positions, creating a more balanced market.

  • Speculation and Hedging Balance: By penalizing the overcrowded side of the market, funding rates balance the speculative nature of perpetual contracts with the needs of those using them for hedging. This creates a more stable and sustainable trading environment.

  • Incentive Mechanism: In essence, funding rates serve as an incentive mechanism that rewards traders for taking on the risk of holding positions that may be contrary to the majority. This can provide liquidity to the market where it's needed.

Calculating Funding Payments

The funding payments are settled every hour. Unlike nftperp v1, where insurance fund had a role in funding, the funding in nftperp v2 is purely peer to peer and similar to funding in other centralized perpetual swaps.

  1. Determine the daily premium: It's calculated as the difference between mark and index price:

premium=markโˆ’indexpremium= mark - index
  1. Determine the hourly premium: As nftperp collects the premium every hour, the daily premium has to be divided by 24.

premiumPerHour=premium/24premiumPerHour=premium/24
  1. Determine the Funding Rate: The premium per hour is divided by the indexPrice to get the funding rate.

fundingRate=premiumPerHour/indexfundingRate=premiumPerHour/index
  1. Compute the Funding payment: The funding payment for a specific position is determined by multiplying the fundingRate with the position size.

fundingPayment=fundingRateโˆ—positionSizefundingPayment= fundingRate*positionSize

Funding is paid by both AMM LPs and Traders.

Last updated