🤖 AI Summary
Decentralized exchanges (DEXs) lack systematic, theoretically grounded metrics for quantifying market efficiency. Method: We propose Standardized Total Arbitrage Profit (STAP)—the first computable, theory-based DEX efficiency metric—proven to equal zero under full market efficiency. Leveraging convex optimization and graph-theoretic modeling, we formalize a token routing framework integrating depth-first search (DFS) and line-graph algorithms, empirically evaluated on real Uniswap V2 data (11 tokens, 18 liquidity pools). Contribution/Results: Maximizing STAP eliminates all arbitrage opportunities. DFS-based routing significantly outperforms line-graph routing in improving market efficiency, trader surplus, and liquidity providers’ total value locked (TVL). This work establishes STAP as a unified benchmark for cross-DEX and DEX–CEX arbitrage detection and efficiency optimization, providing both theoretical foundations and practical tools for on-chain market design.
📝 Abstract
The efficiency of decentralized exchanges (DEXs) and the influence of token routing algorithms on market performance and stakeholder outcomes remain underexplored. This paper introduces the concept of Standardized Total Arbitrage Profit (STAP), computed via convex optimization, as a systematic measure of DEX efficiency. We prove that executing the trade order maximizing STAP and reintegrating the resulting transaction fees eliminates all arbitrage opportunities-both cyclic arbitrage within DEXs and between DEXs and centralized exchanges (CEXs). In a fully efficient DEX (i.e., STAP = 0), the monetary value of target tokens received must not exceed that of the source tokens, regardless of the routing algorithm. Any violation indicates arbitrage potential, making STAP a reliable metric for arbitrage detection. Using a token graph comprising 11 tokens and 18 liquidity pools based on Uniswap V2 data, we observe a decline in DEX efficiency between June 21 and November 8, 2024. Simulations comparing two routing algorithms-Yu Zhang et al.'s line-graph-based method and the depth-first search (DFS) algorithm-show that employing more profitable routing improves DEX efficiency and trader returns over time. Moreover, while total value locked (TVL) remains stable with the line-graph method, it increases under the DFS algorithm, indicating greater aggregate benefits for liquidity providers.