Raydium swap

Raydium swap is a Solana liquidity-pool trade

Raydium swap is a wallet-approved exchange that trades one Solana token for another against shared reserves called liquidity pools. You choose the input token, output token, amount, and slippage limit; Raydium finds an available pool or route and builds a Solana transaction. Your wallet signs that transaction, the program applies pool fees and price movement, and the network settles the output to your token account. Liquidity depth determines the quoted amount and price impact.

The short version: Keeping a small SOL balance matters because each signature carries a 5,000-lamport base fee before any priority charge.

From token selection to a settled balance

Using Raydium starts with four inputs and ends when the output token account records settlement.

  1. Select the input and output mints, then enter the amount to sell or the amount to receive.
  2. Read the quote and route, including each pool, fee tier, estimated output, and displayed price impact.
  3. Set the slippage boundary and priority option that will be encoded into the transaction.
  4. Connect a Solana wallet, review the instructions, and approve the network charge and token movements.
  5. Wait for confirmation, then compare the settled output account with the transaction's recorded token balances.

Connecting a wallet such as Phantom or Solflare exposes its public address, not its signing key. A Solana public key is 32 bytes, while an Associated Token Account links one owner to one mint under the relevant token program. If the output account doesn't exist, the transaction may create it and fund its rent-exempt balance in the same atomic operation. Raydium quotes an exact-input trade by fixing what leaves the wallet and computing expected output; an exact-output trade reverses those roles. The wallet displays the complete transaction for approval before any program instruction runs.

The quote can refresh before signing because pool reserves move with other trades. Settlement remains all-or-nothing if any route instruction misses its limit. The confirmed transaction provides the definitive result, and Raydium must rebuild the route whenever its recent quote no longer fits the signed limits.

Reserve curves and concentrated liquidity set the quote

Raydium's pool programs convert deposited token reserves into quotes through constant-product or concentrated-liquidity math.

CPMM and AMM v4 pools hold two token vaults and price swaps with the invariant x × y = k. Adding input to one side requires removing output from the other while preserving the product after fees. As trade size grows relative to reserves, marginal units receive a worse rate, which creates price impact. A route may cross more than one pool, using the first hop's output as the next hop's input. Solana executes those instructions atomically, so a two-hop SOL-to-USDC-to-RAY route either completes as one transaction or leaves every swap instruction unapplied.

AMM v4's former OpenBook integration is deactivated, so its live swaps follow the pool's constant-product curve.

CLMM pools concentrate liquidity inside price ranges. Their Q64.64 price format reserves 64 bits for the fractional component, and adjacent ticks differ by a factor of 1.0001. The supported tick lattice runs from -443,636 through 443,636, while each on-chain tick array stores 60 entries. Those constants let the program traverse initialized ranges without loading every possible price point.

The same explanation is given in practice. Pool depth, active CLMM ranges, and hop count decide whether a direct route or a composed route produces more output.

Slippage limits and Token-2022 rules define failure states

Slippage bounds, liquidity depth, and token extensions determine whether a quoted Raydium trade settles as expected.

A slippage limit converts the quote into an enforceable minimum output or maximum input. If pool state moves beyond that boundary before execution, the transaction fails atomically, although Solana still charges the network fee for processing it. Price impact is different: it appears inside the quote because the proposed order itself moves along the reserve curve. Larger orders consume more marginal liquidity, and thin pools amplify that movement. A higher slippage setting widens the accepted execution range; it doesn't restore pool depth, so the selected route and trade size remain the decisive inputs.

Token-2022 adds mint-level rules to amount accounting. Its transfer-fee extension expresses rates in basis points, where 100 basis points equals 1%, and sets an absolute maximum fee per transfer. Two fee schedules may coexist during an epoch transition: the older schedule and the newer schedule. Raydium CPMM supports eligible Token-2022 mints, while CLMM uses its Token-2022-aware swap instruction and extra mint accounts.

Recent blockhashes add another fixed boundary. Validators accept a transaction only while its blockhash sits within the 151-hash processing window. With slots taking about 400 to 600 milliseconds, that window spans roughly 60 to 90 seconds. Raydium requires a fresh quote and rebuilt transaction after expiry, especially when a hardware wallet delays signing.

Pool charges and Solana fees reduce the output

A Raydium quote separates pool economics from Solana's transaction charges, and both affect the wallet's result.

Each pool charges the fee encoded in its on-chain configuration. AMM v4's standard pool parameters use 25/10,000, or 0.25% of input, then allocate 12% of that fee to the protocol and 88% to liquidity providers. Those shares equal 0.03% and 0.22% of input before rounding. CPMM and CLMM configurations differ by pool, so the route preview's stated tier governs the trade.

