For the complete documentation index, see llms.txt. This page is also available as Markdown.

AI Route Optimization

WheelX uses AI-driven algorithms to optimize transaction routes in real-time, selecting the best execution path across multiple dimensions — price, speed, slippage, gas cost, and liquidity depth.

How It Works

When a user submits an intent (e.g., swap Token A on Chain X for Token B on Chain Y), the AI Router evaluates all available execution paths in parallel:

  1. Path discovery — The router identifies every viable route across supported DEXs, bridges, and liquidity pools.

  2. Multi-dimensional scoring — Each path is scored across five optimization dimensions:

    • Price — Best available output amount across aggregated liquidity sources

    • Speed — Estimated fill time based on current network congestion and bridge latency

    • Slippage — Predicted slippage based on trade size vs. pool depth

    • Gas cost — Total gas expenditure across all hops in the route

    • Liquidity depth — Available pool capacity to absorb the trade without adverse price impact

  3. Optimal selection — The path with the highest composite score is selected and executed. Less optimal paths are discarded.

  4. Continuous learning — Every executed transaction feeds back into the model, improving future routing decisions based on real-world performance data.

Key Differentiator: Dynamic vs Static Routing

Static Routing
AI Routing

Path selection

Fixed pre-configured routes

Real-time dynamic evaluation

Market response

Does not adapt to changing conditions

Instantly adjusts to price shifts, congestion, and liquidity changes

Optimization scope

Single dimension (usually price)

Multi-dimensional (price, speed, slippage, gas, liquidity)

Learning capability

No improvement over time

Continuously improves from every executed transaction

Benefits

  • Better execution prices — Aggregates liquidity from multiple DEXs and bridges to find the best available price

  • Faster transaction completion — Avoids congested chains and slow bridges in real time

  • Reduced slippage — Matches trade size to pool depth, routing large trades through deeper liquidity sources

  • Lower gas costs — Optimizes route structure to minimize total gas across all hops

  • Adaptive to market conditions — Responds instantly to price movements, network congestion, and liquidity shifts

Last updated

Was this helpful?