For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

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 router recommends a route using the current quote and available liquidity. The user reviews the route, output, fees and recipient, then authorizes the transaction in their wallet before execution.

  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