Learn · Execution
How order routing finds the best price
When you request a swap on an aggregator, a lot happens in the moment before a quote appears. The router is searching across many liquidity sources, comparing direct and multi-hop paths, sometimes splitting your order, and accounting for fees and gas to find the route that leaves you with the most tokens. Understanding how that routing works demystifies the quote you see and explains why an aggregator usually beats trading on a single pool. This article walks through the routing process step by step.
The problem routing solves
Direct, multi-hop, and split routes
Net output, not headline price
Why quotes expire
Legal
Risk disclosure
XAUConnect is a non-custodial swap aggregator. Digital assets are volatile and may lose value rapidly. Content on this page is educational and not investment advice. Verify every contract address on the official block explorer before approving a transaction.
Frequently asked questions
Why does an aggregator beat a single pool?
It surveys many pools and protocols and assembles the best path — direct, multi-hop, or split — for your exact trade size, instead of accepting one venue's price and impact.
Is a multi-hop or split route worse?
Not necessarily. Extra hops add fees and impact but can still yield more net output. The router optimizes for tokens actually received, so judge by the minimum received.
What does the router actually optimize?
Net output after all pool fees, price impact, and gas — not the headline price of any single leg.
Why do quotes expire?
Routing reflects the current state of pools, which changes as others trade. Quotes refresh so the route and price stay accurate; re-quote before signing for fresh data.
Trade on XAUConnect
Open the swap page to compare live routes, set slippage, and sign from your own wallet — fully non-custodial.
Continue exploring
Related markets, guides & networks
Curated next steps based on this topic — deepen your research before you trade.
How to connect MetaMask to a DEX
Connect MetaMask to a DEX safely: install and secure the wallet, add networks with the right chain IDs, and understand e
How to bridge assets between chains
Bridge assets between chains safely: pick a route by net amount received, budget gas on both sides, know the destination
What is a token approval and why does it matter?
Before a router can move your ERC-20s it needs an approval. How allowances work, the risk of unlimited approvals, why st
Stablecoins: USDC vs USDT vs DAI
Not all stablecoins are the same: USDC, USDT, and DAI collateral models compared, plus the native-vs-bridged variant tra
Understanding aggregator and protocol fees
The fees on a DEX trade: LP fee, aggregator/platform fee, and gas. How each is calculated, where it shows in the quote,
Build programmatically
Swap via API for bots and AI agents — quotes, builds, and cross-chain routes.