How the Raydium AMM works

Raydium is a constant-product automated market maker: each pool holds reserves of two tokens, the price is the ratio of those reserves, and every swap moves along a curve defined by x*y=k, paying slippage in proportion to its size relative to the pool depth. There is no order book and no counterparty to match - the pool itself quotes both sides automatically. Understanding this simple math explains everything downstream: why slippage happens, why depth matters, how liquidity providers earn, and why a volume bot has to trade the way it does.

A pool is just two reserves

A Raydium pool is a smart contract holding a reserve of two tokens - say SOL and some token. That is the whole market. There is no bid, no ask, and no one on the other side of your trade except the pool itself. The price of the token, expressed in SOL, is nothing more than the SOL reserve divided by the token reserve. If the pool holds twice as much SOL value as token value, the token is priced accordingly. Every trade changes those two reserves, and changing the reserves changes the price. That is the entire pricing engine, and it runs automatically without a human market maker.

Because the price is a direct function of the reserves, you can always compute it, and so can a bot. This transparency is what makes an AMM predictable: given the reserves, the price of any trade size is knowable in advance.

There is no order book on Raydium. The pool quotes both sides through the constant-product curve, so the only thing that sets price is the ratio of the two reserves.

The x*y=k formula

The rule the pool follows is the constant-product formula: x times y equals k. Here x is one reserve, y is the other, and k is a constant that must stay the same across a swap (before fees). When you buy the token with SOL, you add SOL to reserve x and take token out of reserve y - but their product has to remain equal to k. To keep the product constant, taking tokens out gets progressively more expensive: the more you buy, the fewer tokens each additional unit of SOL returns. That curve is why an AMM never runs out of liquidity and never quotes a flat price for unlimited size.

A quick intuition: imagine a pool with 100 SOL and 100 token, so k equals 10,000. Buy some token and you push SOL up and token down while keeping their product at 10,000. The first tokens are cheap; each further token costs more SOL than the last, because the reserve you are draining is shrinking. That escalating cost is slippage, and it is baked directly into the math.

One nuance worth knowing: Raydium also offers concentrated-liquidity (CLMM) pools, documented in Raydium's official docs, where liquidity providers choose a price range instead of covering the whole curve. The constant-product math above describes Raydium's standard AMM pools, which is where most new tokens land after graduation and what the rest of this guide assumes. The practical rules - depth sets slippage, size against the reserves, distributed flow reads cleaner - carry over to CLMM pools too, just with depth that varies by price range.

Slippage and depth

Slippage is the difference between the price you saw and the price you actually got, and it comes entirely from your own trade moving along the curve. The key variable is your trade size relative to the pool depth - the total liquidity in the reserves. A trade that is tiny next to a deep pool barely nudges the reserves, so it pays almost no slippage. The same trade in a thin pool drains a large fraction of a reserve, swinging the price hard and costing you real value. This is why depth is the single most important number when you plan any activity against a Raydium pool.

You protect yourself with a slippage tolerance: a maximum you are willing to accept, above which the swap reverts rather than filling at a bad price. Set it too tight and trades fail during normal movement; set it too loose and you overpay or get sandwiched. Reading the pool and choosing sizing that fits the depth is how you keep both slippage and failed transactions low.

Price impact in practice

Price impact is the flip side of slippage: how far your trade shifts the pool price for everyone. Because it scales with size over depth, the practical takeaway is that many small, well-sized trades move the chart far more gently than a few oversized ones. Oversized swaps in a thin pool create a jagged, obviously artificial sawtooth; distributed, depth-aware swaps produce a smooth tape that reads like a genuine market. Depth also recovers: as other traders swap in the opposite direction, the reserves rebalance and the price drifts back toward equilibrium. Understanding this rhythm is what lets you shape flow without wrecking the price you are trying to support.

Liquidity providers and fees

Someone has to supply the reserves, and that is what liquidity providers do. An LP deposits both tokens into a pool in the correct ratio and receives LP tokens representing their share. In return, every swap against the pool pays a small fee that is added back into the reserves, which slowly grows k and, with it, the value of each LP share. That fee is the LP compensation for two things: providing the depth that keeps price impact low, and bearing impermanent loss - the risk that the reserve ratio shifts against them as the price moves. Deeper pools mean smoother trading for everyone, which is why depth is valuable and why fees exist to attract it.

For volume generation, the LP fee is simply a cost of doing business: every swap pays it. That is one more reason sizing matters - you want the most volume and visibility per SOL, net of fees and slippage.

Why this shapes a volume bot

Everything above dictates how a Raydium volume bot must behave. Because slippage and price impact are tied to depth, a bot cannot fire fixed-size trades blindly - it has to read the live reserves and size each swap to stay inside a chosen slippage band, extracting the most volume per SOL while keeping the tape smooth. Because looping one wallet clusters on-chain and pays maximum repeated slippage, it spreads flow across a rotating fleet of independent wallets, which also lifts unique holders. And because balanced buying and selling nets out on price while still counting as volume, a well-built bot can generate real, visible activity without necessarily pushing the price around - though net buy pressure will tilt it. The AMM math is the reason depth-aware, distributed, MEV-protected trading is the only approach that produces volume reading as a genuine market. To see that applied, read how to increase volume on Raydium or compare tools in the best Raydium volume bot guide.

Frequently asked questions

How does the Raydium AMM set a price?

Price comes from the ratio of the two token reserves in a pool. If a pool holds SOL and a token, the token price in SOL is simply the SOL reserve divided by the token reserve. There is no order book - the pool quotes both sides automatically through the constant-product curve.

What is the x*y=k formula in plain terms?

It means the product of the two reserves stays constant across a swap. If x is one reserve and y is the other, x times y equals a fixed number k. When you buy, you add to one side and remove from the other so their product stays equal to k, and that math is what determines your price and slippage.

What is slippage on Raydium?

Slippage is the gap between the price you expected and the price you actually got, caused by your own trade moving along the curve. Bigger trades relative to pool depth move price more and pay more slippage. You set a slippage tolerance so a swap reverts if it would exceed it.

What is the difference between depth and price impact?

Depth is how much liquidity sits in the pool; price impact is how far a given trade shifts the price. Deeper pools mean lower price impact for the same trade size. Thin pools swing hard on small trades. Depth and price impact are two sides of the same reserve math.

How do liquidity providers and fees work?

Liquidity providers deposit both tokens into a pool and earn a share of the swap fee every time someone trades against it. The fee is added to the reserves, slowly growing k, which is how LPs are compensated for supplying the depth that makes trading possible.

Why does the AMM shape how a volume bot must trade?

Because every swap pays slippage tied to pool depth, a volume bot cannot just fire fixed-size trades. It has to read live reserves and size each swap to stay inside a sane slippage band, or it wastes capital and jags the chart. The AMM math is why depth-aware sizing exists.

Does trading volume change the pool price by itself?

Balanced buying and selling roughly cancels out on price while still registering as volume. Net buying pressure pushes price up along the curve; net selling pushes it down. Volume raises visibility, but price still tracks the net direction of flow and real demand.

What happens when a token graduates onto Raydium?

When a token leaves a launchpad bonding curve, liquidity is typically seeded into a Raydium pool and trading opens against the constant-product curve. From that point the pool reserves set the price and all the AMM mechanics in this guide apply.

The Raydium AMM is not complicated once you see it as two reserves obeying x*y=k, with price, slippage and fees all falling out of that one rule. That math is exactly why volume must be generated carefully - depth-aware, distributed and protected - rather than brute-forced. When you want that done for your pool, open the dashboard. None of this is financial advice.