The last step of the old "how to buy" instructions was a single sentence: swap SOL for the token on a decentralised exchange or aggregator. A lot happens inside that sentence, and knowing what happens explains why the price you get is often not the price you saw.
Liquidity pools
An automated market maker (AMM) holds two assets in a pool. The simplest and most common design keeps the product of the two balances constant: if the pool holds x SOL and y tokens, then x × y stays the same after every trade (fees aside). When you add SOL, the pool must give out enough tokens to keep the product unchanged. The bigger your trade relative to the pool, the worse the rate.
Price impact and slippage
- Price impact is the move your own trade causes in a pool. In a small pool, even a modest swap can shift the price by several percent.
- Slippage is the difference between the quote you saw and the price you received, caused by other trades landing first. Your slippage tolerance setting is the worst result you agree to accept.
A very high slippage tolerance invites trouble. Bots watch for transactions that accept a bad price and trade around them, a pattern known as a sandwich.
| Cost | Who receives it | Typical size |
|---|---|---|
| Network fee | Validators | A tiny fraction of a cent, more with priority fees |
| Pool fee | Liquidity providers | Often a fraction of a percent |
| Price impact | The pool's other side | Small to very large, depending on pool depth |
| Slippage | Whoever traded first | Up to your tolerance setting |
Order books
Solana also has on-chain order books, where buyers and sellers post prices and wait to be matched, just as on a traditional exchange. They suit larger, more liquid markets; brand-new tokens almost always start in AMM pools.
Aggregators
An aggregator does not hold liquidity itself. It checks many pools and order books, then splits your trade across several routes to get a better overall price. Aggregators are why a swap on Solana can show three or four hops for what looks like a simple trade.
Spread, fee, edge
Every swap carries small costs that add up, much as a casino's edge adds up over many bets. The comparison is closer than it sounds, and we lay it out side by side in house edge, slippage and swap fees.
Quick answers
As low as lets the trade succeed. High tolerances mainly benefit bots that trade around your transaction.
Splitting across pools reduces price impact in each one, which usually gives a better total rate.
