Fees
There are 4 types of fees on Jupiter Perps:
- A flat 0.06% (6bps) base fee, applied on notional position size.
- A price impact fee, simulating the orderbook impact given notional size.
- Borrow fee, paid hourly on open positions, based on notional size.
- Transaction & Priority fee to create trade requests.
Base Fees
A flat rate of 0.06% of the position amount is charged when opening or closing a position. This base fee is also charged when a position is closed partially.
Calculating Base Fees
Position size * 0.06% = Base Fee
Price Impact Fee Example
Price Impact Fees
Large trades on the Jupiter Perpetuals exchange inherently incur no price impact since token prices are sourced from price oracles. While this is favourable for traders, it poses risks to the Jupiter Liquidity Pool (JLP).
- Large, profitable trades can put stress on the liquidity pool’s reserves.
- The platform becomes more vulnerable to potential order manipulation.
To address these risks, Jupiter Perpetuals implements a price impact fee. This fee is designed to simulate trading conditions in traditional exchanges, where larger orders typically experience more price slippage due to limited liquidity at each price level.
Benefits of Price Impact Fees
Trader Incentives:
The fee encourages traders to consider the size of their trades, where larger trades will incur higher price impact fees. Also, splitting large orders to smaller sizes can expose traders to price changes between updates from the oracle.
Fair Compensation to JLP Holders:
JLP Pool receives trading fees, whether traders open large trades or split them up. This keeps the liquidity pool balanced and protects it from excessive depletion.
Market Integrity:
The fee structure mimics traditional order book dynamics, where the fee is proportional to the impact a trade might have on the market, making the environment fairer for both traders and liquidity providers.
Calculating Price Impact Fees
Price Impact Fee Example
Borrow Fees
On the Jupiter Perpetuals exchange, traders can open leveraged positions by borrowing assets from the liquidity pool. Unlike other exchanges that charge funding rates, Jupiter Perps uses a borrow fee system. The borrow fees compound hourly based on the amount borrowed for the leveraged position.
Borrow fees are continuously accrued and deducted from your collateral. This ongoing deduction has two important consequences:
- Your effective leverage increases over time as your collateral decreases.
- Your liquidation price moves closer to the current market price.
It's crucial to regularly monitor your borrow fees and liquidation price. Failure to do so may result in unexpected liquidation, especially during periods of high market volatility or extended position duration.
The hourly borrow rates for JLP assets can be retrieved from the Borrow rate field of the Jupiter Perpetuals trade form or fetched onchain via the custody account's funding_rate_state.hourly_funding_dbps
field. Note that these rates represent the maximum charged at 100% utilization.
Dual Slope Model
Jupiter's hourly borrow fee is calculated using a dual slope model that adjusts based on the custody's utilization rates. For each custody, the model defines a target utilization level.
When utilization is below the target level, the borrow rate is lower which incentivizes traders to borrow from the pool, thus increasing utilization and yield for the JLP. Once utilization exceeds the target level, the borrow rate increases aggressively.
Benefits of Dual Slope Model
Incentivizing Trading Opportunities
Low utilization results in a lower borrow rate, incentivizing traders to borrow from the pool which increases utilization and yield for the JLP.
Risk Mitigation
High utilization results in a higher borrow rate, incentivizing traders to reduce their position size as the higher borrowing costs outweigh potential returns, preventing excessive leverage and overutilization of the JLP's assets; while also incentivizing additional liquidity providers to enter the market.
Incentivizing Liquidity Provisioning
High borrow rates also incentivize additional liquidity providers to enter the market, which benefits the traders with more liquidity in the pool.
Calculating Borrow Fees
The dual slope model uses four parameters to calculate the borrow rate:
- Minimum rate: The lowest borrow rate, applied at 0% utilization
- Maximum rate: The highest borrow rate, applied at 100% utilization
- Target rate: The borrow rate when utilization reaches its target level
- Target utilization: The optimal utilization level for the custody
Calculating Borrow Rate
Calculating Utilization Rate
Hourly Borrow Fee Example
How does the Jupiter Perpetuals contract calculate borrow fees?
Funding rate
There is no funding rate for Jupiter Perps. The Jupiter Perps platform does not behave like a standard futures platform where longs pay shorts (or vice-versa) based on the funding rate, since traders borrow from the JLP Pool which incurs a borrow fee.
Example Trade
Suppose a trader wants to open a 2x long SOL position at a position size of $1000 USD by depositing $500 USD worth of SOL as a collateral and borrowing $500 USD worth of SOL from the pool. Assume the hourly borrow rate for SOL is 0.012%.
Initial Position Value | $1000 |
---|---|
Initial Deposit | $500 |
Borrowed Amount | $500 |
Leverage | 2x |
Initial SOL Price | $100 |
Utilization Rate | 50% |
Hourly Borrow Rate | 0.012% per hour |
Position Opening Fee | 0.06% * $1000 = $0.6 |
The trader keeps this position open for 2 days, and the price of SOL appreciates by 10%.
Final Position Value | $1100 |
---|---|
Final SOL Price | $110 |
Holding Period | 2 days (48 hours) |
Position Closing Fee | 0.06% * $1100 = $0.66 |
The borrow fee accumulated throughout this period can be calculated as:
Hourly Borrow Fee = Tokens Borrowed/Tokens in the Pool * Hourly Borrow Rate * Position Size
Total Borrow Fee = 50% * 0.012% * 1000 * 48 = $2.88 USD
The trader's final profit can be calculated as:
Final Profit = Final Position Value - Initial Position Value - Borrow Fee - Opening Fee - Closing Fee
$1100 - $1000 - $2.88 - $0.6 - $0.66 = $95.86
The trader gets a final profit of $95.86 USD after this trade.
Calculating Programmatically
This code repository contains the examples on calculating the different fees programmatically.
References
Jupiter is working with experts like Chaos Labs and Gauntlet to optimize and maintain a fair, safe and competitive environment by analyzing different fee structures and their impact on the exchange. Here are some of the references on the recommendations.