Papers
Topics
Authors
Recent
Assistant
AI Research Assistant
Well-researched responses based on relevant abstracts and paper content.
Custom Instructions Pro
Preferences or requirements that you'd like Emergent Mind to consider when generating responses.
Gemini 2.5 Flash
Gemini 2.5 Flash 134 tok/s
Gemini 2.5 Pro 41 tok/s Pro
GPT-5 Medium 28 tok/s Pro
GPT-5 High 33 tok/s Pro
GPT-4o 70 tok/s Pro
Kimi K2 205 tok/s Pro
GPT OSS 120B 428 tok/s Pro
Claude Sonnet 4.5 37 tok/s Pro
2000 character limit reached

Cyclic Arbitrage in DEXs

Updated 26 October 2025
  • Cyclic arbitrage in DEXs is the atomic execution of closed-loop token trades that exploit price discrepancies across liquidity pools.
  • Detection algorithms use modified graph models and bisection on CPMM equations to identify profitable arbitrage cycles efficiently.
  • Economic analyses indicate significant arbitrage volumes that influence MEV dynamics and trigger advanced protocol designs for security.

Cyclic arbitrage in decentralized exchanges (DEXs) refers to the atomic execution of a sequence of trades that forms a closed loop in the asset exchange network, resulting in a net profit from price discrepancies that exist across different pools or trading paths. Unlike traditional markets, DEX cyclic arbitrage leverages blockchain-specific mechanisms—such as atomic smart contract execution, public transaction ordering, and on-chain liquidity pools—which fundamentally alter both the operational security and economic dynamics of arbitrage strategies. This article provides a comprehensive account of cyclic arbitrage in DEXs, synthesizing theoretical models, empirical findings, design impacts, and security considerations from recent research.

1. Fundamentals of Cyclic Arbitrage on DEXs

Cyclic arbitrage exploits the non-equivalence between the direct and cross-rates for token pairs within the interconnected pool structure of DEXs. Given a set of tokens and their associated liquidity pools, a cyclic arbitrage opportunity is present if traversing a loop of trades—for example, A→B→C→A—yields more of the starting token than was initially committed, after accounting for fees and slippage. A basic mathematical condition for an n-token cyclic arbitrage is:

(a2,1a3,2a1,n)/(a1,2a2,3an,1)>1/(r1nr2n)(a_{2,1} \cdot a_{3,2} \cdots a_{1,n})/(a_{1,2} \cdot a_{2,3} \cdots a_{n,1}) > 1/(r_1^n r_2^n)

where ai,ja_{i,j} are the pool reserves and rkr_k the corresponding fee factors (Wang et al., 2021). This condition generalizes to the product of forward quoted prices exceeding the compounded fee denominator.

Nearly all practical cyclic arbitrage on DEXs is executed atomically: the sequence of trades is bundled in a single transaction, ensuring that execution either occurs in its entirety or is reverted. This atomicity eliminates traditional execution risk arising from partial fills or orderbook slippage—any adverse price movement between the legs cancels the entire transaction at the cost of gas fees only (Wang et al., 2021). Consequently, the incentive to identify and respond to transient price discrepancies is high, and competition for inclusion in the next block is intense.

2. Detection Algorithms and Cycle Identification

Formal detection of cyclic arbitrage opportunities in DEXs is framed as a negative-weight cycle problem in an exchange-rate graph. A canonical approach deploys modified Bellman–Ford algorithms, operating on a weighted graph where edge weights correspond to the negative logarithm of effective exchange rates (including fees):

pi,j=log[(1λ)(rj/ri)]p_{i,j} = -\log[(1-\lambda)\cdot(r_j/r_i)]

for edge (i,j)(i, j), with ri,rjr_i, r_j as pool reserves and λ\lambda as the effective fee (Zhang et al., 24 Jun 2024, Peduzzi et al., 2021). A negative cycle directly translates to a profitable arbitrage loop.

Recent advances utilize line graph transformations combined with extra source nodes and novel edge-cut rules to simultaneously detect arbitrage cycles from any specified starting token and to identify profitable non-loop paths (arbitrageurs ending up with a different token). This approach solves several key limitations of previous Moore-Bellman-Ford implementations—namely, the inability to specify start tokens, restricted coverage of cycles per run, and exclusion of non-loop arbitrage paths (Zhang et al., 24 Jun 2024).

