Jupiter Perps executes trades at oracle prices, which means traders receive the displayed price regardless of trade size (no orderbook slippage). To compensate for the risk this creates for JLP holders, a price impact fee is charged to simulate the price impact that would occur on a traditional orderbook exchange.The price impact fee has two components that are summed and capped at a per-asset maximum.
The linear component scales proportionally with trade size. Each asset has a fixed scalar constant (pricing.tradeImpactFeeScalar) stored in its custody account.Formula:
Copy
Ask AI
Linear Fee Coefficient = Trade Size / Price Impact Fee Scalar ConstantFinal Linear Fee = Trade Size × Linear Fee Coefficient
The tradeImpactFeeScalar value in the custody account is stored in BPS format. Divide by 10,000 to use against USD trade sizes.
The additive component applies on top of the linear fee when the open interest (OI) imbalance — the difference between total long OI and total short OI for an asset — exceeds a predefined threshold.Each asset has its own threshold (priceImpactBuffer.deltaImbalanceThresholdDecimal), factor, exp, and maxPriceImpactFee values stored in its custody account.Formula:AdditivePenalty(BPS)=factor∗(newImbalance/Threshold)expAdditivePenalty(USD)=TradeSize∗(AdditivePenalty(BPS)/10000)FinalPriceImpactFee(USD)=min(LinearFee(USD)+AdditivePenalty(USD),MaxFee(USD))If the imbalance is below the threshold, the additive penalty is zero.Example (SOL long, at time of writing):
Parameter
Value
Trade size
$10,000
New OI imbalance
$2,000,000
tradeImpactFeeScalar
1,250,000,000 (USD terms)
deltaImbalanceThreshold
$750,000
maxPriceImpactFee
50 BPS (0.50%)
Linear fee:10,000×0.000000008=0.00008
Additive penalty: The imbalance (2,000,000)exceedsthethreshold(750,000), so the penalty formula applies using the SOL-specific factor and exp values.
Final fee: min(Linear Fee + Additive Penalty, 10,000×0.5050**)
factor and exp are per-custody parameters defined onchain. The exact values can be read from the custody accounts linked above.
Traders pay a borrow fee for the duration their leveraged position is open. This fee compensates liquidity providers for the capital locked in the position.Borrow fees compound hourly and are deducted from the position’s collateral.
Borrow fees are continuously deducted from your collateral. Over time, this reduces your effective margin and increases your liquidation price. Positions held for extended periods — especially at high leverage — require regular monitoring.
When a trade involves swapping between JLP-held assets (e.g. depositing SOL collateral to open a USDC-collateral short), a swap fee is charged.Base rates:
The final fee is adjusted based on how the swap affects each asset’s current weightage relative to its target weightage in the JLP:
Swaps that move an asset’s current weightage closer to its target → fee decreases
Swaps that move an asset’s current weightage further from its target → fee increases
The pool uses the maximum of the input and output asset’s fee when calculating the final swap fee.Example: Swapping SOL → USDC: the SOL base fee (10 BPS) is used, as it is higher than the USDC base fee (2 BPS).Reference implementation: calculate-swap-amount-and-fee.ts
Minting (depositing assets into the JLP) and burning (redeeming JLP for assets) use the same weightage-based fee calculation as swaps, since both actions change the pool composition.Reference implementation: calculate-mint-burn-jlp.ts
When a position is liquidated, all remaining collateral is collected by the protocol and distributed to the JLP.
You will lose your entire remaining collateral upon liquidation, not just the amount required to cover the loss. See the Liquidation page for how to monitor and avoid liquidation.