Raydium

Raydium routes Solana token trades across automated market maker pools

Raydium is a non-custodial decentralized exchange and liquidity protocol on Solana. Its swap router compares eligible pool paths for a selected token pair, then builds a transaction around the quoted output, pool fees, price impact, and slippage limit. The user's wallet signs the transaction and retains control of the assets.

Updated on

Before signing a Raydium swap, compare the route's expected output, pool fees, price impact, token mints, and minimum received.

Route fit and proof of completion

Route fit starts with the quote mode, both token mint addresses, and either the fixed input amount or desired output. One trade may fit a single pool. Another may obtain a better net quote through intermediate liquidity or by dividing the order across pools. For an exact-input quote, compare the expected output after pool fees and price impact; for an exact-output quote, compare the required input under the same conditions.

A displayed quote is an estimate from the pool state available when the router calculated it. Completion requires stronger evidence: the transaction must record a successful status, the input balance must decrease by the executed amount, and the output balance must increase. Wallet history or a Solana transaction explorer can expose those changes even when an interface has not refreshed.

A missing compatible path is a routing boundary, not a slippage problem. It requires another supported venue, another output token, or a compatible representation on Solana.

What does the router actually choose?

The router chooses an executable path offering a competitive net output for the requested amount. It can evaluate constant-product pools, concentrated-liquidity pools, and other supported pool types. A route may contain one pool, multiple sequential hops, or a split between pools when dividing the input improves the quote.

The routing program orchestrates token flow while each pool program calculates its own price. Consequently, liquidity depth, active price ranges, pool fees, and the trade amount all affect the route. A route can change between two quotes without any configuration change because pool balances and market activity are live variables. Requoting preserves the same intended exchange while using newer pool state.

Wallet, network, and token prerequisites

A swap needs a Solana-compatible wallet, a spendable input balance, and enough SOL for network charges. The wallet may also need SOL to create an associated token account for an output mint it has never held. Without that account, the transaction must create one or use an existing compatible account before the output can arrive.

Token identity comes from the mint address, not its name, ticker, or image. Different mints can display identical labels, so the intended address should match the asset selected in the transaction preview. This check matters most for newly issued or lightly traded tokens, where misleading metadata can resemble an established asset.

Compatibility also depends on the token program and mint extensions. CPMM and CLMM pools can support Token-2022 assets subject to extension-specific rules, while AMM v4 does not support Token-2022. A non-transferable mint cannot participate in an ordinary swap because its transfer restriction prevents the required token movement.

Quote inputs and the minimum received

An exact-input quote fixes how much the transaction spends and calculates the expected output. An exact-output quote reverses that relationship by fixing the desired receipt and calculating the required input. The transaction must use the matching limit: minimum output for an exact-input quote and maximum input for an exact-output quote.

For an exact-input swap, the minimum received follows the relationship quoted output × (1 - slippage tolerance). Execution may finish above that floor, but it should fail below it. Changing the input amount, output mint, or tolerance requires a new quote because each change alters either the route economics or its acceptance boundary.

Pool designs behind the route

Constant-product pools price trades from two reserves linked by the invariant x × y = k. A trade changes the reserve balance, so larger orders relative to available liquidity move farther along the curve. Raydium's CPMM is the modern constant-product design, while AMM v4 remains available for existing liquidity built under the older program.

CLMM pools concentrate liquidity within chosen price ranges. Capital inside the active range can produce a stronger quote than the same capital spread across every possible price. Once a swap crosses ticks or moves beyond a position's range, the available liquidity changes. The router accounts for those boundaries while calculating the path.

AMM v4 formerly connected pool liquidity with an order-book integration, but current swaps use its automated market maker curve rather than that former linkage. The router can still consider operational AMM v4 pools. Their age alone does not decide route quality; executable output and compatible token programs do.

Costs attached to a swap

Every route combines several cost inputs. Each pool hop can charge its configured trading fee, and a multi-hop path can incur a fee at each stage. Price impact is separate because it reflects movement along the pool curve. Solana also charges a transaction fee, while an optional priority fee pays for a better chance of timely processing during congestion.

Some Token-2022 mints impose transfer fees set by the mint configuration. Those charges can affect the amount entering a pool, the amount reaching the wallet, or both. The quote must account for applicable transfer fees as well as pool fees. A higher priority fee does not improve the exchange rate; it only changes transaction processing incentives.

How do slippage and price impact differ?

Price impact estimates how the proposed trade changes the pool price, while slippage tolerance limits adverse movement after the quote. A shallow pool or a large order can show substantial impact immediately. Slippage concerns the additional change permitted between quotation and execution.

Raising the tolerance does not repair poor liquidity or improve the quoted output. It widens the range the transaction may accept. Reducing the trade amount, choosing deeper liquidity, or waiting for another executable route addresses price impact more directly. A narrow tolerance offers a tighter floor but may fail more often in a moving market.

Failed swaps and usable recovery paths

