A swap router uses a quoted path through one or more liquidity pools to exchange your tokens in a single transaction. The path might go straight from token A to token B, or pass through an intermediate token if that produces a better result. For an occasional trader, the key is to compare what you receive after pool fees and network costs—not just the apparent price in one pool.
A route is a sequence of pools
A route names the tokens and pools the trade will use. In a simple automated market maker, each pool holds two tokens and prices a trade using its reserves. A direct route uses one pool; a multi-hop route sends the output from one pool into the next, all within the same transaction.
For example, imagine swapping Token A for Token B. A direct A/B pool quotes 994 B for your trade. A route through A/WETH and WETH/B quotes 1,002 B before network costs. These figures are illustrative: the second route may win if its two pools are deeper or charge lower fees, but its extra hop also adds execution work and can add cost.
For a concrete Base-network example, base swap exchange refers to trading through BaseSwap, an AMM decentralized exchange on Base. The same route logic applies: available pools and their liquidity shape the path, while the quoted result helps you judge whether an intermediate token is useful.
The quote usually chooses the route; the contract carries it out
The distinction that matters is that a router contract does not necessarily search every possible pool when your transaction executes. Often, an app or routing program checks available pools and calculates candidate paths first; it then sends the chosen path and trade limits to the router. The router uses that specified path to move tokens through the pools.
For a classic constant-product pool, reserves roughly follow x × y = k. As a trade takes tokens out, the reserve ratio changes, so the price moves against the trader. The quote calculation accounts for each pool’s fee and this price impact at every hop. Routes may also split a trade across pools when the improvement in output justifies the extra execution.
This explains why the largest pool is not automatically the best route. A smaller pool with a lower fee can sometimes quote better for a small trade; for a larger trade, its shallow reserves may cause more price impact. The decision is based on the output for your trade size and the costs of executing that path.
Pool fees, network costs, and price movement all matter
A route’s quoted output usually reflects pool fees and estimated price impact. Network gas is a separate transaction cost, commonly paid in the chain’s gas token. Each extra hop can mean more contract work, so a path with a slightly higher token output may leave you worse off after gas, especially for a small swap.
Compare the two illustrative routes again: the two-hop path offers 8 B more before gas. If its extra execution cost is worth 10 B at the relevant market price, the direct route is better on a net basis. The exact conversion depends on current prices and network conditions, so treat a quote as an estimate rather than a guaranteed fill.
There is also a difference between price impact and slippage. Price impact comes from your trade changing pool reserves; slippage is the further price movement that can happen while your transaction waits to be included. A minimum-output limit protects against receiving too little: if execution falls below that amount, the transaction reverts, though you may still pay network costs.
Check the path and limits before confirming
Before you approve a base swap or another AMM trade, take a moment to check what the route is doing. A route through a familiar intermediate token can be sensible; an unfamiliar token or a surprising number of hops deserves another look. Confirm that the token addresses are the ones you intend to trade, since similar names do not guarantee the same asset.
- Check the input and output tokens and the displayed route.
- Compare estimated output after fees and network costs.
- Review the minimum output and slippage tolerance; wider tolerance can allow a worse fill.
- Recheck the quote if the market has moved or the transaction is delayed.
A router makes a multi-pool swap atomic: either the specified path meets its execution conditions, or the swap reverts. For a trade you make only a few times a year, the practical rule is simple: choose the route with the best credible net output, then confirm that its path and minimum output match what you meant to trade.