Raydium

Raydium swap fees from quoted route to confirmed output

Raydium swap fees come from the pools in a quoted route. Solana network charges and any Token-2022 transfer fee sit alongside those pool costs. After confirmation, compare token balances and the network fee with the signed quote, since a failed transaction can still consume a network fee.

Charges that make up the swap cost

Three broad sources of charges can affect a Raydium exchange: pool-level fees, Solana transaction fees and Token-2022 transfer fees. They don't share one rate or recipient. Each selected pool applies its configured trading fee, and a CPMM pool may also apply a separate creator fee when that option is enabled. The network charges the fee payer in SOL, while an affected transfer withholds tokens under the mint's active Token-2022 configuration.

Price impact and slippage belong in the same review, although neither is another protocol fee. Price impact describes how the trade changes the execution price along the available liquidity. Slippage tolerance sets a boundary for movement between quote and execution. Price impact can reduce quoted output, while the slippage boundary can stop execution or admit a worse fill. The fee line alone can't describe the full exchange cost.

Cost parameter Value or basis Where it is deducted Required condition
Pool-level fees The configured trading-fee rate at each route hop, plus any enabled CPMM creator fee The hop input for the trading fee; the configured input or output side for a CPMM creator fee An executable pool route; an enabled CPMM creator-fee option for the additional charge
Solana transaction fee A base fee plus any optional prioritization fee SOL held by the transaction's fee payer Enough SOL before submission
Token-2022 transfer fee The mint's active rate, limited by its maximum fee A transfer of an affected input or output token A transfer-fee extension on the mint
Total to reconcile The route's quoted token amounts and fees, with the SOL network charge kept in SOL The transaction record and resulting balances Confirmed execution evidence

These values can't always be added as one percentage. A pool fee may be denominated in an input token, a transfer fee may affect either side and the network fee is paid in SOL. Before signing, compare routes by expected output. After execution, use the confirmed balance changes to check what the swap delivered.

The terms behind the quote

A quote describes a proposed exchange at one moment. Its fields show what enters the route, what should leave it and the boundary at which execution must stop. Reading those fields separately prevents a fee from being mistaken for price movement or a protective limit.

Expected output

Expected output is the route's estimate based on current pool states and fee settings. A refreshed quote can differ after liquidity moves, another swap changes a pool or the router finds a different path. This value isn't a promise of the final wallet increase. It is the baseline against which the limit and confirmed result can be compared.

Minimum output boundary

The transaction's minimum-output field sets the least acceptable gross pool output under the chosen slippage tolerance. If the route would finish below that boundary before an output Token-2022 transfer fee, the swap should fail. An output transfer-fee mint can therefore leave the wallet with less than the encoded minimum. This boundary limits execution price movement; it doesn't lower the pool's configured fee or the network charge.

Price impact

Price impact comes from taking liquidity along the pool curve. A larger exchange relative to active liquidity usually moves farther along that curve, changing the effective price. Deeper liquidity may therefore return more output even when its displayed trading-fee rate isn't the lowest available rate.

Pool routes determine how trading fees accumulate

Raydium's router adds no fee of its own; each pool on the route applies its configured trading fee. A direct path applies one pool's math. A multi-hop path passes the first pool's output into the next pool, where another configured fee and another curve affect the final amount.

A split route sends portions of the input through separate pool branches, then combines their outputs. Each branch keeps its own pool configuration. Compare the route's final quoted output under the same input and limit instead of an isolated fee percentage from one branch.

Pool type also matters. CPMM, CLMM and legacy AMM pools don't have to use the same fee configuration or liquidity shape. The quote resolves those differences for the proposed exchange. If a refreshed quote selects new pools, the cost estimate must be read again before authorization.

Can a lower pool fee still lead to a worse quote?

Yes, a lower fee rate can still return less output when its pool has less usable liquidity or a less favorable price. The route calculation combines fee deductions with the pool curve, so price impact may outweigh the apparent saving. Compare quotes for the same input, token mints and moment. A rate without its resulting output doesn't settle the choice.

