Raydium swap

Raydium swap is a trade; CLMM liquidity runs from deposit to exit

Raydium swap is a Solana token trade, while a Raydium concentrated-liquidity market maker position follows a deposit-to-exit lifecycle. An owner chooses a pool and price range, supplies the required SPL tokens, and receives a position NFT. The portfolio then shows token balances, unclaimed fees, and whether the live price remains inside the range. Rebalancing withdraws liquidity and opens a new range; a full exit removes liquidity, settles remaining balances, and closes the NFT-backed position.

Contents
A CLMM position earns swap fees only while the live tick stays between its two chosen boundaries.

Focused liquidity for an active Solana LP

Focused liquidity gives an active Solana LP a defined band where a Raydium swap routed through that pool affects the position.

A SOL/USDC or RAY/USDC position holds two assets while the current tick sits between its lower and upper endpoints. The owner receives one position NFT rather than a fungible LP token. As swaps move price through the band, pool math shifts the underlying token mix along the curve. Capital therefore works inside the selected interval, and the portfolio reports the range, liquidity, estimated token amounts, and accrued balances. Once price leaves either boundary, active fee participation stops and the position finishes on one side of the pair until price returns or the owner repositions it.

The lifecycle turns a single deposit into a range record that remains manageable through additions, reductions, collection, and closure.

The five-stage position lifecycle

The Raydium CLMM position lifecycle has five stages: prepare, deposit, read, adjust, and exit.

Each stage changes a different on-chain record or wallet balance. The order matters because a close instruction won't succeed while liquidity or accrued amounts remain attached.

Stage Position action Prerequisite already held
Prepare Select an existing CLMM pool and valid lower and upper boundaries A compatible Solana wallet, token pair, and SOL
Deposit Open the position and transfer the required pool tokens Token balances and an approved price range
Read Inspect the NFT, token amounts, live tick, and range status A confirmed open-position transaction
Adjust Decrease liquidity, collect balances, and open a fresh range New boundaries and the required token ratio
Exit Decrease to zero, settle accruals, and close the position Control of the position NFT
Summary One position moves from selected range to cleared account Pool selection, wallet control, token balances, and SOL

The table separates rebalancing from closing. Rebalancing replaces the range while capital stays in the strategy; closing removes the final position account and ends that range record.

The deposit begins with pool, range, and token amounts

A Raydium CLMM deposit starts by fixing the pool, two range boundaries, and the amount supplied.

Open the chosen pool in Raydium, then set lower and upper prices before entering either token amount. Phantom and Solflare can sign the same Solana instructions, while Raydium computes the second asset from the current price and selected endpoints. The wallet needs the required SOL, USDC, RAY, or other SPL Token balances, plus enough SOL for network fees and any new accounts. Read the confirmation as a deposit into a specific CLMM pool, not as a generic wallet transfer. One successful opening mints one position NFT and records two tick boundaries for later accounting.

When the current price sits between both endpoints, the deposit requires both pool assets in a ratio produced by CLMM math. A price at or outside one boundary permits a single-sided opening with the corresponding asset. The preview also reflects token transfer rules, the range's valid tick spacing, and any account creation needed. Review both maximum token inputs before signing because those limits bound what the instruction may take.

The confirmed NFT is the durable handle for every later increase, decrease, collection, and close action.

Reading balance and range status after deposit

A Raydium CLMM position reports three mechanical states: below range, in range, or above range.

In-range status means the lower tick is less than or equal to the current tick, while the current tick remains below the upper tick. The lower boundary is inclusive, and the upper boundary is exclusive. Below the range, the position holds one pool asset; at or above the upper boundary, it holds the other. The pool's token0 and token1 ordering determines which asset appears on each side, so read the displayed token amounts rather than inferring direction from ticker order.

The position card separates estimated deposited amounts from unclaimed fees and reward balances. It also preserves the original two endpoints after the market leaves them. A return inside the same interval activates the liquidity again without minting another NFT. That status gives the owner a concrete choice between waiting, reducing liquidity, or replacing the range.

How do I rebalance a Raydium CLMM position?

A Raydium CLMM rebalance removes liquidity from the old range and opens a new position around a chosen market band.

