Types of gas costs
Solana transactions can incur four types of gas costs:- Base network transaction fee (signature fee)
- Associated token account (ATA) rent for new token accounts
- Priority fee (or tips for Jito, etc.)
- Other account rent (some DEXes require additional accounts of the taker, e.g. Pump.fun)
Automatic gasless (/order)
Jupiter automatically covers all gas costs when the taker lacks SOL. No configuration needed.
When it applies:
- Taker has less than 0.01 SOL
- Minimum trade size of ~$10 (dynamic, varies with current priority fee market)
- Only when using default
/orderparameters (no optional params)
- Jupiter calculates the required SOL to cover gas and increases the swap fee. The taker receives less output tokens. The
feeBpsfield in the response reflects this increased fee. - A secondary signer (Jupiter’s gas payer) is added to the transaction.
- Does not work with integrator params (
referralAccount,referralFee,payer) - Does not work with manual mode params (
slippageBps,priorityFeeLamports,excludeRouters)
JupiterZ gasless (/order)
Alternatively, when a JupiterZ (RFQ) market maker provides the winning quote in /order, the market maker pays network and priority fees directly. ATA rent is not covered by the market maker, so the taker must have enough SOL for rent or JupiterZ will not be routed.
When it applies:
- Taker trades a pair the MMs are willing to quote
- Only when using default
/orderparameters (no optional params)
- The order transaction will include a secondary signer for the MM
- We set the gas payer to the MM signer and upon receiving your partially signed transaction from
/execute, we send it to the MM for them to sign and execute
- Does not work with integrator params (
referralAccount,referralFee,payer) - Does not work with manual mode params (
slippageBps,priorityFeeLamports,excludeRouters) - Requires taker to have sufficient SOL for token account rent
Integrator payer
Integrators can cover all gas costs on behalf of their users by passing thepayer parameter. This works on both /order and /build.
On /order
Pass payer to cover all gas-related fees. The transaction requires both taker and payer signatures.
/execute.
What it covers: all four gas types.
How it works:
- Regardless of how much SOL the taker has, the payer covers all fees
- Temporary wSOL ATA rent is covered by the payer and returned in the same transaction
- Other ATAs are covered by the payer but not returned (they hold tokens post-swap)
- Routes through Metis only
- This needs to be used together with referral parameters (
referralAccountandreferralFee) because we assume that you will be taking fees to recoup the costs spent on gas
On /build
Pass payer to change the fee payer on all returned instructions. The payer address replaces the default taker as the fee payer for the transaction.
payer address. You are responsible for building the transaction, collecting both signatures (taker + payer), and sending via your own RPC.
Related
- Order & Execute for the default swap flow
- Build Custom Transactions for the advanced path
- Routing for how
payeraffects routing - Fees for how gasless affects the fee calculation
