Independent discussion of crypto, wallets, cards and markets
Forum Home > Exchanges & Trading > Decentralized Exchanges > DEX aggregator mechanics: how the router finds your price
DEX aggregator mechanics: how the router finds your price32 replies · 2,292 views
Thread ToolsShow Printable Version · Subscribe to this Thread · Search Thread
Where to open an account: Open a Trustee account.

DEX aggregator mechanics

When you swap through an aggregator, the router is doing something you are not watching: comparing dozens of venues, splitting your trade, and picking the path with the best net result. Understanding the mechanics explains why your fill sometimes beats any single pool and sometimes does not.

Route splitting

  • A large trade usually beats the best single pool only if it is split: part through one venue, part through another
  • The router solves for the split that minimizes total price impact plus fees across venues
  • Splits increase transaction count, so gas can eat the savings on small trades

RFQ sources

  • Some routes come from request-for-quote sources: market makers quote a firm price for your size
  • RFQ fills can beat any pool because the maker is pricing inventory, not just the curve
  • The tradeoff: RFQ routes depend on makers being present and willing, so coverage is uneven

Gas estimation that decides the route

  • The router estimates the gas cost of each candidate route, including multi-hop and split paths
  • On congested networks, the cheapest-looking route can lose to gas, and the router re-ranks accordingly
  • This is why the same pair can take different routes on different days: the cost environment changed

What to check when a route looks wrong

  • Compare the quoted output against the best single pool manually for small trades
  • Check whether the route used a venue you trust, because splits can land on thin pools
  • Watch the slippage setting: too tight reverts the whole route, too loose invites bad fills

The takeaway

Aggregators are optimization engines: they split trades across venues, price RFQ inventory, and re-rank routes against gas. The engine is only as good as its venue coverage and its gas estimates. For large trades it usually wins; for small trades, check the math yourself, because the optimization floor is gas.

Thread Statistics32 replies · 2,292 views