Ray

Ray is shorthand for Raydium: Solana AMM Swaps Limited by Pool Liquidity

Ray is shorthand here for Raydium, a token-swapping service on Solana where shared token reserves replace a traditional order book. Its swap interface searches eligible Raydium pools, compares net output after each pool fee and submits the chosen route from a connected wallet. Quoted output changes with reserves, concentrated-liquidity ranges and trade size. A transaction settles on Solana, while the wallet keeps custody before signing and after settlement. The RAY ticker names Raydium's SPL token; it is not required for a swap.

Updated:
Jump to a section

Swapping SOL Into USDC for a Planned Payment

A SOL-to-USDC swap suits someone seeking a dollar-denominated token balance while keeping execution inside a self-custodied Solana wallet.

Enter SOL as the input and USDC as the output, then read the expected output, pool fee, price impact and minimum received figure together. USDC exists as a specific Solana mint, so mint identity matters as much as its familiar symbol. Raydium wraps native SOL into WSOL when a pool requires an SPL Token account and unwraps output when requested. The route settles in one atomic transaction: all hops complete or no swap state is committed. This is cleaner than sending tokens through several separate pool transactions, although the quote still moves before signing.


Preparing the First Ray Swap

A Raydium swap requires a compatible Solana wallet, the intended token balance and enough SOL to pay transaction and account costs. The supporting detail is gathered in Ray questions.

Wallet and Fee Balance

Phantom, Solflare and Backpack support versioned Solana transactions, while Ledger pairing adds hardware signing for compatible wallet flows. Keep SOL outside the swap amount. One signature carries a base fee of 0.000005 SOL, and an optional priority fee increases the total. Creating a new associated token account also requires a refundable rent deposit, so an almost-empty SOL balance blocks otherwise valid execution.

Mint Identity and Token Program

Select assets by mint address when symbols collide. Raydium pools use classic SPL Token mints and supported Token-2022 mints, but these programs enforce different account rules. Circle's native USDC on Solana and a bridged USDC representation are separate assets with separate pools. The chosen mint controls the pool, transfer behavior and output account. A quoted ticker never merges those balances.

Raydium logo above slogans about swaps, yield, and liquidity on neon background
Raydium logo above slogans about swaps

How Does Raydium Choose a Route?

Raydium chooses the eligible pool or pool sequence producing the strongest net output for the requested input and current on-chain state.

The route engine quotes CPMM, CLMM and legacy AMM v4 liquidity, then compares results after pool fees and curve movement. A direct pool uses one pricing curve. A multi-hop route passes the first pool's output into a second pool, such as SOL to USDC and USDC to RAY. A split route distributes input across pools when combined depth gives a better aggregate quote.

Exact-input mode fixes what leaves the wallet and protects a minimum output. Exact-output mode fixes what arrives and caps the input. Each additional hop adds another pool fee and another source of price impact. The routing layer charges a separate 0% fee; pool programs own the pricing math and fee deduction.

Pool Curves Behind the Quote

Even so, Raydium quotes come from pool programs whose reserve formulas turn trade size, available liquidity and configured fees into executable output.

Constant-Product Pools

CPMM and AMM v4 pools each hold two token vaults and apply the invariant x × y = k. Buying token y removes it from one reserve and adds token x to the other, so the marginal price rises throughout the trade. A small order against deep reserves barely moves the ratio; a large order moves it sharply. Fees are taken before the net input reaches the curve. AMM v4 now relies on its own curve rather than active OpenBook liquidity, while CPMM provides the modern constant-product path for new pairs.

Concentrated-Liquidity Pools

CLMM places liquidity inside selected price ranges, so only positions covering the current price contribute to a swap. Published standard configurations pair 0.01%, 0.05%, 0.25% and 1% base fees with tick spacings of 1, 10, 60 and 120. Each initialized tick array stores 60 consecutive tick states. Concentration produces deeper effective liquidity near the active price, but output worsens after a trade crosses ranges with less liquidity. The quote therefore reflects active ticks, not the pool's headline token balance alone.