The reverse can also occur. A path with another hop charges more than one pool fee yet reaches liquidity that improves the final output. This is why route selection belongs beside expected output and price impact. Counting hops alone doesn't reveal the cheaper execution.

Token-2022 changes the amount accounting

A Token-2022 mint can carry a transfer-fee extension with an active basis-point rate and a maximum fee. That charge comes from the token's mint configuration, not from Raydium's pool-fee split. It matters on the way into a pool, on the way out or on both sides when both mints use the extension.

Input transfer

When an input mint charges a transfer fee, the pool vault receives less than the wallet sends. Swap math must use the amount that reaches the vault before applying the pool's own trading fee and curve. As a result, the wallet debit, pool input and curve input can be three related but different amounts.

Output transfer

An output mint can withhold a fee when the pool sends tokens to the receiving account. The gross pool output then differs from the balance increase that the wallet records. The post-confirmation token balance is the clearest evidence of the amount actually received, especially when the transfer fee appears separately from the pool fee in the quote.

Configuration changes and caps

The active transfer-fee configuration includes a rate and a maximum amount per transfer. The mint's transfer-fee configuration authority can schedule changes under Token-2022's rules, so a stale quote may no longer represent the applicable configuration when execution occurs. Refresh the quote to obtain a new estimate. If the expected net receipt still isn't clear, stop before signing and review the quote again.

Solana fees sit outside the quoted token output

A Solana transaction fee combines a signature-based base fee with an optional prioritization fee. Both are separate from the tokens moving through Raydium pools. The fee payer needs enough SOL before submission, even when neither side of the exchange is SOL.

A prioritization fee pays for a better chance of scheduling during congestion. It doesn't buy a better pool price and doesn't change the trading-fee rate. For legacy and v0 transactions, its amount depends on the compute-unit price and requested compute-unit limit. A v1 transaction encodes the total priority fee directly. In either format, it belongs with the transaction's SOL costs rather than the token-output calculation.

The network debit should be reconciled in SOL. Converting it into the output token would require a separate exchange rate at a chosen time, adding an assumption that the transaction itself doesn't record.

Reviewing the quote before authorization

Before signing, match each charge to the balance or output it affects. The quote covers the proposed pool execution, while the wallet request identifies the network transaction that will be authorized. Missing SOL is a readiness problem, not a reason to loosen the swap's output limit.

Route and fee lines

Start with the exact input and output mint addresses because symbols can be duplicated. Then check the selected pools, the number of hops and the fee shown for each part of the route. The following fields should agree with the intended exchange:

  • the input mint and amount;
  • the output mint and expected receipt;
  • the pool path and its fee entries; and
  • any Token-2022 transfer fee shown for either side.

Output protection

Read expected output together with minimum received and price impact. Expected output supplies the estimate, while the transaction's minimum-output field sets the gross execution boundary before any Token-2022 output transfer fee. A wide tolerance can admit a worse fill; a narrow one can make a moving quote fail. Neither setting changes a pool's programmed fee.

SOL readiness

The fee payer must hold enough SOL for the transaction fee selected in the wallet request. If the fee payer lacks that SOL, wait until enough SOL is reserved or added before submission. Loosening output protection won't fund the network charge, and repeated submissions won't fix the shortfall.

From authorization to confirmed balances

Signing authorizes the assembled transaction. It doesn't prove that the transaction was submitted, accepted by validators or executed successfully. Its signature identifies the signed transaction, while a status lookup shows whether the network has observed it.

Submission creates a transaction to track. A pending state has not yet supplied the same evidence as confirmed execution, so a second authorization can create another independent attempt. Checking the existing signature first avoids treating uncertainty as failure.

Successful confirmation establishes that the recorded instructions completed. At that point, the token accounts show the resulting debit and credit. Those balance changes matter more than an earlier display because they reflect the executed route and any applicable transfer behavior.