The two original endpoints don't move after minting, so rebalancing creates a replacement rather than editing the existing NFT. Start from the position's actual withdrawal mix, not its deposit mix.

  • Decrease liquidity with minimum output amounts set for both pool tokens.
  • Collect the old position's remaining fees and eligible rewards.
  • Swap only the inventory required to match the new range's deposit ratio.
  • Open a fresh position NFT with new lower and upper tick endpoints.

The withdrawn inventory reflects every swap that moved through the old range. Reopening near the live tick restores active liquidity, yet it also fixes the old range's inventory change in wallet balances. If the old position reaches zero liquidity and zero accruals, close it after the new NFT appears. Keeping both records briefly helps distinguish the completed withdrawal from the replacement deposit.

A price return doesn't move the old endpoints; it merely makes that unchanged band active again.

Partial withdrawal keeps the range record alive

A partial Raydium withdrawal reduces position liquidity while preserving the NFT, range endpoints, and remaining balance.

The decrease instruction accepts a liquidity amount and two minimum token outputs. Raydium's interface converts a percentage choice into the program's u128 liquidity value, then passes each output floor as a u64 token amount. Pool math calculates the returned token0 and token1 quantities from the live square-root price. Removing less than the full amount leaves the same NFT able to accrue fees whenever its range remains active.

A decrease also touches the position's fee and reward checkpoints, which brings its accounting forward before tokens leave the vaults. The remaining liquidity continues under the original two boundaries. Partial withdrawal therefore frees part of the inventory without creating another range record.

Accrued tokens stay separate from deposited liquidity

Raydium CLMM accrual remains separate from deposited liquidity until decrease and collection instructions transfer the owed tokens.

Swap fees accrue in the pool's two mints, and they don't auto-compound into position liquidity. Raydium stores two Q64.64 fee-growth checkpoints for each position, one per pool asset, then updates the owed amounts when an increase or decrease touches the record. A CLMM pool also holds as many as three reward streams, each with its own mint, emission schedule, and position counter. Rewards require an eligible active stream, while swap fees require the live tick to remain inside the selected range.

Collection sends owed tokens to the wallet's associated accounts. Increasing liquidity afterward is a separate signed action with a newly calculated pair ratio.

A complete exit clears three position balances

A complete Raydium exit reaches zero liquidity, settles accrued balances, and then closes the position account.

A valid close requires position liquidity, both fee-owed fields, and all three reward counters to equal zero. Decrease liquidity first, collect any remaining amounts, and submit the close instruction only after those values clear. The program then burns the NFT, closes its token account and PersonalPositionState, and returns eligible account rent to the NFT owner. Closing is therefore the final state change, not a substitute for withdrawal.

After confirmation, check the wallet's two destination token balances and confirm that the position has disappeared from the Raydium portfolio. A transaction signature marked successful proves the close executed, while the received asset mix records the economic exit. Those two checks separate a completed lifecycle from a position that merely has zero liquidity.

Range width changes inventory behavior

On the same footing, Raydium range width controls how quickly a CLMM position changes inventory as the market price moves.

A narrow band places more of the position's liquidity near the selected market area, so fewer tick movements reach an endpoint. A wider band spreads the same capital across more prices and stays active through a larger move. Neither choice changes the position's two-boundary structure: swaps still exchange one asset for the other as price travels through the interval. The meaningful trade-off is between concentrated participation and the frequency of range replacement, not a fixed return percentage. Current pool depth, trading flow, and future price movement determine the realized outcome.

At one boundary, the position becomes 100% one pool asset; at the other, it becomes 100% the second asset. For SOL/USDC, the visible price direction and the pool's token ordering determine which balance remains. The portfolio's estimated amounts provide the reliable inventory reading before a rebalance or exit. Related details are covered in Raydium swap walkthrough.

Range width therefore sets the distance available before active liquidity turns into a single-sided balance.

Ticks, spacing, and the position NFT under the hood

On a practical level, Raydium CLMM uses integer ticks, fixed spacing, packed arrays, and one NFT to represent a position.

Price indexing

On the operational side, Raydium adapts the concentrated-liquidity model associated with Uniswap v3 to Solana's account structure. Price lives as a Q64.64 square-root value, while ticks give interfaces readable range endpoints.

