ChainBridge
Intermediate10 min read

Smart Order Routing: Finding the Best Price Across 7 DEXs

Every DEX aggregator taps into different liquidity pools and routing algorithms. ChainBridge queries all 7 simultaneously and picks the best price for every trade.

Key Takeaways

  • ChainBridge compares real-time quotes from 7 DEX aggregators to guarantee you the best available price
  • Each aggregator accesses different liquidity sources, so the best price varies by token pair and trade size
  • Gas costs are factored into the comparison so the recommended route truly minimizes your total cost
  • Split routing can divide large trades across multiple aggregators to reduce price impact

What is a Smart Order Router?

A Smart Order Router (SOR) is a system that queries multiple decentralized exchange (DEX) aggregators in parallel, compares the resulting quotes, and selects the route that gives you the most output tokens for your input. Think of it like a meta-search engine for DeFi prices: instead of checking each aggregator manually, the SOR does it for you in under a second.

Each aggregator has its own routing algorithm and liquidity source integrations. 0x might find a better path through Uniswap V3 and Curve, while 1inch might route through SushiSwap and DODO. The SOR compares all these paths and picks the winner for each specific trade.

Best Price Guarantee

By comparing quotes from 7 independent aggregators in parallel, ChainBridge finds the absolute best price available. Each aggregator has access to different liquidity sources, so the best price varies depending on the token pair, trade size, and current market conditions.

Gas-Aware Optimization

A slightly better quote on one aggregator might not actually save you money if it requires more gas. ChainBridge factors in estimated gas costs when comparing quotes, ensuring the recommended route truly minimizes your total cost.

Split Routing

For large trades, executing through a single liquidity source can cause significant price impact. ChainBridge's advanced router can split your trade across multiple aggregators and routes, reducing slippage and improving your overall execution price.

Automatic Fallback

If one aggregator is slow or returns an error, ChainBridge automatically falls back to the remaining sources. You always get a quote as long as at least one aggregator is responsive.

How It Works

When you enter a swap on ChainBridge, the following happens behind the scenes:

1

You Enter a Trade

Select your sell token, buy token, and amount. ChainBridge detects the chain you're connected to and your wallet address.

2

Parallel Quote Fetching

The SOR sends your trade parameters to all 7 aggregator APIs simultaneously. Each aggregator returns its best quote within a 10-second timeout window.

3

Normalization & Comparison

Quotes arrive in different formats. The SOR normalizes all responses to a common format, calculates the net output after gas costs, and ranks them by effective price.

4

Best Quote Selected

The highest-output quote becomes the recommended route. You see all quotes in a comparison table so you can verify the selection or choose a different aggregator if you prefer.

5

Execution

When you confirm the swap, ChainBridge routes your transaction through the selected aggregator's contracts. Slippage protection ensures you won't receive less than your minimum amount.

The 7 Aggregators

Each aggregator brings unique strengths to the table. Here is a breakdown of all 7 sources that ChainBridge queries for every swap.

0x (Matcha)

ETH, Arbitrum, Base, Optimism

Permit2 gasless approvals, deep multi-source liquidity

1inch

ETH, Arbitrum, Base, Optimism

Fusion mode for MEV-protected swaps, Pathfinder algorithm

ParaSwap

ETH, Arbitrum, Base, Optimism

Augustus router with optimized gas, multi-path routing

KyberSwap

ETH, Arbitrum, Base, Optimism

Dynamic trade routing across 100+ liquidity sources

UniswapX

ETH, Arbitrum, Base, Polygon

Intent-based trading, Dutch auction pricing, zero gas for takers

Balancer V3

ETH, Arbitrum, Base, Optimism, Polygon

GraphQL SOR, weighted pools, composable stable pools

Thorchain

ETH, BNB, Avalanche + BTC, DOGE, LTC

Native cross-chain swaps without wrapped tokens

Advanced: Split Routing

For larger trades, sending the entire amount through a single route can cause significant price impact. ChainBridge's advanced router can split your trade across multiple aggregators, executing portions through different liquidity paths simultaneously.

How Split Routing Decides

  • The router re-quotes each split portion independently against each aggregator
  • Gas overhead is deducted (each additional transaction costs ~21,000 base gas)
  • A split is only used if the net benefit exceeds 10 basis points (0.1%) after gas
  • Most small-to-medium trades route through a single aggregator; splits kick in for large positions

Get the Best Price on Every Swap

ChainBridge compares 7 aggregators in real time so you never overpay. Connect your wallet and start swapping.

Start SwappingBack to Learning Hub