What a DEX aggregator does
The same pair of tokens often trades in several pools: on different DEXes, with different curves and very different Liquidity. Their prices drift apart between trades. Checking each pool by hand is slow, and the best one for $100 may not be the best one for $10,000, because price impact grows with size.
An aggregator does that work. For your pair and amount it asks for quotes from the pools it knows and builds a route:
- Best single pool. Sometimes one deep pool beats everything else.
- Split. A large trade is cut into parts that go through several pools at once, so each part moves its pool's price less.
- Multi-hop. When there is no direct pool, or it is thin, the route goes through an intermediate token, for example XYZ → GRAM → USD₮.
An aggregator has no pools of its own. It does not set prices or hold liquidity; it only chooses where your Swap goes. The tokens still trade in the DEXes' pools, and their fees stay in the quote.
Why the route matters, in numbers
Say you want to swap 10,000 GRAM for XYZ. Pool A has 100,000 GRAM on its GRAM side, pool B has 50,000, and both pools price XYZ the same. In a constant-product pool the price impact is about your trade divided by the reserve plus your trade:
- All in pool A: 10,000 / 110,000 ≈ 9%.
- 6,700 into A and 3,300 into B: 6,700 / 106,700 and 3,300 / 53,300, about 6% in each pool, so roughly 6% overall.
On 10,000 GRAM that is nearly 300 GRAM more value back, before fees.
The aggregator does this kind of sum for every quote, and also weighs the extra network fee of each additional route and step. More routes are not always better: on a small trade the extra fees can eat the saving.
DEX aggregators on TON and DYOR Swap
On TON an aggregator routes between DEXes such as DeDust, STON.fi and TONCO. A swap here is a chain of messages between contracts, so a long route has its own costs: every step uses more gas, and a route that stops halfway because the price moved can leave you holding the intermediate token instead of the one you wanted.
DYOR Swap is an aggregator. It looks for the best rate for your pair across the decentralized exchanges on TON and can split one trade over several routes. The Savings figure shows how much the chosen route gives compared with a single route. In Expert Mode you can set the maximum number of routes and of steps within a route, avoid pools with low TVL or highly volatile pools, and set a minimum savings: below it, intermediate tokens and splitting are not used and a single route is chosen. The Protocols list picks which DEXes the swap may use. You sign in your own wallet through TON Connect, and DYOR adds no fee of its own on top of the exchanges' fees.
Other aggregators on TON are listed in the Trade Platforms category of the dapps catalog, for example swap.coffee.
What an aggregator cannot fix
- Thin markets. If all the pools of a token are small, the best route is still expensive. Check the token's liquidity first.
- Bad tokens. An aggregator finds the best price for the token you picked, not the right token. If you picked a copy or a scam token, it will buy that efficiently. Pick the token by its Contract address and run it through Token check.
- Slippage. The route is computed for the price at quote time. Your Slippage tolerance still decides how far the result may drift.