Base Fee
A flat rate of 0.06% is charged on the trade size when opening or closing a position. This means the base fee is also charged on:
- Liquidations
- Take Profit / Stop Loss Orders
- Limit Orders
Example fee calculation:
- Trade size: $10,000
- Base fee (0.06%): $6
Calculating the base fee programatically
This code snippet contains an example on calculating open and close base fees.
Price Impact Fee
When trading on Jupiter Perpetuals, large trades don't incur price impact due to the use of oracle prices. This means the price shown to the trader is the price the trade is executed at.
This is different compared to orderbook exchanges where the trader's price may be worse if their trade size is large, as their trade will take up orders on the orderbook which leads to a worse entry price (slippage).
While this benefits traders, it is risky for JLP holders (the liquidity providers for Jupiter Perpetuals) as they are exposed to potential loss from earning less fees from large trades. It also opens up the possibility for attackers to target Jupiter Perpetuals by moving prices on other exchanges and opening positions in Jupiter Perpetuals to profit from the price movement because price impact fees are not charged.
To address this, Jupiter Perpetuals implements a price impact fee, which simulates the price impact on traditional exchanges (price changes due to limited liquidity at each price level when large trades take up orders on the orderbook).
Linear price impact fee
A linear price impact fee is charged on the trade size. This means that the linear price impact fee increases as the trade size increases. Each custody (SOL, ETH, BTC) has a fixed constant value (the price impact fee scalar) that determines the final linear price impact fee coefficient, which is calculated by:
- Linear price impact fee coefficient = trade size / price impact fee scalar constant
- Final linear price impact fee = trade size * linear price impact fee coefficient
The price impact fee scalar constant can be found in each custody account's pricing.tradeImpactFeeScalar value:
- SOL: https://solscan.io/account/7xS2gz2bTp3fwCC7knJvUWTEU9Tycczu6VhJYKgi1wdz#accountData
- BTC: https://solscan.io/account/5Pv3gM9JrFFH883SWAhvJC9RPYmo8UNxuFtv5bMMALkm#accountData
- ETH: https://solscan.io/account/AQCGyheWPLeo6Qp9WpYS9m3Qj479t7R636N9ey1rEjEn#accountData
NOTE: The pricing.tradeImpactFeeScalar value is scaled to BPS format in the custody accounts. To calculate against the trade size in dollar amounts, the scalar value would be divided by 10_000 to match the dollar amount
Example calculation for a SOL trade:
- Trade size: $10,000
-
Linear price impact fee scalar constant (at the time of writing): 1_250_000_000_000_000 / 10_000 = 125_000_000_000 (scaled down by
10_000as the original value is scaled to BPS) - Linear price impact fee coefficient = 10_000 / 125_000_000_000 = 0.00_000_008;
- Final linear price impact fee = 10_000 * 0.00_000_008 = $0.0008
Calculating the linear price impact fee programatically
This code snippet contains an example on calculating price impact fees programmatically.
Consult the initial proposal below by Chaos Labs to understand the linear price impact fee in depth:
Additive price impact fee
In addition to the linear price impact fee, Jupiter Perpetuals also charges an additive price impact fee (charged on top of the linear price impact fee).
The additive price impact fee is charged when the open interest delta imbalance (the difference between long open interest and short open interest) skews heavily towards one side.
Each asset (SOL/ETH/BTC) has a fixed open interest delta imbalance threshold that must be hit before the additive price impact fee is charged. This can be accessed in each asset's custody account in priceImpactBuffer.deltaImbalanceThresholdDecimal:
- SOL: https://solscan.io/account/7xS2gz2bTp3fwCC7knJvUWTEU9Tycczu6VhJYKgi1wdz#accountData
- BTC: https://solscan.io/account/5Pv3gM9JrFFH883SWAhvJC9RPYmo8UNxuFtv5bMMALkm#accountData
- ETH: https://solscan.io/account/AQCGyheWPLeo6Qp9WpYS9m3Qj479t7R636N9ey1rEjEn#accountData
The additive fee is calculated as a penalty that scales based on the ratio of the open interest imbalance to the predefined threshold. If the imbalance is below the threshold, the additive penalty is zero.
The formula for the penalty is:
This penalty is then added to the linear price impact fee, and the total is capped by a Max Fee.
Example Additive Price Impact Fee Calculation
Assume a trader places a $10,000 SOL long trade that brings the SOL open interest imbalance to $2,000,000.
- Trade Size: $10,000
- New OI Imbalance: $2,000,000
-
SOL Parameters (at time of writing):
-
tradeImpactFeeScalar: 1.25e9 (or 1,250,000,000 in dollar terms) -
deltaImbalanceThreshold: $750,000 -
maxPriceImpactFee: 50 bps (0.50%) -
factorandexpare also defined per-custody.
-
1. Calculate the Linear Price Impact Fee
NOTE: This is the same calculation as in the section above
- Linear Fee Coefficient = $10,000 / 1,250,000,000 = 0.000000008
- Linear Fee (USD) = $10,000 * 0.000000008 = $0.00008
2. Calculate the Additive Penalty Fee
The imbalance of $2,000,000 is greater than the $750,000 threshold, so the penalty is applied. First, calculate the additive price impact fee in BPS:
The price impact fee BPS is then multiplied by the trade size to find the fee in USD:
3. Calculate the Final Price Impact Fee:
The final fee is the sum of the two components, capped at the max fee:
Calculating Additive Price Impact Fees Programatically
The code snippet below shows how to calculate the additive price impact fees in code:
Why does Jupiter Perpetuals charge price impact fees?
1. Orderbook Simulation and Risk Mitigation
The primary reason for the price impact fee is that Jupiter Perpetuals uses oracle prices for trade execution. This means the price you see is the price you get, providing traders with zero-slippage entries.
While this is a major benefit for traders, it removes the natural price impact that occurs on traditional order book exchanges, where large orders consume liquidity and result in a less favorable execution price. To counter the risks this creates for liquidity providers (JLP holders), the price impact fee is implemented to simulate this slippage.
This ensures that the fee is proportional to a trade's potential impact on the market, creating a fairer environment. The Jupiter team is continuously analyzing data to refine this fee. The goal is to strike a balance: keeping fees as low as possible for traders while ensuring they are sufficient to prevent potential arbitrage attacks, where a malicious actor could move prices on external exchanges and exploit Jupiter's zero-slippage model with large trades.
2. Fair compensation for JLP holders
The price impact fee compensates for the undesirable delta imposed on the JLP. Traders will not benefit from splitting positions across different trades or addresses, as positions must be opened quickly before their alpha decays. The liquidity pool receives reasonable trading fees regardless of whether traders open large trades or split them up.
Jupiter works with Chaos Labs to set and optimize the price impact parameters above. The parameters may be adjusted over time as market conditions change. Consult the price impact proposals below for additional information on calculating the price impact fee and other useful information:
- https://discuss.jup.ag/t/price-impact-parameter-recommendations-june-3rd-2025/38497
- https://discuss.jup.ag/t/additive-on-imbalance-price-impact-model/38562
Borrow Fees
On the Jupiter Perpetuals exchange, traders can open leveraged positions by borrowing assets from the liquidity pool. In return, they pay borrow fees, which serve two key purposes:
- Compensating Liquidity Providers – The fees ensure liquidity providers are rewarded for supplying assets to the pool.
- Managing Risk – The fees help balance the risks associated with leveraged trading.
Unlike other exchanges that charge funding rates for open positions, Jupiter Perpetuals uses a borrow fee system. These fees compound hourly based on the amount borrowed for the leveraged position.
The borrow fees are paid back to the Jupiter Liquidity Pool (JLP), boosting its yield and liquidity. This also helps align the token mark price with its spot market price.
How the Borrow Fee Works:
The hourly borrow fee is calculated using the following formula:
Hourly Borrow Fee = Total Tokens Locked / Tokens in Pool (Utilization) × Hourly Borrow Rate × Position Size
-
Utilization: The proportion of tokens in the pool that are currently locked in open positions.
- Total Tokens Locked: Tokens locked in all open positions.
- Total Tokens in Pool: Tokens deposited into the liquidity pool for the position’s underlying token.
- Hourly Borrow Rate: The base rate charged for borrowing, which varies by asset.
- Position Size: The USD value of the leveraged position.
Finding Hourly Borrow Rates:
The hourly borrow rate for assets can be found in the Borrow Rate section of the trade form or accessed on-chain via the fundingRateState.hourlyfundingBps field in the custody account.
Calculating Utilization Rate:
To calculate the utilization rate, use the following:
// Calculate utilization percentage
if (custody.assets.owned > 0 AND custody.assets.locked > 0) then
utilizationPct = custody.assets.locked / custody.assets.owned
else
utilizationPct = 0
// Get hourly funding rate in basis points
hourlyFundingDbps = custody.fundingRateState.hourlyFundingDbps
// Convert basis points to percentage and apply utilization
hourlyBorrowRate = (hourlyFundingDbps / 1000) * utilizationPct
Worked Example:
Let’s say the price of SOL is $100. Here’s how the fee is calculated for a 100 SOL position:
- Total Tokens Locked = 200 SOL (100 SOL from the position + 100 SOL in the pool)
- Total Tokens in Pool = 1,010 SOL (1,000 SOL in custody + 10 SOL collateral)
- Utilization = 200 SOL / 1,010 SOL = 19.8%
- Hourly Borrow Rate = 0.012% (0.00012 in decimal)
Using the formula:
Hourly Borrow Fee = (200 / 1,010) × 0.00012 × 10,000 = 0.238 USD / hour.
This means your position will accrue an estimated borrow fee of $0.238 every hour it remains open.
Managing Borrow Fees
- Ongoing Borrow Fees: Borrow fees are continuously deducted from your collateral, which impacts both your leverage and liquidation price over time.
- Monitoring Fees: Since fees increase with position duration, it's important to regularly check your borrow fees and liquidation price to avoid unexpected liquidation, especially during volatile market conditions.
Liquidation Penalty
When a position is liquidated, any remaining collateral is collected by the protocol and distributed to the JLP as liquidation fees.
⚠️ This means you will lose your entire collateral when the position is liquidated.
Example calculation:
- Position collateral: $10,000
- Remaining collateral after liquidation and fees: $1,000
- Liquidation penalty: $1,000 (the remaining collateral is collected by the JLP as liquidation fees)
Please ensure you're constantly monitoring your liquidation price and only depositing collateral that is within your risk appetite.
Transaction and Priority Fees
Traders will have to pay SOL for submitting transactions onto the Solana chain. Traders also pay priority fees or Jito bundle tips (or both) depending on their settings.
At the same time, a minor SOL amount will be used for rent to create an escrow account (PDA). The SOL rent will be returned to you once you close your position.
The trade form also shows the estimated transaction fee and rent amount (in SOL) for the open or close position trade.
Swap Fees
Trades that swap between the JLP assets incur a swap fee. The swap fees is set at 10BPS (0.1%) for non-stables and 2BPS (0.02%) for stables of the swap amount as the base fee. But, the fee may increase or decrease depending on the target weightage of the swapped assets in the JLP.
NOTE: The pool will take the max fee of the input and output asset when calculating the final fee. For example, when swapping SOL to USDC, the base fee for SOL will be used as it is higher than the USDC base fee.
Target and Current Weightage
Each asset in the JLP has a target weightage which is the asset's pool size ratio against the entire pool's AUM.
When swapping between the JLP assets, the fee logic checks if the swap amount moves the current weightage towards the target weightage or away from it. Swapping into the pool increases the current weightage, while swapping out of the pool decreases the current weightage.
For example, swapping 100 SOL for 100 USDC would reduce the SOL pool size by 100 (hence reducing the current weightage) and increase the USDC pool size by 100 (thus increasing the current weightage).
The final swap fee may be lower or higher than the base fee depending on the weightage change:
- Moving the current weightage closer to the target weightage will lower swap fees
- Moving the current weightage away from the target weightage will increase swap fees
This mechanism prevents the JLP assets from being skewed away from it's target weightage which protects the pool and also rewards JLP holders when swaps are routed through the JLP.
The code snippet below shows the formula used to calculate the swap fee in the Jupiter Perpetuals program:
JLP Mint & Burn Fees
Fees for minting and burning JLP use the same current / target weightage calculation as swaps, as both actions change the pool size of the asset being deposited or redeemed from the pool.
The code snippet below shows the formula used to calculate JLP mint and burn fees: