DEX Aggregator
A DEX aggregator searches many pools and exchanges and splits a swap across them to get a better overall price. A router contract is the smart contract that carries out the swap through the chosen path of pools.
Liquidity in DeFi is spread over many exchanges and pools. A DEX aggregator searches them and routes your swap to get the best overall price after fees and gas.
- Category
- Cryptocurrency and Blockchain
- Reading time
- 3 min
- Also called
- Swap aggregator, Smart order router, Liquidity aggregator
- Updated
A DEX aggregator in plain words
DEX aggregators query many trading protocols to find the best terms for a trade, including price, fee and slippage.1
They can split one trade across several protocols so the whole trade gets the best rate.1
Some even act as an aggregator of aggregators.1
How an aggregator routes a swap
Enter the trade
Choose tokens, amount and a slippage limit.
Scan venues
The aggregator queries many protocols for price, fees and slippage.1
Split the order
Large trades may be split across up to seven paths in one router's design.2
Factor in gas
Extra hops are added only if they improve the effective price.2
Add fees
Any aggregator fee is added to the fees of the underlying protocols.1
Execute and check
Sign, then compare the received amount with the quote.
Worked examples
Example 1 — Split beats single pool
+$3,000Hypothetically you swap 100 ETH. Pool A alone gives an average $2,950; splitting 60/40 with pool B averages $2,980.
| Single pool | 100 × $2,950 = $295,000 |
| Split route | 100 × $2,980 = $298,000 |
| Improvement | $298,000 − $295,000 = $3,000 |
Splitting a trade across protocols aims to get the best rate in total.1
Example 2 — Gas eats a small trade
−$3, so skip the hopHypothetically a $500 swap gains $2 from an extra hop that costs $5 in gas.
| Price gain | +$2 |
| Extra gas | −$5 |
| Net | $2 − $5 = −$3 |
A router that counts gas only adds the extra hop when the better price still wins after fees.2
Example 3 — Aggregator fee
$45 in feesHypothetically a $10,000 swap, 0.3% pool fee, plus a 0.15% aggregator fee.
| Pool fee | $10,000 × 0.003 = $30 |
| Aggregator fee | $10,000 × 0.0015 = $15 |
| Total | $30 + $15 = $45 |
Aggregator fees are added on top of the protocols' own fees.1
DEX aggregator vs single DEX
| Aspect | Aggregator | Single DEX |
|---|---|---|
| Liquidity sources | Many protocols | One |
| Order splitting | Yes | Within its own pools |
| Extra fee | Sometimes | No |
| Smart contract risk | Router plus venues | Venue only |
Where aggregators help
Large swaps
Reduce Slippage by splitting size.
Thin pairs
Find Liquidity for small-cap tokens.
Cost control
Compare total Trading Fees and Commissions including gas.
Execution quality
Get an on-chain equivalent of best execution for a Market Order.
Advantages and disadvantages
Advantages
- Better prices on larger trades.
- One interface for many venues.
- Gas-aware routing for small trades.
- Saves manual price comparison.
Disadvantages
- Extra fee on some platforms.
- More smart contracts involved.
- Quotes can change before execution.
- Approvals to router contracts add risk.
Going deeper
Read as far as you need. Each level builds on the one before it.
Shopping around for you
Beginner
Aggregators query many protocols to find the best price, fee and slippage.1
Price impact
Intermediate
Uniswap Labs reported a large stablecoin swap whose price impact could fall to as low as −0.749% with its router, showing how splitting helps size.2
Compliance angle
Advanced
The U.S. Treasury notes chain-hopping can be done through a DEX or aggregator, so rules on such services differ by country and are evolving.3
Common mistakes
Loose slippage settings
Allowing far worse fills than quoted.
Ignoring gas
Chasing a tiny price gain that costs more.
Unlimited approvals
Granting router contracts unlimited token access.
Fake front-ends
Using a phishing copy of an aggregator site.
Check your understanding
Test yourself before moving on. Each answer comes with an explanation.
Key points to remember
- Aggregators search many DEXs.
- They split trades for better rates.
- Gas is part of the calculation.
- Fees can stack.
- Extra contracts add risk.
Frequently asked questions
Is an aggregator always cheaper?
Does it hold my funds?
What is an aggregator of aggregators?
Further learning
- Slippage
What splitting reduces.
- Liquidity
Why depth varies.
- Trading Fees and Commissions
Fee stacking.
- Market Order
How swaps execute.
Sources
This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.
- IOSCO. Decentralized Finance Report (OR01/2022) (opens in a new tab) Checked .
- Uniswap Labs. Introducing the Auto Router (opens in a new tab) Checked .
- U.S. Department of the Treasury. Illicit Finance Risk Assessment of Decentralized Finance (2023) (opens in a new tab) Checked .
Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.