> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jup.ag/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs cover what users see and do on jup.ag, Jupiter Mobile and Jupiter Wallet.
> Universal Deposit, the GUM route in Jupiter Bridge and other GUM integrations on jup.ag are built by GUM. For how they work, their full fee rules, security model and APIs, the reference is the GUM docs: start from https://docs.gum.ag/llms.txt.
> When the GUM docs and these docs differ on how a GUM product behaves on jup.ag, describe the jup.ag experience from these docs and the mechanics and fees from the GUM docs.

# Jupiter Perps Fees

> All fees charged on Jupiter Perps: base fee, price impact fee (linear and additive), borrow fee, swap fee, JLP mint/burn fee, and transaction fees.

This page covers every fee type charged on the JLP markets of Jupiter Perps (SOL, ETH, BTC), including when each fee applies, how it is calculated, and worked examples. [Beta markets](https://docs.jup.ag/user-docs/trade/perps/beta-markets.md#fees) charge a taker or maker fee per order and an hourly funding rate instead of the base, price impact, and borrow fees below.

## Fee Summary

| Fee Type | When Charged | Rate |
| - | - | - |
| Base fee | Open and close | 0.06% of trade size |
| Price impact fee (linear) | Open and close | Scales with trade size |
| Price impact fee (additive) | Open and close (not on liquidation) | Applies when your trade increases the recent long/short imbalance on the asset and leaves it above a threshold |
| Borrow fee | Continuously while position is open | Hourly rate from a utilization curve, on the full position size |
| Swap fee | When a token swap is needed | 0.10% base (0.02% between two stablecoins), adjusted by weightage |
| JLP mint/burn fee | When minting or redeeming JLP | 0.20% base, adjusted by weightage |
| Transaction fee | On every transaction | SOL network fee + a priority fee set automatically |
| Liquidation fee | On liquidation | All remaining collateral |

> [!NOTE]
>
> The JLP mint/burn fee applies when interacting with the JLP pool directly (minting or redeeming JLP). It is included here because it uses the same weightage-based adjustment as the Perps swap fee, on a different base rate. Full JLP details: [JLP Earn](https://docs.jup.ag/user-docs/earn/jlp/earn.md).

***

## When Do You Pay Fees?

Fees are charged at three different moments in the life of a position. This summary covers what you can expect at each stage. Each fee is documented in detail in its own section below.

**Opening a position:**

* Base fee (0.06% of trade size)
* Price impact fee (scales with trade size and the recent long/short imbalance on the asset)
* Swap fee (only if your input token differs from the position's underlying collateral token)
* SOL transaction fee (network fee + a priority fee Jupiter sets automatically)
* SOL rent for the request accounts the trade creates (refunded once the trade is executed)

**While the position is open:**

* Borrow fee, accruing continuously for as long as the position is open and settled from your collateral when you change or close the position

**Closing a position:**

* Base fee (0.06% of trade size)
* Price impact fee
* Swap fee (only if you choose to receive profits in a token different from the underlying collateral token)
* SOL transaction fee

> [!NOTE]
>
> If a position is liquidated instead of closed manually, all remaining collateral is taken as a liquidation fee. See the [Liquidation Penalty](#liquidation-penalty) section.

***

## Fees in the Trade Interface

The trade form on Jupiter Perps shows a **Total Fees** row, with a live breakdown of all fees behind it, before you confirm a position. The values are calculated in real time based on the current market conditions and your selected size, leverage, and collateral.

| Field | What it represents |
| - | - |
| **Entry Price** | The oracle price at which the position would open |
| **Liquidation Price** | The price at which the position would be liquidated (estimate) |
| **Slippage** | Your configured slippage tolerance (default 1%); click **Max: x%** to change it |
| **Open Fee (0.06%)** | The base fee charged to open the position |
| **Price Impact** | The price impact fee for the trade size and the recent long/short imbalance on the asset |
| **Borrow Fees Due** | Borrow fees owed on your existing position on this market and side, settled by this trade (0 if you have no position) |
| **Transaction Fee** | SOL network fee + a priority fee Jupiter sets automatically based on market conditions |
| **Account Rent** | SOL rent for the accounts the trade creates, refunded once the trade is executed |

> [!NOTE]
>
> Use the breakdown to verify the total cost before submitting a trade.

***

## Base Fee

A flat fee of **0.06%** is charged on the trade size when opening or closing a position.

The base fee applies to:

* Opening a position (market or limit order)
* Closing a position (manual, TP/SL, or liquidation)

**Example:**

* Trade size: \$10,000
* Base fee: \$10,000 x 0.06% = **\$6**

**Calculating the Base Fee (code)**

```typescript theme={null}
const BPS_POWER = 10 ** 4; // 10_000

// Use 'increasePositionBps' for opening, 'decreasePositionBps' for closing
const baseFeeBps = custody.increasePositionBps;

const baseFeeBpsDecimals = baseFeeBps / BPS_POWER;
const openCloseFeeUsd = tradeSizeUsd * baseFeeBpsDecimals;
```

***

## Price Impact Fee

Jupiter Perps executes trades at oracle prices, so the execution price does not depend on trade size the way it would on an orderbook. 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, a linear one and an additive one. The base fee, the linear fee and the additive fee together are capped at 0.50% of the trade size, so the price impact fee itself is at most **0.44%** at current parameters (the trade form's Price Impact tooltip shows this maximum; the app prevails).

***

### Linear Price Impact Fee

The linear component scales proportionally with trade size. Each asset has a fixed scalar constant (`pricing.tradeImpactFeeScalar`) stored in its custody account.

**Formula:**

```
Linear Fee (BPS) = ceil(Trade Size (USD, 6 decimals) × 10,000 / tradeImpactFeeScalar)
Linear Fee (USD) = Trade Size × Linear Fee (BPS) / 10,000
```

The rate is rounded up to the next whole basis point, so any trade pays at least 0.01%. At current parameters, a SOL trade pays 0.01% for every started \~\$375,000 of size (ETH \~\$1.5M, BTC \~\$2.4M). Parameters can change; the trade form shows the fee before you confirm.

**Custody accounts (for scalar values):**

* SOL: [7xS2gz2bTp3fwCC7knJvUWTEU9Tycczu6VhJYKgi1wdz](https://solscan.io/account/7xS2gz2bTp3fwCC7knJvUWTEU9Tycczu6VhJYKgi1wdz#accountData)
* BTC: [5Pv3gM9JrFFH883SWAhvJC9RPYmo8UNxuFtv5bMMALkm](https://solscan.io/account/5Pv3gM9JrFFH883SWAhvJC9RPYmo8UNxuFtv5bMMALkm#accountData)
* ETH: [AQCGyheWPLeo6Qp9WpYS9m3Qj479t7R636N9ey1rEjEn](https://solscan.io/account/AQCGyheWPLeo6Qp9WpYS9m3Qj479t7R636N9ey1rEjEn#accountData)

**Example (SOL, October 2026 parameters):**

| Step | Value |
| - | - |
| Trade size | \$10,000 |
| `tradeImpactFeeScalar` | 3,750,000,000,000,000 |
| Linear fee rate | ceil(10,000,000,000 × 10,000 / 3,750,000,000,000,000) = ceil(0.027) = 1 BPS |
| **Linear fee** | \$10,000 × 0.01% = **\$1.00** |

**Calculating the Linear Price Impact Fee (code)**

```typescript theme={null}
const USDC_DECIMALS = 10 ** 6;
const BPS_POWER = 10 ** 4;

// 1. Get scalar from custody account
const scalar = custody.pricing.tradeImpactFeeScalar;

// 2. Convert trade size to base units (6 decimals)
const sizeBase = tradeSizeUsd * USDC_DECIMALS;

// 3. Fee rate in BPS, rounded up to a whole basis point
const feeBps = Math.ceil((sizeBase * BPS_POWER) / scalar);

// 4. Final fee in USD
const feeUsd = (tradeSizeUsd * feeBps) / BPS_POWER;
```

Reference: [Chaos Labs initial proposal](https://discuss.jup.ag/t/jupiter-perpetuals-price-impact-fee-mechanism/17140)

***

### Additive Price Impact Fee

The additive component applies on top of the linear fee when your trade makes the **imbalance** worse and the imbalance is above a predefined threshold.

The imbalance is the net long-minus-short flow on the asset over roughly the last minute: opening a long or closing a short adds to it, opening a short or closing a long subtracts from it. Every trade on the asset counts, your own included, so splitting a large order within the same minute does not avoid the fee. Liquidations count too. It is not the difference between total long and total short open interest.

A trade pays the additive fee only if, after the trade, the imbalance is larger than before in absolute terms (or has flipped to the other side) and above the threshold. A trade that reduces the imbalance pays no additive fee, even when the imbalance stays above the threshold. Liquidations never pay the additive fee: they pay the base fee and the linear fee.

Each asset has its own threshold (`priceImpactBuffer.deltaImbalanceThresholdDecimal`), `feeFactor`, `exponent`, and `maxFeeBps` values stored in its custody account. At current parameters the threshold is \$1.5M on SOL and ETH and \$750,000 on wBTC.

**Formula:**

```text theme={null}
Additive Penalty (BPS) =
  ceil((|Imbalance| / Threshold)
       ^ exponent)
  / feeFactor  (rounded up)

Total Fee (BPS) = min(
  Base Fee + Linear Fee
  + Additive Penalty,
  maxFeeBps
)

Price Impact Fee (USD) =
  Trade Size
  * (Total Fee (BPS)
     - Base Fee (BPS))
  / 10000
```

The additive penalty is zero when the imbalance after your trade is at or below the threshold, or when your trade reduces the imbalance.

**Example (SOL, October 2026 parameters, no other recent flow on the asset):**

| Parameter | Value |
| - | - |
| Trade size | \$1,720,000 |
| `tradeImpactFeeScalar` | 3,750,000,000,000,000 |
| `deltaImbalanceThreshold` | \$1,500,000 |
| `feeFactor` / `exponent` | 1 / 1 |
| `maxFeeBps` | 50 BPS (0.50%, base fee included) |

1. **Linear fee:** ceil(1,720,000 / 375,000) = 5 BPS
2. **Additive penalty:** the imbalance (\$1,720,000) exceeds the threshold, so ceil(1,720,000 / 1,500,000) = 2 BPS
3. **Total:** 6 (base) + 5 + 2 = 13 BPS, below the 50 BPS cap. Price impact fee = 7 BPS × \$1,720,000 = **about \$1,204**

By contrast, if recent long opens have pushed the imbalance to +\$2,500,000 and you open a \$500,000 short, the imbalance falls to +\$2,000,000. It is still above the threshold, but your trade reduces it, so it pays no additive fee.

> [!NOTE]
>
> `feeFactor` and `exponent` are per-custody parameters defined onchain. The exact values can be read from the custody accounts linked above.

Additional references:

* [Price Impact Parameter Recommendations – June 2025](https://discuss.jup.ag/t/price-impact-parameter-recommendations-june-3rd-2025/38497)
* [Additive On-Imbalance Price Impact Model](https://discuss.jup.ag/t/additive-on-imbalance-price-impact-model/38562)

***

## Borrow Fee

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 accrue continuously on the **full position size**, without compounding. They appear as **Borrow Fees Due**, are taken from your collateral when you add to, reduce, or close the position, or deposit or withdraw collateral, and count against your collateral in the liquidation price in the meantime.

### Formula

```text theme={null}
Borrow Fee (USD) =
  Position Size (USD)
  * Hourly Borrow Rate
  * Hours Open
```

The **hourly borrow rate** comes from a per-asset utilization curve (`jumpRateState` in the custody account): an annual rate that rises slowly from a minimum up to a target utilization, then steeply toward a maximum as the pool's tokens get fully used, divided by the number of hours in a year. The **Borrow Rate** shown in the market header (% / hr) is this rate at current utilization, so no separate utilization factor applies. The formula above assumes a constant rate; the program accrues the rate as it changes with utilization. Longs use the curve and utilization of the market asset; shorts use the curve and utilization of the USDC custody, which also count USDC lent through [JLP Loans](https://docs.jup.ag/user-docs/earn/jlp/loans.md).

**Calculating Utilization and Borrow Rate (code)**

```
// Utilization (debt = USDC lent through JLP Loans; 0 on the other custodies)
owned  = custody.assets.owned + debt
locked = custody.assets.locked + debt
IF owned > 0 AND locked > 0:
  utilization = locked / owned
ELSE:
  utilization = 0

// Annual rate from the jump-rate curve (custody.jumpRateState)
IF utilization <= targetUtilizationRate:
  yearlyRate = minRateBps + (targetRateBps - minRateBps) * utilization / targetUtilizationRate
ELSE:
  yearlyRate = targetRateBps + (maxRateBps - targetRateBps) * (utilization - targetUtilizationRate) / (1 - targetUtilizationRate)

// Hourly borrow rate
hourlyBorrowRate = yearlyRate / 8,760
```

### Worked Example

| Parameter | Value |
| - | - |
| Position size | \$10,000 SOL long |
| Borrow Rate (market header) | 0.0016% / hour (illustrative; it changes with utilization) |
| **Borrow fee** | \$10,000 × 0.000016 = **\$0.16 per hour**, about \$3.84 per day |

> [!WARNING]
>
> Borrow fees count against your collateral while the position is open. Over time, this reduces your effective margin and moves your liquidation price closer to the current price. Positions held for extended periods, especially at high leverage, require regular monitoring.

***

## Swap Fee

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:**

* Any swap involving SOL, ETH, or wBTC: **10 BPS (0.10%)**
* Swaps between two stablecoins: **2 BPS (0.02%)**

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 is not a swap between two stablecoins, so the 10 BPS base applies, then the weightage adjustment.

***

## JLP Mint & Burn Fee

Minting (depositing assets into the JLP) and burning (redeeming JLP for assets) start from a base fee of **0.20%** for every asset (launch value; the app prevails), adjusted by the same weightage mechanism as swaps, since both actions change the pool composition: the fee goes down when the action moves the asset closer to its target weight and up, by as much as about 1%, when it moves it further away.

For more on the JLP pool, mint and burn flows, and yield mechanics: [JLP Earn](https://docs.jup.ag/user-docs/earn/jlp/earn.md).

***

## Transaction and Priority Fees

* Traders pay a SOL network fee for each transaction submitted to Solana.
* Jupiter adds a **priority fee** automatically, based on market conditions; there is no priority fee or Jito tip setting.
* A small SOL amount is used as **rent** for the request accounts created by actions sent to the program as requests: opening, closing, adding or removing collateral. Each request creates a request account and its token account (a few thousandths of a SOL in total). Both are closed as soon as the keeper executes or rejects the request, and their rent comes back to your wallet as separate small SOL transfers. Several actions therefore produce several refunds. The position account itself is reused and never closed, so it returns nothing.

The estimated transaction fee and rent amount (in SOL) are shown in the trade form before confirming.

***

## Liquidation Penalty

When a position is liquidated, **all remaining collateral** is taken as a liquidation fee, after the loss, the close fee and borrow fees.

> [!WARNING]
>
> You will lose your entire remaining collateral upon liquidation, not just the amount required to cover the loss. See the [Liquidation](https://docs.jup.ag/user-docs/trade/perps/liquidation.md) page for how to monitor and avoid liquidation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.