SwappingIntermediate

Smart Order Routing: How ChainBridge Picks the Best Route

How the router queries 0x, KyberSwap and ParaSwap in parallel, ranks quotes by net amount after fees and gas, and checks every route before you sign.

ChainBridge ResearchUpdated 5 min read

On this page6 sections

Key takeaways

  • ChainBridge does not route through pools itself: it asks 0x, 0x Gasless, KyberSwap and ParaSwap for a route in parallel and compares their answers.
  • Quotes are ranked by what you actually receive, after the platform fee and the network gas cost, not by the headline price.
  • Each aggregator splits large orders across pools inside its own route; ChainBridge sends your trade through the single best route in one transaction.
  • Before you sign, the route contract is checked against an allowlist, the token is screened and the transaction is simulated when it can be.

What smart order routing means

A DEX aggregator searches many liquidity pools and market makers to find the best way to fill your trade. Each aggregator has its own pool integrations and its own routing algorithm, so for the same trade they often return different amounts.

ChainBridge's smart order router sits one level above: it asks several aggregators for a quote at the same time and keeps the one that leaves you the most. Think of it as a meta-search engine for swap prices. Which source wins changes with the pair, the trade size, the network and the moment, which is why checking several beats trusting one.

From your input to a ranked quote

You enter tokens, amount and networkPlatform fee set once from trade size0xpools + market makers0x Gaslessrelayer pays gasKyberSwapon-chain routeParaSwapon-chain routeQuoted in parallel, only where the source is live on that networkRank by net amount: output after fee and gasReview: contract allowlist, token safety, simulationYou sign the winning route
How a same-chain swap quote is built, compared and checked on ChainBridge.
  1. The fee is set once

    The router works out the platform fee from the USD size of the trade before asking anyone. Every source that carries the fee receives the same value, so no source can look cheaper by charging less.

  2. Sources are asked in parallel

    Each source live on your network gets the request at the same time, with a 10-second limit. A source that keeps failing is paused for a minute so it cannot slow down every quote.

  3. Answers are normalized and ranked

    Quotes arrive in different formats. The router converts them to one shape, drops any that are malformed or empty, and ranks the rest by net amount received.

  4. The best route is checked at review

    When you open the review screen, the winning route is rebuilt as a real transaction and goes through the safety checks described below.

  5. You sign

    The trade executes through that one aggregator in a single transaction (or a single signed order for gasless). The minimum amount out protects you if the price moves before it lands.

The sources compared

ChainBridge supports Ethereum, Arbitrum, Base, Optimism, Polygon, BNB Chain, Avalanche and Linea. Not every source is live on every network:

Liquidity sources used by the router
SourceHow it fills your tradeNetworks
0xRoutes across DEX pools and professional market makers; the swap pulls tokens through a Permit2 signature.All eight networks
0x GaslessYou sign an order and the 0x relayer submits it; its gas cost is taken from the trade.All except Linea
KyberSwapOn-chain route split across pools on many DEXs, approved and sent like a normal transaction.All eight networks
ParaSwapOn-chain route split across pools, approved and sent like a normal transaction.All except Linea

Gasless and Permit2 routes need an off-chain signature that smart contract wallets such as Safe cannot produce. If you swap from one, the review screen points you to an on-chain route such as KyberSwap or ParaSwap instead. See smart contract wallets.

Why net amount beats the headline price

The best-looking output is not always the best deal. A route through more pools can quote a slightly higher amount but burn more gas. The router subtracts the gas cost, converted into the token you receive, before comparing. A quote whose gas cannot be priced is charged the highest gas cost seen, so it cannot win by leaving it out.

Route A (example)

  • Quotes 2,401 USDC
  • Gas about $6 on mainnet
  • Net: about 2,395 USDC

Route B (example)

  • Quotes 2,399 USDC
  • Gas about $2
  • Net: about 2,397 USDC, wins

The platform fee is also in the comparison. It depends on trade size and is already deducted from the amounts you see:

ChainBridge platform fee by trade size
Trade sizePlatform fee
Under $1,0000.05%
$1,000 to $9,9990.1%
$10,000 and above0.2%
USD value unknown0.1%
Stablecoin pair, any size0.01%

A source that does not carry the platform fee still competes on the same net basis. If it leaves you more, it wins and ChainBridge earns nothing on that trade. Positive slippage, when the price moves in your favour, is never captured: it stays with you. More detail in swap fees.

Who splits large orders

Sending a large trade through one pool causes heavy price impact. Aggregators avoid that by splitting the order across several pools and hops inside a single transaction: part through one DEX, part through another, sometimes through an intermediate token.

That splitting happens inside each aggregator's route. ChainBridge compares the split routes each one proposes and sends your whole trade through the one with the best net result. You pay gas for one transaction, not one per pool.

Checks before you sign

Picking the best number is half the job. The other half is making sure the route does what it claims.

  • Contract allowlist. The contract the transaction calls and every approval spender are checked against a list of known aggregator contracts, on the server and again in your browser before you sign. An unknown address blocks the swap.
  • Token safety. Tokens flagged as honeypots, unsellable or with a sell tax above 10% are blocked. See token safety checks.
  • Simulation. On-chain routes are simulated with the exact transaction and any pending approvals. If the simulation reverts, the swap is blocked before you pay gas. Signed orders and Permit2 routes cannot be simulated before you sign; the review screen says so. See transaction simulation.
  • One confirmation when possible. If your wallet supports atomic batches (EIP-5792), the approval and the swap go in one confirmation. See one-click swaps.

Put it into practice

Compare 0x, KyberSwap and ParaSwap in one quote, with every route checked before you sign.

Start swapping