Deciphr Academy
Track 4 · Module 17 · Lesson 6 of 7 · 8 min read

What do DEX aggregators and routers do, and what are the main risks of swapping on a DEX?

Short answer

Routers and aggregators find a path for your swap and can split it across several pools, so less is lost to price impact.1,2 The main risks are approvals that let a contract spend your tokens, bugs in the code, fake tokens that copy a real token's name, and traders who jump ahead of big swaps.3,4,5,6

Your walletAggregatorfinds the routeapprovePool APool BPool CsplitApprove only what you needCheck the contract addressSmaller slices move each pool's price less
Fig. 6. An aggregator can split one swap across several pools. Before it can move your tokens, you must approve it.

Why routing matters

Uniswap v2 lets anyone create a pool for any two ERC-20 tokens, and v3 allows several pools for the same pair, each with its own fee.7,8 The v2 whitepaper says so many pools can make it harder to find the best path for a trade, and that a router or aggregator can handle the routing.7

Routers

A router is a smart contract that sends your swap through one or more pools. Uniswap's Universal Router, for example, combines trades across Uniswap v2, v3 and v4, and can split and interleave them in one transaction.1 Uniswap's documentation says it has no owner and cannot be upgraded.1

Uniswap Labs' terms add a limit. Its "Auto Routing" only routes through pools on the Uniswap protocol, and it says it can't guarantee the best price.9

Aggregators

An aggregator looks wider. 1inch, which runs one, describes an aggregator as a protocol that compares swap prices across many DEXs at once, then routes your order along the best path, splitting it when that pays more.2

The reason to split is price impact. As 1inch puts it, an AMM prices a swap from its reserves, so the larger your order compared with the pool, the worse your average rate.2,10 Smaller slices in several pools each move the price less.2

1inch says it never takes custody of your tokens. It also says an aggregator cannot remove market risk.2 Naming 1inch here is not a recommendation.

Approvals: letting a contract spend your tokens

A router can only move your tokens if you allow it. Uniswap's documentation, for example, says its Universal Router pulls tokens through a contract called Permit2: you approve Permit2 once for each token, then sign to authorise each swap.1

Approvals can be abused, as Module 10 explains. ethereum.org warns that some malicious developers build backdoors into contracts to reach the funds of users who interact with them.3 Its advice:3

  • Only approve what you need. It recommends never giving a project unlimited access to your tokens.3
  • Revoke approvals regularly. Disconnecting your wallet from a website does not cancel an approval.3
  • Avoid untested new projects.3

Bugs in the code

ethereum.org warns that Ethereum products, like any software, can suffer from bugs and exploits.4 The BIS notes that DeFi insurance exists for risks such as exchange hacks and smart contract failures.11 Uniswap Labs' terms warn that blockchain transactions are irreversible once confirmed.9

Fake tokens with the same name

Anyone can create a token. ethereum.org warns that ERC-20 token contracts can use the same name and symbol as other tokens, so you cannot rely on those for safety.5 A scam token may look like the real one but be worth nothing.5

What a scam token cannot copy is the contract address.5 ethereum.org says the best source for a real token's address is the organisation whose token it is.5 Uniswap Labs' terms say its products may show warning labels on some tokens, but that its token information is not a recommendation that a token is safe.9 Module 12 explains token contracts.

Traders who jump ahead

Unless it is sent privately, your swap waits in public, in the mempool, before it is added to a block (Module 2 explains this).6 ethereum.org describes "sandwich" trading: a trader watches for large DEX swaps, buys just before one, then sells just after it, at the higher price the big swap caused.6 People who are sandwiched get worse prices.6

Uniswap's documentation for v2, an older version, says the Uniswap front-end used a slippage tolerance, 0.5% by default. The swap only goes through if the rate is no more than that much worse than expected.12 Module 18 explains how Uniswap Labs' app now sets one automatically, and covers sandwich attacks in more detail.

Our viewThe AMM's maths is predictable. The risks to watch are the ones around it: approving the wrong contract, buying a look-alike token, or swapping in public where bots can see you. Checking the contract address takes a minute.
Sources
  1. Universal Router Overview. Uniswap Developers documentation (read 22 October 2026).
  2. What is a DEX aggregator?. 1inch Learn (read 22 October 2026).
  3. How to revoke smart contract access to your crypto funds. ethereum.org (read 22 October 2026).
  4. What is DeFi?. ethereum.org (read 22 October 2026).
  5. How to identify scam tokens. ethereum.org (read 22 October 2026).
  6. Maximal extractable value (MEV). ethereum.org (read 22 October 2026; rechecked 24 October 2026).
  7. Uniswap v2 Core (whitepaper). Hayden Adams, Noah Zinsmeister and Dan Robinson, March 2020.
  8. Fees. Uniswap Developers documentation (read 22 October 2026).
  9. Uniswap Labs Terms of Service (last modified 28 July 2026). Uniswap Labs; read via a Wayback Machine copy of 19 September 2026, as the live page showed a bot check.
  10. How Uniswap Works. Uniswap Developers documentation (read 22 October 2026).
  11. The crypto ecosystem: key elements and risks (report to the G20). Bank for International Settlements, 11 July 2023.
  12. Uniswap v2 Pricing. Uniswap Developers documentation (read 22 October 2026).

General education built from the publicly available sources listed above. Not financial, legal, tax or investment advice. Naming a company, project or regulator is not an endorsement either way. Last checked 2026-10-24. Terms and disclaimer.