Enter your Raydium CPMM liquidity pool address to securely add liquidity positions and expand token workflows on Solana. You can add liquidity to your token pools and remove liquidity later to receive your tokens back when you want to exit or rebalance.
This tool calculates the required pair ratio automatically using current pool pricing. You must provide both assets proportionally to add liquidity successfully.
Adding liquidity on Raydium means depositing both tokens of a pair (for example, TOKEN/SOL) into a Solana liquidity pool. In return, you receive LP tokens representing your share.
Follow these steps to add liquidity using IDX Tools on Raydium:
Enter Pool Address
Enter your Raydium CPMM liquidity pool address to securely add liquidity pool positions.
Set Deposit Amounts
Choose the deposit amount for the Base Token and Quote Token.
Add Liquidity
Click Add Liquidity to submit your deposit and complete the transaction.
If you want to add liquidity to your token pool safely, this flow helps you:
Adding liquidity through IDX AutoBot typically costs about 0.1 SOL. You can add liquidity to any existing Raydium CPMM pair, even if you did not create it.
LP tokens represent your ownership share of the liquidity pool. Keep them secure, because they are required to remove liquidity later. When you remove liquidity, LP tokens are burned and the underlying assets are returned based on your pool share.
addLiquidity helper
export async function addLiquidity(
connection, raydium, userWallet, poolStateFromUI, userInput, options = {}
) {
const { slippageBps = DEFAULT_SLIPPAGE_BPS, ...txOptions } = options;
const poolRatio = calculatePoolRatio(poolStateFromUI);
const parsed = parseUserInput(userInput, poolStateFromUI);
let finalAmountARaw = parsed.amountARaw;
let finalAmountBRaw = parsed.amountBRaw;
let finalAmountAHuman = parsed.amountAHuman;
let finalAmountBHuman = parsed.amountBHuman;
if (parsed.inputSide === "A") {
const c = computeRequiredPairAmount(parsed.amountARaw, "A", poolStateFromUI);
finalAmountBRaw = c.requiredAmountRaw; finalAmountBHuman = c.requiredAmountHuman;
} else if (parsed.inputSide === "B") {
const c = computeRequiredPairAmount(parsed.amountBRaw, "B", poolStateFromUI);
finalAmountARaw = c.requiredAmountRaw; finalAmountAHuman = c.requiredAmountHuman;
}
const withSlippage = applySlippage(finalAmountARaw, finalAmountBRaw, slippageBps);
const result = await buildAddLiquidityTransaction(
connection, raydium, userWallet, poolStateFromUI, withSlippage, txOptions
);
return {
setupTx: result.setupTx,
depositTx: result.depositTx,
setupBlockhash: result.setupBlockhash,
setupLastValidBlockHeight: result.setupLastValidBlockHeight,
depositBlockhash: result.depositBlockhash,
lastValidBlockHeight: result.lastValidBlockHeight,
transaction: result.depositTx,
blockhash: result.depositBlockhash,
userAtaA: result.userAtaA,
userAtaB: result.userAtaB,
userAtaLP: result.userAtaLP,
missingAtaCount: result.missingAtaCount,
costBreakdown: result.costBreakdown,
quote: {
amountAHuman: finalAmountAHuman, amountBHuman: finalAmountBHuman,
amountARaw: finalAmountARaw, amountBRaw: finalAmountBRaw,
minAmountARaw: withSlippage.minAmountARaw, minAmountBRaw: withSlippage.minAmountBRaw,
slippagePct: withSlippage.slippagePct,
},
poolRatio,
};
}A liquidity pool pairs your token with a quote asset such as SOL, USDC, or USDT.
Adding liquidity can reduce volatility, because larger pooled reserves absorb trades better.
If one side of the pair is depleted, trading becomes inefficient or impossible until liquidity is restored.
Raydium is one of the most widely used CPMM liquidity providers on Solana.
Adding liquidity on Raydium is one of the most common Solana approaches and involves depositing a token pair into a smart contract to enable swaps between those assets.