How Does Multi-Hop Routing Work on a DEX? Read a Two-Pool Swap

How Does Multi-Hop Routing Work on a DEX? Read a Two-Pool Swap


While previewing an illustrative LEASH-to-USDC swap on a decentralized exchange, you may see multi-hop routing send LEASH through a LEASH/WETH pool and then WETH through a WETH/USDC pool in one transaction before USDC reaches your wallet. On shiba swap, read the displayed route and compare its final USDC quote with any direct LEASH/USDC option before confirming. The extra pool can improve the price when a direct pool is missing or shallow, even though each pool charges a swap fee.

Why Does a DEX Route a Swap Through Two Pools?

A DEX uses two pools when the tokens have no usable direct pool or when a route through deeper pools offers more output. In the illustrative LEASH→WETH→USDC route, WETH is the connecting token: the first pool accepts LEASH and supplies WETH; the second accepts that WETH and supplies USDC. A thin direct LEASH/USDC pool may move sharply against your trade as you use its limited reserves. That change in the pool’s price during your swap is called price impact.

The router executes the chosen route as one swap transaction. A V2-style router takes your input amount and a path, an ordered array of token addresses such as [LEASH, WETH, USDC]. Each adjacent pair of addresses identifies a pool to use. The Uniswap V2 swap documentation shows how a router call supplies that path and a minimum acceptable output. The app or caller chooses the path; the router carries it out.

WETH never needs to enter your wallet. The router sends LEASH to the first pair contract, which swaps it for WETH and sends that WETH straight to the second pair’s address. The second pair then swaps WETH for USDC and sends the USDC to your wallet. That direct handoff is why the route remains one transaction rather than two swaps you must perform yourself.

You approve only the input token for the router. If you have not already granted enough LEASH allowance, its approval is a separate step before the swap transaction; the intermediate WETH needs no wallet approval. When reading a shiba swap route, three token names therefore describe two pool swaps, not three wallet transfers. This matters when you review your wallet activity or wonder why no WETH balance appeared.

More hops have a cost. Every pool applies its own swap fee, and calling another pool uses more gas. For h hops with the same fee fraction f, the combined pool-fee fraction is 1 − (1 − f)h. Two illustrative 0.3% hops amount to about 0.6% in combined pool fees. Actual fees depend on the pools used. The Uniswap V2 Core whitepaper describes the fee-adjusted rule each V2 pair enforces and notes the added fee cost of routing through two pairs. Its finding applies to V2-style pools; use the live quote to judge the particular pools and trade size in front of you.

Compare the final token amount, not just the number of hops. A deeper two-pool route can reduce price impact enough to outweigh its extra fee and gas, while a liquid direct pool may give more USDC. Also read the minimum received amount: it is your output floor. If the route cannot deliver at least that amount, the whole swap reverts, including both hops, though the failed transaction still uses gas.

What Is a DEX Aggregator and How Is It Different From a Router?

A DEX aggregator compares possible routes, often across multiple exchanges, to find a quote. A V2-style router executes a supplied path through pools on its exchange. An aggregator may call routers to complete its chosen trade. For the LEASH→WETH→USDC case, the distinction is between selecting a route and carrying its tokens through the two pools.

Can I Choose My Own Swap Route on a DEX?

You can choose a route when the interface offers route controls, or when you supply a valid path directly to a compatible V2-style router. The path must start with your input token, end with the token you want, and have a usable pool for each hop. Many swap screens choose a route for you, so inspect the quoted path, output and minimum received before signing.

Multi-hop routing is useful when deeper connecting pools produce more final tokens than a direct trade after fees and gas. Read each arrow as one pool swap, then judge the route by the USDC you expect to receive and the minimum you will accept.

Report Page