Fees, Price Impact and a Worked Swap

A Raydium swap combines the selected pool fee with Solana network charges, while price impact changes output without becoming a fee.

Standard CLMM tiers publish base rates of 0.01%, 0.05%, 0.25% and 1%. In a standard 0.25% CPMM configuration, 84% of the trade fee stays with liquidity providers, 12% supports RAY buybacks and 4% goes to treasury. AMM v4 applies a 0.25% fee, with 88% allocated to liquidity providers and 12% to the protocol share. Read the route because each hop applies its own configured rate.

Solana charges a base fee of 5 000 lamports per signature, equal to 0.000005 SOL when one SOL contains 1 000 000 000 lamports. An optional priority fee equals the compute-unit price multiplied by the requested compute-unit limit, divided by 1 000 000 and rounded up to lamports. The transaction limit is 1 400 000 compute units.

The changing inputs in this worked example are hypothetical: input is 1 000 USDC, net quoted output is 5 SOL, pool fee is 0.25%, slippage tolerance is 0.5%, priority fee is 0 and signature count is 1. The pool fee equals 2.50 USDC and is already reflected in the net quote. Minimum output is 5 × (1 − 0.005) = 4.975 SOL. The base network fee adds 5 000 lamports. Therefore the wallet authorizes 1 000 USDC and receives at least 4.975 SOL or the transaction does not commit.

Price impact comes from moving along the pool curve. Slippage tolerance handles further movement between quote and execution by setting a minimum output or maximum input. Raising tolerance does not improve the curve price; it only permits settlement across a wider range. Reducing order size or using deeper combined liquidity addresses price impact more directly.

Verifying Settlement After Signing

A confirmed Raydium swap should show the authorized input debit, the settled output credit and one successful atomic transaction. Compare the wallet's received amount with the transaction details, not an earlier quote snapshot. Solscan and Solana Explorer display the signature, invoked Raydium program, token balance changes and network fee. A missing wallet label does not erase the on-chain balance; adding the output mint to the wallet view exposes the associated token account.


Uses Beyond a One-Off Token Exchange

Set against that, Raydium supports recurring token conversion, treasury rebalancing and liquidity provisioning, with routed swaps remaining its most direct trader operation.

Developers use the Raydium Trade API and Raydium SDK to request quotes and build transactions for wallets or applications. Liquidity providers deposit paired assets into CPMM pools or choose ranges in CLMM, earning the provider share of trading fees while accepting inventory exposure. LaunchLab moves qualifying token launches into CPMM liquidity for secondary trading. The RAY token belongs to separate protocol economics, including buybacks funded from fee shares; holding RAY is optional for swap execution.


Liquidity Limits and Key Trade-Offs

In the common configuration, Raydium works best when the selected route has enough active liquidity to absorb the order without crossing sharply worse prices.

Trade size relative to active reserves sets price impact. A deep pool can quote a narrow spread for a modest order, while a thin pool pushes the curve farther and lowers output. CLMM adds a second constraint because liquidity outside the current tick range is inactive. Multi-hop routes reach pairs lacking a direct pool, yet every hop compounds fees and curve movement. Token-2022 transfer fees can reduce the delivered amount beyond the pool charge. Route splitting improves access to scattered depth, while a Jupiter aggregation quote compares Raydium with liquidity from other Solana venues.


Advanced Route Edges

Advanced Raydium swaps require attention to execution mode, token-program accounting and Solana transaction limits before a signature is requested.

Exact-Input and Exact-Output

Exact-input sets amount in plus minimum amount out, making wallet expenditure known. Exact-output sets desired amount out plus maximum amount in, making receipt known. The correct mode follows the fixed side of the task: budget-limited conversions favor exact-input, while an exact payment amount favors exact-output.