The SOL balance change supplies a different part of the reconciliation. It includes the network charge and may include other transaction effects shown in the record, so it shouldn't be read as a Raydium pool fee. Pool charges are embedded in the route's token accounting.

Final review links three records without collapsing them: the pre-signing quote, the confirmed transaction and the resulting token balances. If the input or output used a transfer-fee mint, the confirmed account change is the decisive receipt figure. A mismatch should be explained before another transaction is authorized.

Failed execution can still leave a network charge

A failed Solana transaction can still charge its network fee because validators processed the submitted transaction. It doesn't produce the quoted token exchange when the swap instructions fail. The recorded error and unchanged swap balances distinguish that state from a successful exchange with an unexpectedly small net receipt.

Failed execution can still leave a network charge: A failed Solana transaction can still charge its network fee because validators processed the submitted transaction.; It doesn't produce the quoted token exchange when the swap instructions fail.; The recorded error and unchanged swap balances distinguish that state from a successful exchange with an unexpectedly small net receipt.

View full-size image

How do you reconcile the final cost?

Reconcile it by matching each charge to its own unit and record. Compare the confirmed input-token decrease with the authorized amount, then compare the wallet's output-token increase with the quote's expected net receipt. If Token-2022 output withholding applies, don't compare that net increase directly with the transaction's gross minimum-output boundary. Keep the transfer fee separate from the pool trading fee.

Next, read the transaction's SOL fee as the network cost. Don't subtract it from the token output unless a separate valuation is deliberately being calculated. Record the wallet's input debit, resulting output credit and SOL network debit separately. The route details explain the pool portion between the first two figures.

Timing matters here. Use the quote that belonged to the signed transaction, not a newer quote displayed after the pools changed. A fresh quote is useful for a new decision, but it can't rewrite the terms of an already confirmed execution.

The stop point before another attempt

A complete review ends with either confirmed output or a specific unresolved state. Stop when the mint identities, applicable transfer fee, minimum receipt or SOL requirement can't be established from the quote and transaction request. After submission, wait for the existing signature's status before authorizing another attempt. That boundary prevents an uncertain cost from becoming a duplicate exchange.

Raydium swap fees - your questions answered

Does raising slippage tolerance reduce the Raydium pool fee?

No, slippage tolerance doesn't change the pool's configured trading-fee rate. It changes the transaction's minimum acceptable gross pool output as conditions move between quote and execution. A Token-2022 fee on the output mint can reduce the wallet's net receipt below that bound. A wider tolerance may reduce slippage failures, but it also permits a worse fill. The fee rate, price impact and output boundary remain separate parts of the quote.

Can a Raydium CPMM pool apply a creator fee?

Yes, a CPMM pool can apply a creator fee when that option is enabled for the pool. It is a separate bucket from the trading fee, not a share of it, and its configuration can place it on the input or output side. The route quote should reflect the applicable setting before the wallet authorizes the transaction. If the option is off, that creator-fee bucket is absent.

What changes when a fresh quote chooses a different pool route?

A different route can change the pools, hop count, fee deductions, price impact and expected output. The previous quote no longer describes the proposed exchange, even when the input and output mints stay the same. Review the new route as a new cost estimate, then keep the quote associated with the transaction that is actually signed.

Is a priority fee part of the Raydium trading-fee split?

No, a priority fee is a Solana network charge paid to improve transaction scheduling. It isn't distributed through any Raydium pool-fee bucket, and raising it doesn't improve the quoted exchange rate. Read it in SOL within the transaction details, apart from the pool fees embedded in token amounts. The network may keep that fee even if swap execution fails.

Can different route hops deduct fees in different tokens?

Yes, each pool hop works with the token it receives as that hop's input. In a multi-hop route, the first output becomes the next input, so later pool fees can be denominated in an intermediate token. The final quote combines those steps into expected output, while the route detail explains where each deduction occurs. Read the amounts in their native units.

Last updated ยท