Tick boundaries

One tick multiplies price by 1.0001, equal to a 0.01% move, or one basis point. Valid endpoints stay between tick identifiers -443636 and 443636, and each endpoint must divide evenly by the pool's spacing. Common published CLMM configurations pair fee tiers of 0.01%, 0.05%, 0.25%, and 1.00% with tick spacings of 1, 10, 60, and 120, respectively. The chosen pool fixes that relationship before a position opens, so the interface snaps typed prices to reachable ticks.

Tick arrays

Under normal conditions, Raydium packs 60 adjacent tick slots into each TickArrayState. At spacing 60, one array spans 3,600 integer-tick units, and the pool's inline bitmap tracks 1,024 arrays on either side of tick zero. A broad position may touch several arrays, which increases the account set required by its opening transaction. Raydium SDK V2 derives those accounts before signing.

Ownership state

The position NFT has supply 1 and points to a PersonalPositionState containing liquidity, endpoints, fee checkpoints, and reward counters. PoolState carries the live tick and active liquidity shared across positions. SPL Token and Token-2022 both support position ownership through their respective token accounts. Builders using Anchor or Raydium SDK V2 derive the position address from the NFT mint, which keeps ownership and range accounting connected through every lifecycle action.

Token accounts and transaction edges at withdrawal

For that reason, Raydium withdrawals must resolve destination token accounts, transfer rules, and the native SOL wrapper before settlement.

Two token programs matter here: classic SPL Token and Token-2022. The Associated Token Program derives one canonical associated token account for each wallet-and-mint pair, and Raydium creates a missing destination when the instruction set permits it. A Token-2022 mint may apply its configured transfer fee when assets leave a vault, so the minimum output fields protect the net amounts received. The preview should show that deduction before the owner signs the decrease.

Native SOL enters token instructions as wrapped SOL, while Raydium's interface handles wrapping when the position action needs it. Keep enough unwrapped SOL available for the Solana transaction and any account creation. Closing the position NFT doesn't close the wallet's ordinary accounts for SOL, USDC, RAY, or the other pool asset.

The final wallet balances, successful signature, and absent position card together confirm a clean withdrawal and close.

Raydium banner listing swaps, yield, and liquidity slogans

Raydium swap FAQ

Is a Raydium CLMM position transferable between wallets?

Most Raydium CLMM positions can be transferred because the wallet holding the position NFT controls the position. The receiving wallet then gains the ability to increase or decrease liquidity, collect balances, and close it. A restricted-issuer position may have a frozen NFT token account, which blocks transfer while preserving management rights for its recorded owner. Check the NFT account state before planning a wallet-to-wallet move.

Where will a Raydium CLMM position appear in Phantom or Solflare?

The Raydium portfolio is the clearest protocol view because it reads the position NFT and its PersonalPositionState together. Phantom and Solflare may also display the NFT, although wallet presentation can emphasize collectible metadata instead of liquidity details. A correct Raydium position view should expose the pool pair, lower and upper boundaries, current range status, deposited amounts, and unclaimed balances.

Why can the required deposit ratio change before wallet confirmation?

The required deposit ratio changes when the pool's current tick moves between the quote and the signed transaction. A CLMM deposit derives both token amounts from the current price, lower tick, upper tick, and the amount entered as the base side. Raydium applies maximum input limits, so a larger move can stop the deposit instead of silently taking extra tokens. Refresh the quote and review both amounts again.

Can one wallet hold multiple ranges for the same Raydium pool?

One wallet can hold several Raydium CLMM positions for the same pool, with each range represented by its own NFT. The positions keep separate liquidity values, tick endpoints, fee checkpoints, and reward counters. This structure supports a broad base range alongside narrower ranges without merging their accounting. Portfolio totals may aggregate value, so open each position card before changing or withdrawing a specific band.

Is separate farm staking required for a Raydium CLMM position?

Separate farm staking isn't required for Raydium CLMM rewards because the position NFT itself carries the eligible liquidity record. Rewards accrue when the pool has an active reward stream and, under standard Raydium behavior, the position remains in range; swap fees use separate accounting. Up to three reward streams can exist in one CLMM pool. Collecting rewards moves them to the wallet without removing the position's deposited liquidity.