A Solana transaction's base fee is 5,000 lamports per signature, split 50% for burning and 50% for the processing validator. One SOL contains 1,000,000,000 lamports. An optional priority charge equals the requested compute-unit price multiplied by the compute-unit limit, then divided by 1,000,000 micro-lamports per lamport and rounded up. The default priority price is zero. Runtime limits allocate 200,000 compute units per non-built-in instruction by default, 3,000 for a built-in instruction, and cap a transaction at 1,400,000 compute units. Creating a missing token account also adds its rent-exempt funding requirement.

Raydium banner listing swaps, yield, and liquidity slogans

Everyday uses for Raydium liquidity

On the same footing, Raydium liquidity supports spot conversion, portfolio rebalancing, and application-level token settlement on Solana. A user may exchange SOL for USDC before entering a lending market, convert a received SPL Token into RAY, or rebalance between two assets without opening an LP position. The same pool can serve a wallet interface, a decentralized application, or a multi-instruction transaction. Swaps transfer token balances once, while liquidity provision deposits both reserve assets and creates an LP claim. When fee income is the goal, liquidity provision adds pool exposure.

Jupiter, Orca, Meteora, and Coinbase change the execution choice

On a practical level, Raydium direct swaps suit trades where its own pools supply the strongest route and the preferred wallet remains in control.

Venue Execution model Custody or control
Raydium Direct CPMM, CLMM, or AMM v4 pool route on Solana The connected wallet signs, and tokens settle to its accounts
Jupiter Aggregation across supported Solana liquidity venues The connected wallet signs an aggregator-built transaction
Orca Whirlpools concentrated-liquidity AMM on Solana The user signs, while the Whirlpool program controls pool vaults
Meteora DLMM liquidity bins and dynamic fee logic on Solana The user signs, while the DLMM program controls pool vaults
Coinbase Centralized matching with an internal account ledger The exchange custodies balances until the user requests withdrawal

Background for this sits in Raydium swap walkthrough. Jupiter broadens route discovery across Solana venues and may include Raydium liquidity inside an aggregated trade. Orca uses Whirlpools, another concentrated-liquidity design, while Meteora's DLMM organizes liquidity into discrete price bins. Coinbase changes both execution and custody because trading occurs against an exchange account. Uniswap belongs to a different chain decision because its deployments trade EVM tokens rather than native Solana SPL assets.

A direct Raydium swap exposes pool-level inputs, an aggregator expands venue coverage, another AMM offers different liquidity, and a centralized exchange uses its internal market. For advanced trades, compare the actual output, route composition, token standard, and account model before signing. The preferred path changes when pool depth, token support, or the required custody model changes.

Common questions

Is RAY required to trade on Raydium?

RAY isn't required to execute a Raydium trade. The input token funds the trade, while a small SOL balance pays Solana's base fee, any chosen priority fee, and rent if the transaction creates an Associated Token Account. RAY is the protocol's native token, but holding it isn't an eligibility condition for swapping. The selected pair still needs an executable Raydium pool or route with enough liquidity.

Can a hardware wallet approve a Raydium transaction?

A hardware wallet can approve a Raydium transaction when it works through a compatible Solana wallet connection. Ledger devices commonly connect through Phantom or Solflare, which prepares the transaction while the device signs it. Review the token mints, amount, minimum output, and network charge on the available signing screens. Slow confirmation may let the recent blockhash expire, in which case Raydium must build a fresh transaction for a new signature.

Why is my output token missing from the wallet balance?

A settled output can exist in its Solana token account even when the wallet interface hides that asset. Refresh the wallet, search the token list by mint, and inspect the confirmed transaction signature in Solana Explorer. Token Program and Token-2022 balances live in mint-specific accounts, so a wallet's display filter isn't the ledger itself. If the transaction failed, no output settled; if it succeeded, the account data provides the authoritative balance.

When can a signed Raydium transaction expire?

A signed transaction expires when its recent blockhash leaves Solana's 151-hash processing window before a validator includes it. With slots around 400 to 600 milliseconds, that window is roughly 60 to 90 seconds, although live production varies. Delayed signing, slow broadcast, or insufficient scheduling priority can consume the available window. Expiry doesn't execute part of the route; the interface needs a fresh blockhash, updated quote, and new signature.

Does swapping on Raydium create an LP position?

No, a swap changes token balances without creating a liquidity-provider position. A CPMM or AMM v4 deposit issues fungible LP tokens, while a CLMM deposit creates a position tied to chosen tick boundaries. Those actions expose deposited assets to pool pricing and accrue the fee share assigned to liquidity providers. A trader who only signs a swap receives the quoted output token and doesn't acquire a claim on the pool's reserves or future trading fees.

Can Raydium create the receiving token account during a swap?

Raydium can include creation of the receiving Associated Token Account in the same Solana transaction as the swap. The account is derived for one wallet owner, one mint, and the relevant token program, then funded to rent exemption by the transaction payer. That raises the SOL requirement above the ordinary transaction fee. Once created, the account holds future receipts of that mint, unless the owner later closes an eligible empty account.