Once cycles are detected, profit maximization is solved via bisection on the constant product market maker (CPMM) equation (Uniswap V2):

[x+(1λ)Δx](yΔy)=xy[x + (1-\lambda)\Delta x] \cdot (y-\Delta y) = x \cdot y

with the optimum at the point where the marginal output ratio equals unity or, for non-loop paths, matches a reference price on a CEX (Zhang et al., 24 Jun 2024). Optimized cycle detection algorithms identify not only more arbitrage opportunities but also systematically larger potential profits compared to previous methods (Zhang et al., 24 Jun 2024).

3. Atomic Execution, Frontrunning, and Priority Gas Auctions

Atomic arbitrage in DEXs is facilitated by smart contracts that execute multi-hop trades in a single transaction. This property guarantees that all legs of the arbitrage loop succeed together or the entire transaction reverts. As all pending transactions are visible in the public mempool, sophisticated bots monitor for profitable atomic arbitrage submissions and compete to have their own version included first. The outcome is the “priority gas auction” (PGA), a continuous-time, all-pay auction where each bot repeatedly resubmits its arbitrage attempt with incrementally higher gas fees, seeking to outbid competitors for priority transaction inclusion (Daian et al., 2019).

Let pp denote the theoretical arbitrage profit and gg the gas fee bid; the profit function is formulated as:

maxg[pg]\max_g [p - g]

The incremental gas fee race continues until the marginal cost of bidding exceeds the residual profit, frequently eroding the arbitrage margin nearly to zero (Daian et al., 2019). Even losing bots pay partial gas costs due to partial execution, as failed transactions are still charged for attempted computation.

This auction dynamic does not differentiate between “pure” cross-venue arbitrage and cyclic arbitrage: the mechanism for gaming priority is identical, and escalating gas competition can cause profit opportunities to vanish or convert to a net loss if frictional costs outpace price discrepancies (Daian et al., 2019).

4. Economic and Empirical Properties of Cyclic Arbitrage

Empirical analyses demonstrate that cyclic arbitrage is an inherent and persistent phenomenon in DEXs. For example, in Uniswap V2, more than 290,000 cyclic arbitrages were executed in an 11-month span, generating >138>138 million USD in revenue. Despite this scale, substantial unexploited opportunities (>1 ETH per block) often remain, indicating that DEXs are not perfectly efficient (Wang et al., 2021). Statistical data further reveal:

  • High correlation between periods of volatile token prices and surges in cyclic arbitrage frequency, profit, and decreased block duration of opportunities (Berg et al., 2022).
  • Most cyclic arbitrage is executed atomically: only about 0.03% of attempts are made sequentially, and atomic implementations enjoy dramatically lower negative-revenue rates (\approx0.3%) than sequential implementations (>50%) (Wang et al., 2021).
  • Transaction cost structure—most notably, gas fees—scales poorly for small trades. Persistent cyclic arbitrage deviations are observed: average triangular price gaps in major stablecoin triplets are 10–30 bps (contrasted with CEXs at <5 bps), intensified by high gas fee regimes (Barbon et al., 2021).

Empirical support is also observed for the central role of arbitrage in restoration of pool pricing: in volatile regimes, liquidity providers bear the losses captured by arbitrageurs (the so-called “impermanent loss”) (Capponi et al., 2021).

5. Protocol Design, Routing, and Efficiency Metrics

