🧾Fee Breakdown

Open and Close Fee

These fees are charged when opening and closing positions.

  • 1–100x Leverage

    • Open Fee: 0.045% of position size

    • Close Fee: 0.045% of position size

  • 500x, 750x, 1000x Leverage

    • Open Fee: N/A

    • Close Fee: 0.03% of position size or 15% of profit (whichever is higher)

For RWA trading pairs, both open and close fees are reduced to 0.02% of position size.


Execution Fee

Free


Holding Fee

The Holding Fee is charged upon closing a position. It depends on position size and the duration for which it is held:

Holding Fee = Position Size × Entry Price × Seconds Held × Holding Fee Rate Per Second


Funding Fee

Funding Fees are designed to balance Long and Short Open Interest (OI) They may be paid or received depending on your position:

  • When Long OI > Short OI → Longs pay, Shorts earn.

  • When Long OI < Short OI → Longs earn, Shorts pay.

Funding Fees are:

  • Calculated every second and adjusted dynamically.

  • Accrued during the lifetime of a position and reflected in its unrealized PnL.

  • Directly affect the liquidation price.

  • Fully reconciled when the position is closed.

Funding Fee and Holding Fee are combined and displayed as Funding Fee.


Base Interest Rate

The parameter fundingFeePerSecondP represents the base interest rate per second. It is reported by an off-chain Keeper, which retrieves daily closing prices from the Pyth API and calculates volatility-based rates.

Formula for annualized base interest rate:

Base Interest Rate = k × HV

Where HV = Annualized Historical Volatility.

Converted to a per-second rate:

Base Interest Rate Per Second = Base Interest Rate ÷ (365 × 24 × 3600)


Basic Funding Rate

The basic funding rate per second is calculated using Long/Short OI and the base interest rate:

Basic Funding Rate (Explanation)

The basicFundingRatePerSecond is determined based on the difference between Long and Short Open Interest (OI).

  1. When Long OI ≠ Short OI

    • First, calculate:

      • basicFundingRatePerSecond = baseInterestRatePerSecond × (Long OI – Short OI) ÷ max(Long OI, Short OI)

    • Then apply boundary conditions:

      • If the absolute value of basicFundingRatePerSecond is smaller than minFundingFeeR, set it to minFundingFeeR.

      • If the absolute value of basicFundingRatePerSecond is greater than maxFundingFeeR, set it to maxFundingFeeR.

  2. When Long OI = Short OI

    • The basicFundingRatePerSecond = 0.

In summary: The funding rate is calculated from the imbalance between Long and Short OI, adjusted by the base interest rate, and constrained within a minimum and maximum range. If Long OI and Short OI are equal, the funding rate is zero.


Interpretation:

  • A positive value means Longs pay Shorts.

  • A negative value means Shorts pay Longs.

The variable baseInterestRatePerSecond (also called fundingFeePerSecond) represents the baseline funding fee rate in a one-sided market (where either Long OI or Short OI = 0).

Last updated