Token-2022 Accounting

CPMM and CLMM support selected Token-2022 extensions through their newer swap instructions. A transfer-fee mint deducts its configured token fee in addition to the pool charge, so the quote must use net received units. Classic AMM v4 accepts classic SPL Token mints. The token program is fixed when a mint is created and does not switch inside a route. The same ground is broken down in Ray review.

Versioned Transaction Constraints

A Solana transaction is capped at 1 232 bytes, each account address is 32 bytes and execution cannot request more than 1 400 000 compute units. Complex routes need many pool, vault and mint accounts, so V0 transactions use address lookup tables to compress account references. If a route exceeds size or compute limits, the client must choose a simpler route or separate operations; higher slippage cannot repair a structurally oversized transaction.

Is Raydium the Right Venue for a Solana Swap?

Ahead of that, Raydium fits a Solana swap when its own pools offer competitive net output and the user wants direct interaction with Raydium liquidity. Jupiter compares routes across multiple Solana venues, Orca Whirlpools offers another concentrated-liquidity design and Meteora DLMM organizes liquidity into discrete bins. Uniswap serves a similar AMM role across EVM networks when assets already live there. The decision turns on chain, mint support, route depth and final quoted output, not one venue name.

Before you start with Ray

Do I need RAY to make a Raydium swap?

RAY is not required to swap tokens or provide liquidity on Raydium. Network fees are paid in SOL, while the pool fee is deducted through the swap calculation. RAY is the protocol's SPL token and has separate uses connected to staking and protocol economics. Holding it does not reduce price impact, deepen the selected pool or replace the SOL needed for transaction fees.

Can a Ledger device sign a Raydium transaction?

A Ledger device can sign a Raydium swap when it is paired with a Solana wallet supporting the transaction format Raydium builds. Phantom and Solflare both provide Ledger connections. The wallet constructs the versioned transaction, the device displays signing data and the private key stays on the hardware. Complex routes may use address lookup tables, so the wallet software and Ledger firmware need compatible Solana support.

What happens if a signed transaction expires before confirmation?

A transaction whose blockhash expires before processing does not change the swap balances. Solana accepts a recent blockhash within its 151-hash processing window, commonly about 60 to 90 seconds because slot duration fluctuates. A wallet must build and sign a fresh transaction after expiry. Check the signature in an explorer first, since a delayed confirmation display does not prove the transaction missed the chain.

Does Raydium take custody of tokens during a swap?

Raydium does not take custody of a user account or private key during a swap. The connected wallet signs one Solana transaction authorizing specified token movements through pool program accounts. Pool vaults hold liquidity supplied by providers, while the user receives output in an associated token account. Control follows settlement rules enforced by the on-chain programs rather than an exchange withdrawal request.

Can SOL be swapped without manually creating wrapped SOL?

Native SOL can be swapped without manually creating a permanent WSOL balance. Raydium's transaction builder wraps SOL for pool-compatible SPL Token handling and unwraps WSOL output in the same transaction. A temporary associated token account may be created and closed as part of that flow. If WSOL remains after an interrupted flow, a compatible wallet can unwrap it into native SOL.

Does Raydium require a separate trading account?

Raydium does not require a separate username, password or custodial trading account for an on-chain swap. A Solana wallet address acts as the transaction identity and its key signs each instruction. Buying SOL through an exchange or payment service is a separate activity with its own account process. Raydium settles the swap against program-owned pool vaults after the wallet authorizes it.

Is Raydium able to swap Ethereum tokens directly?

Raydium cannot directly execute a swap against assets held on Ethereum because its pool programs settle on Solana. An asset must already exist in the connected Solana wallet as a supported SPL Token or Token-2022 mint. Moving value between chains is a separate bridge or exchange-withdrawal step. Wormhole and deBridge provide cross-chain transfer mechanisms, while Raydium handles the later Solana-side token exchange.