The presence and magnitude of cyclic arbitrage are closely tied to DEX design choices:

  • AMM invariants and pricing curve curvature: Greater curvature (as in constant product pools) reduces the arbitrage gap but also reduces investor surplus; there is an optimal curvature that balances efficiency and liquidity provision (Capponi et al., 2021).
  • Token pooling: Pooling more than two tokens increases expected arbitrage losses; arbitrageurs can synthesize more advantageous cycles across more dimensions, as formalized for 2- vs. 3-token pools (Capponi et al., 2021).
  • Routing algorithms: Variants including depth-first search (DFS) and line-graph-based enhancements directly influence detected arbitrage potential. Superior routing (line-graph method) finds systematically more profitable paths and reduces Standardized Total Arbitrage Profit (STAP)—a convex optimization-based efficiency metric that quantifies residual arbitrage after optimal path selection. As STAP\rightarrow0, the DEX becomes “arbitrage-complete” (Zhang et al., 5 Aug 2025).
  • Batch-clearing architectures: Batch-clearing with Arrow–Debreu-derived global price assignments, as in SPEEDEX, eliminates all internal cyclic arbitrage by design. All trades in a block face the same exchange rate matrix, and traversing any loop yields no net gain (Ramseyer et al., 2021).

Significant innovations (e.g., Uniswap v3's Multiple Fee Tiering and Discretionary Price Ranges) narrow price deviations and reduce arbitrage rent, especially for large trades (Barbon et al., 2021).

6. Security, Market Microstructure, and Systemic Risks

Cyclic arbitrage is a source and conduit for Miner (or Maximal) Extractable Value (MEV)—the value miners can capture by controlling the ordering and inclusion of transactions. Excessive MEV regimes incentivize miners to reorder transactions, execute fee-based forking (“time-bandit attacks”), or even monopolize the inclusion of arbitrage cycles, introducing consensus-layer security risks (Daian et al., 2019). Empirically, arbitrage and associated MEV have been shown to incentivize network-level behaviors that undermine block finality and fairness.

Architectural responses to these problems include:

  • A2MM (Automated Arbitrage Market Maker): Internalizes routing and atomic arbitrage between multiple AMMs, reducing MEV leakage and the incentive for external bots to front-run or spam the network. Empirical claims include reductions of up to 90% in swap fees and 32.8% in block-space consumption attributable to AMM transactions (Zhou et al., 2021).
  • Non-atomic arbitrage: Recent research highlights the distinction between pure on-chain cyclic arbitrage and non-atomic arbitrage combining DEX and off-chain CEX legs. The latter introduces a different risk and centralization profile, as the two transaction legs are exposed to market drift, and large searchers dominate participation, sometimes controlling >>80% of MEV volume (Heimbach et al., 3 Jan 2024, Wu et al., 17 Jul 2025).

Protocols integrating atomic cycle execution and efficient on-chain routing, along with the separation of top-of-block extraction or block time reduction, are discussed as systemic mitigations (Heimbach et al., 3 Jan 2024, Zhou et al., 2021).

7. Advanced Frameworks and Open Directions

Recent advances have included convex optimization-based methods for measuring and eliminating all cyclic arbitrage (and DEX–CEX arbitrage) (Zhang et al., 5 Aug 2025), asset-matrix and Coincidence of Wants (CoW) cycle mechanisms for rigorous, slippage-free trade execution (Nag et al., 14 Jul 2025), and mean-field game modeling of liquidity provider and MEV bot interaction for predictive pool evolution (Bayraktar et al., 13 Apr 2024).

Empirical and theoretical studies consistently find that DEXs become less cyclic-arbitrage-efficient during periods of high volatility or low liquidity, and that improved routing, atomic batch-clearing, or integrated cycle closing mechanisms systematically reduce residual arbitrage (Zhang et al., 5 Aug 2025, Ramseyer et al., 2021, Nag et al., 14 Jul 2025). The persistence and scale of cyclic arbitrage (as high as 0.25% of trading volume on ZKsync) further suggest ongoing opportunities as well as persistent market inefficiencies, especially across L2 rollups and cross-chain venues (Gogol et al., 4 Jun 2024).

Open research challenges include optimal routing for complex graph topologies, risk quantification in non-atomic and cross-rollup settings, robust measurement of MEV under diverse protocol conditions, and the investigation of optimal convex formulations for market-wide cyclic equilibrium.


This synthesis draws directly from the mathematical formulations, empirical approaches, and protocol designs in the cited literature, providing an authoritative reference for the structure, mechanisms, and ongoing evolution of cyclic arbitrage in decentralized exchanges.

Forward Email Streamline Icon: https://streamlinehq.com

Follow Topic

Get notified by email when new papers are published related to Cyclic Arbitrage in Decentralized Exchanges (DEXs).