Crypto is permissionless, right? Since anyone can build anything, many protocols offer similar services. These protocols charge different rates, which means you have to find the one that works for you, as they usually offer the best rates.
Instead of manually checking multiple DEXs for the best rates, aggregators do the heavy lifting and find optimal prices automatically.
What if you could easily find the best rates from all the protocols and trade from one place? That’s what DeFi Aggregators do!

What Is a DEX Aggregator

DEX aggregators are innovative tools that scan multiple decentralized exchanges at once to find the best price for your trade so you can trade directly on one interface at the best price.
Trading on a single DEX without checking aggregators could cost you significant money on large trades due to suboptimal pricing.
If you just go to the first DEX you know, you might be leaving money on the table. You don’t need to visit all the exchanges on by one to find the best rate. The aggregator does that for you automatically. You can also select where you want your trade to go through on most DEX aggregators. Better price, fewer clicks. Win-win situation.

How DEX Aggregators Work

DEX Aggregators use different algorithms and methods to get you the best rates. But they don’t just look at price. They also check:
  • Liquidity — is there enough to fill your trade without considerable slippage?
  • Gas fees — because saving 10onpricedoesnthelpifgascosts10 on price doesn't help if gas costs 20
  • Execution time — how fast and reliable is this trade?
  • Success rate — will this transaction go through?
Aggregators optimize for total value, not just price. They factor in gas costs, slippage, and execution probability.
all to provide the best option for you to trade. In some cases, the aggregator may split the trade across DEXs or liquidity pools to provide the best rates. Let’s say you’re swapping 1000 SUI → USDC.
  • Cetus has a good rate for the first 4000 USDC.
  • Steamm offers a better rate for the next 3000 USDC.
  • Momentum is best for the last 3000 USDC.
The aggregator will break the trade into chunks, route each part to the optimal DEX, then bundle it all into one transaction for you.
Smart routing can save you significant money on large trades by splitting orders across multiple liquidity sources for optimal execution.
All the price checks, liquidity math, route splitting, smart contract execution, and everything else happens in seconds, in one transaction, on one interface.

How to use a DEX Aggregator

There are many DEX aggregators on Sui, including Aftermath, FlowX, and & 7K to mention a few. In this tutorial, we wil use Aftermath’s aggregation feature

Visit the Aggregator

Visit Aftermath’s aggregator on aftermath.finance/trade and connect your wallet to get started. You need to have some tokens that you’ll swap ready in your wallet to move forward. image.png

Enter the Amount You Want to Swap

Enter the amount of tokens you want to swap to get an estimated amount of the tokens you’ll receive (usually the best rates across DEXs) Now you can proceed with your swap and it will be executed on the DEX/DEXs with the best rate.a image.png

Check the Routes

You can check the route (the DEXs and transactions) your transaction would go through to understand what the aggregator is doing beneath the hood. image.png

Customize Liquidity Sources

You can customize liquidity sources (select specific DEXs) that the aggregator should use for your swaps when you’re trading. This is handy if you’re trying to target specific DEXs for reasons like campaigns and user rewards. image.png Using a DEX aggregator is always a great idea when you’re trading on-chain, and since they allow you to customize liquidity sources, you can still participate.