Skip to main content

Funding Fee

In perpetual trading, the funding fee serves to balance the market: Perpetual contracts often aim to track the spot price of an asset. When the price of the contract deviates from the spot price, a funding fee is used to bring the contract's price back in line with the spot market. The funding fee is paid by either side of the traders, helping to maintain the contract's price close to the spot market price.


Objectives

The concept of funding fee derives from traditional finance. Since the late 1990s, fees known as "make and take fees" have been in existence. These fees originated as a response to the Securities and Exchange Commission's (SEC) adoption of their Order Execution Guidelines. Electronic Communication Networks (ECNs) implemented a requirement for participants to pay in order to access order flow. In a formal context, the SEC defines make and take fees as charges associated with non-marketable, resting orders that provide liquidity at a specific price and receive a rebate when executed, while incoming orders that utilize this resting liquidity are subject to an access fee.

In the realm of decentralized finance, funding fees are periodic payments imposed on traders engaged in perpetual futures contracts. Since perpetual futures have a key property of having no expiration, the primary purpose of the funding fee is to converge the contract price with the index price so that lasting divergence in the price is prevented.


Mechanism

In order to balance long and short demand, which are reflected through OI, either long or short traders will pay funding fees, depending on their positions. Funding rate in Jungle is recalculated every hour. If the funding rate is positive, long position holders will pay the funding fee to the platform, and if negative, short position holders will pay. The funding fee charged by platform will be kept in the treasury to cover potential losses of LPs caused by long/short balancing.

Jungle Echange’s funding rate calculation identifies the four key factors: market activity reflected by open interest, market volatility, market sentiment, and exchange-specific edge case factors. Hence we design the funding fee mechanism as below:

  1. Goal: To ensure fair pricing and incentivize traders to maintain balanced positions for healthy market dynamics.

  2. Formula:


FundingRate=[(2x1)5y/100+0.00001]×100%FundingRate=[{(2x-1)}^{5}y/100+0.00001]\times 100\% x=TotalNotionalValueonLongPositionValue/OpenInterestx=TotalNotionalValueonLongPositionValue/OpenInterest y=Min{OpenInterest/TotalEffectiveLiquidityAvailableforOrders,1}y=Min\{ {Open\, Interest/Total\, Effective\, Liquidity\, Available\, for\, Orders,1\} }
  1. Realization: For each one-hour-epoch, Funding Rate will be reset and recalculated. For each user, upon entry, Funding Rate within the last 8-hour-epoch will be taken into account to prevent potential losses caused by market manipulation and malicious attacks:

FundingRate= last 8 h Funding Rate =18×i=last8hFundingRateFunding Rate =\overline{\text { last } 8 \text { h Funding Rate }}=\frac{1}{8} \times \sum_{i=last \,8 \,h}Funding Rate
  1. Range: The upper and lower limits of the funding fee rate determine its adjustment capabilities. In markets with high volatility and a tendency for one-sided movements, a larger range is needed. Conversely, mature and well-balanced markets like BTC only require a smaller range, such as -0.5% to 0.5%. This reflects the market's ability to self-regulate and ensures that funding fees don't become excessive.

Edge case

The collection of funding fees affects collateral, primarily by reducing it. This, in turn, affects the liquidation price. Furthermore, it is essential to note that the imposition of funding costs should not, by itself, trigger liquidation events. Thus, it necessitates a prudent allocation of buffer reserves when deducting funding fees. The edge case buffer mechanism works as follows:

  1. Funding fee will not be fully deducted if: a. FundingRate>Margin/(PositionSize×MarkPrice)MMR|FundingRate|>Margin/(PositionSize\times MarkPrice)-MMR

  2. The actual funding rate deducted instead: a.FundingRate=k×(Margin/(PositionSize×MarkPrice)MMR)FundingRate=k\times (Margin/(PositionSize\times MarkPrice)-MMR) b.where k ∈ [0,1), adjusted as per contract rules. Initially, we set k0{k}_{0} =2/3.

  3. For the party paying funding fees, there is flexibility in the deduction process. Initially, available funds in the user's wallet balance or idle capital in Market Maker Pools can be utilized. If these resources are insufficient, funding fees can be deducted from the position's margin.

  4. For the party receiving funding fees, these should be distributed proportionally based on the value of their position in relation to the overall position value.