Citation
Xu, H., Zhu, Y., Huang, Y., Tang, J. “PRIME: Efficient Algorithm for Token Graph Routing Problem.” arXiv:2603.08337v1 [cs.DB] (Mar 9, 2026). HKUST-GZ / NTU / NUS.
Core Problem
DEX aggregation and MEV arbitrage both require solving the Token Graph Routing Problem (TGRP): given a large, dynamic graph where tokens are vertices and exchange pairs are edges, find the optimal multi-hop routing path that maximizes output.
Existing solutions fail due to non-linear, concave swap functions (AMM price impact): edge weights change as you route through them, making standard graph algorithms inapplicable.
PRIME Algorithm
Two-stage iterative algorithm:
Stage 1: Pruned Graph Search
- Identifies high-potential routing paths
- Prunes low-probability paths early using heuristic bounds
- Reduces the search space from exponential to tractable
Stage 2: Convex Optimization
- Formulates the allocation task as a strongly convex optimization problem
- Solved using Adaptive Sign Gradient Method (ASGM) with linear convergence rate
- Finds optimal split ratios across multiple paths simultaneously
Empirical Results (Real Ethereum Data)
| Metric | PRIME vs. Uniswap Routing |
|---|---|
| Price improvement (large trades) | +8.42 basis points |
| Computation reduction | -96.7% |
| Validation | Deployed in hedge fund production |
The 8.42 bps improvement is significant: for large trades, routing decisions alone can be worth millions of dollars annually.
Why This Matters for MEV
Arbitrage Bots
- Multi-hop arbitrage cycles require solving exactly this routing problem
- PRIME provides a more efficient algorithm → lower latency → competitive advantage in MEV races
- The 96.7% compute reduction means PRIME can run many more simulations per second than current algorithms
DEX Aggregators
- PropAMMs, 1inch, Uniswap v4 hooks all need optimal routing
- PRIME improves execution quality for users → reduces the “bad execution” that creates MEV opportunities
- Better aggregator routing → smaller residual arbitrage opportunities left on the table
Block Builders
- Builders internally optimize transaction ordering and routing
- PRIME-style algorithms improve the value of blocks that include complex arbitrage bundles
Connection to Existing Wiki
- Arbitrage: CEX-DEX and AMM Arb: PRIME provides the algorithmic foundation for multi-hop CEX-DEX and DEX-DEX arbitrage
- Intents, Solvers, and Cross-Chain Execution (ERC-7683): Solver competition for CoW Protocol, 1inch, etc. is partly a routing optimization competition
Related Pages
- Arbitrage: CEX-DEX and AMM Arb — Multi-hop arbitrage mechanics
- Intents, Solvers, and Cross-Chain Execution (ERC-7683) — Solvers routing intents optimally
- PropAMMs: Proportional AMMs and On-Chain Market Making — PropAMM aggregator routing; quote staleness