A multi-hop route fails as one transaction when its final output cannot meet the caller's minimum. Intermediate tokens should not remain stranded merely because a later hop rejected the trade. A failed Solana transaction can still consume its network fee, even though the intended token exchange did not complete.

Common causes include stale pool data, movement beyond the slippage limit, insufficient SOL for fees, an unavailable account, an incompatible mint extension, or congestion that leaves the transaction unprocessed. A recently created pool may also be absent from indexed search until supporting data catches up.

Recovery should match the failure. Requote after stale pricing, confirm the mint and pool when accounts are missing, and restore enough SOL when fee funding is short. Adjust slippage only when the minimum-output boundary caused the rejection. If submission status is uncertain, inspect the transaction signature before authorizing another trade.

A route check before signing

  • Confirm both mint addresses and the Solana network match the intended assets.
  • Keep enough input tokens and SOL for transaction and account-creation costs.
  • Read the pool sequence and compare the net output, not only the displayed rate.
  • Check pool fees, transfer fees, price impact, and the minimum received together.
  • Match the wallet preview with the input, output, amount, and expected program actions.

If the quote refreshes during this review, inspect the new output and minimum before signing. The earlier values no longer describe the transaction presented by the wallet.

Liquidity and launches beyond a swap

Providing liquidity is a different action from exchanging tokens. A constant-product deposit creates a share represented by LP tokens, while a concentrated position allocates liquidity inside a selected range. Fees may accrue to the position, but reserve changes, market movement, and an inactive range can alter both its composition and performance.

LaunchLab supports token issuance and early trading through a bonding curve. Once a launch meets its configured graduation condition, accumulated liquidity can migrate into a CPMM pool, where ordinary pool routing takes over. The mint address remains the reliable identity check across that transition; a familiar ticker does not establish continuity by itself.

Liquidity and launches beyond a swap: Providing liquidity is a different action from exchanging tokens.; A constant-product deposit creates a share represented by LP tokens, while a concentrated position allocates liquidity inside a selected range.; Fees may accrue to the position, but reserve changes, market movement, and an inactive range can alter both its composition and performance.

View image file

The interface also exposes perpetual markets through Orderly Network. Those positions use a different trading mechanism from Raydium's spot AMM swaps. A spot quote, a liquidity position, a bonding-curve purchase, and a perpetual position therefore carry different inputs, settlement evidence, and failure conditions.

Is a direct Raydium route always the right path?

No. A direct Raydium route fits a same-chain token exchange when its eligible pools provide acceptable output, compatible token handling, and a suitable minimum received. A broader Solana aggregator may compare Raydium liquidity with other on-chain venues, although the selected transaction can still execute through one or more Raydium pools.

Other goals require different infrastructure. A bridge changes an asset's chain context rather than merely swapping two Solana mints. A centralized platform may be needed when the intended output is fiat in a bank account, subject to its own availability and account requirements. The relevant alternative depends on whether the desired change is a Solana token exchange, a cross-chain transfer, or a fiat withdrawal.

Everyday questions about Raydium

Does Raydium take custody of tokens between swaps?

No. A wallet authorizes each transaction, and the on-chain programs move tokens through the selected pool path during execution. Raydium does not hold a standing account balance on the user's behalf between swaps. The user remains responsible for the wallet's keys, token accounts, and transaction approvals.

Do I need RAY to trade on Raydium?

No. A spot swap does not require the RAY token merely to access the router. The wallet needs the selected input token and enough SOL for Solana transaction costs and any required account creation. RAY may itself be traded when a compatible pool exists, but it is not a universal swap fee token.

Can Raydium move tokens to another blockchain?

A standard Raydium swap exchanges compatible token mints on Solana; it does not bridge assets to another blockchain. A cross-chain transfer requires separate bridge infrastructure and compatible assets on both sides. Completing a Solana swap therefore does not create a native balance on Ethereum or another network.

Why can a successful swap leave the output token hidden in my wallet?

The transaction can succeed even when the wallet interface has not refreshed or hides an unfamiliar token account. Check the transaction status and token balance changes, then refresh the wallet or reveal the output mint. The mint address should match the asset named in the signed transaction.

How long should I rely on a displayed Raydium quote?

A displayed quote can become stale whenever pool state changes. Trades, liquidity changes, fees, and active CLMM ranges can alter the next calculation. If time has passed or the interface refreshes the route, review the new expected output and minimum received before signing.

Is pool availability proof a token is trustworthy?

No. A permissionless pool can provide a trading route without proving the token's issuer, code, ownership distribution, or economic quality. Pool depth and mint identity answer execution questions, not project legitimacy. A matching ticker or visible liquidity should not replace verification of the exact mint and its properties.

Can I cancel a Raydium swap after submitting it?

A submitted Solana transaction has no ordinary cancellation instruction. It may confirm, fail, or expire if it is not processed within its validity window. Stopping a wallet from rebroadcasting does not guarantee validators have not received it, so inspect the signature status before signing a replacement transaction.