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 41 tok/s Pro
GPT-5 High 39 tok/s Pro
GPT-4o 89 tok/s Pro
Kimi K2 192 tok/s Pro
GPT OSS 120B 437 tok/s Pro
Claude Sonnet 4.5 37 tok/s Pro
2000 character limit reached

Cyclic Arbitrage in DEXs

Updated 20 October 2025
  • Cyclic arbitrage is the exploitation of temporary pricing inefficiencies in decentralized exchanges through closed-cycle trades that yield net profits.
  • Atomic smart contract transactions ensure that all legs of an arbitrage cycle are executed seamlessly, eliminating risks from slippage and frontrunning.
  • Optimized trade sizing and advanced routing algorithms enhance profitability while highlighting the trade-offs between market efficiency and liquidity provider risks.

Cyclic arbitrage in decentralized exchanges (DEXs) refers to the exploitation of temporary price misalignments among multiple trading pairs such that a trader can execute a closed cycle of trades—starting and ending with the same asset—to secure a net profit. This phenomenon is central to the economic microstructure of automated market makers (AMMs) and orderbook-based DEXs. Recent research has systematically characterized the conditions, mechanisms, and consequences of cyclic arbitrage, and illuminated its effects on market efficiency, liquidity provider (LP) risk, protocol incentives, and system-level security. The following sections synthesize the principal findings from contemporary studies.

1. Mechanisms and Detection of Cyclic Arbitrage

A cyclic arbitrage opportunity arises when the product of exchange rates along a closed cycle of token pairs in DEX pools exceeds one (after deducting all trading fees), i.e.,

(i,j)cyclepij>1k=1nrk\prod_{(i, j)\in\text{cycle}} p_{ij} > \frac{1}{\prod_{k=1}^n r_k}

where %%%%1%%%% is the effective exchange rate (including fees) from asset ii to jj and rkr_k is the fee multiplier on trade kk. When this inequality holds, a trader can start with δ1\delta_1 units of asset A1A_1, sequentially trade through a path A1A2AnA1A_1\to A_2\to \ldots\to A_n\to A_1, and finish with δ1>δ1\delta_1' > \delta_1 units of A1A_1.

The detection of such opportunities relies on constructing a graph of all token pairs—either in AMM pools or orderbooks—with log-transformed weights encoding the effective exchange rates (including fees). The presence of a negative-weight cycle in this logarithmic graph indicates a profitable cyclic arbitrage opportunity. Classical algorithms, including Bellman-Ford and its modifications, are employed for this detection. Advanced methods leverage line graphs and augmented node constructs to increase detection scope and efficiency, allowing specification of arbitrary source tokens and finding both loop and non-loop (open-chain) arbitrage paths, as well as exhaustive enumeration of profitable cycles (Zhang et al., 24 Jun 2024).

2. Optimal Execution: Atomic Transactions and Smart Contracts

DEX cyclic arbitrage is typically implemented via atomic transactions using smart contracts. The arbitrageur bundles the entire cyclic sequence of trades within a single blockchain transaction, ensuring atomicity: either all legs of the cycle are executed in sequence, or the transaction is reverted (in which case, only the gas fee is lost). This atomic model eliminates the risk of intermediate execution failure due to adverse state changes (e.g., price impact induced by other transactions) between legs of the arbitrage cycle (Wang et al., 2021). In practice, nearly all observed cyclic arbitrage on platforms such as Uniswap V2 over substantial periods is performed atomically via custom smart contracts, with empirical evidence showing over 99.9% execution success for well-crafted contracts.

Atomic execution is critical in permissionless DEX markets, where adversaries may attempt to frontrun or "backrun" slower, non-atomic (sequential) arbitrage implementations. In empirical studies, sequential implementations routinely result in financial losses due to price impact or frontrunning between transactions, whereas atomic contracts are highly robust.

3. Profitability Conditions and Optimization

For a given arbitrage cycle, profit maximization is formulated as a constrained nonlinear optimization problem. Let ff denote pool reserves/price functions (e.g., constant product for Uniswap V2), and let δ1\delta_1 be the input size for asset A1A_1. The optimal trade size δ1\delta_1^* maximizes the net output after passing through all legs of the cycle:

U(δ1)=δ1(δ1)δ1U(\delta_1) = \delta_1'(\delta_1) - \delta_1

where δ1(δ1)\delta_1'(\delta_1) is the procedure output of A1A_1 after traversing the cycle, given the nonlinearity and possible slippage at each pool. The maximizing δ1\delta_1^* is obtained by solving U/δ1=0\partial U/\partial \delta_1 = 0 numerically or in closed form for specific path structures (e.g., via iterated substitution for constant product pools).

Recent research generalizes this to monetize profit in fiat terms using external CEX prices. The "MaxMax" strategy evaluates all possible starting tokens in a cycle, computes the net token gain and its fiat value using current CEX prices, and selects the maximal among these (Zhang et al., 24 Jun 2024). Convex optimization methods have further been introduced to co-optimize inputs and outputs across multiple cycles and pools, potentially yielding superior results, albeit with increased computational burden.

4. Systemic Effects: Market Efficiency, Liquidity Provider Risk, and MEV

Cyclic arbitrage is a principal force driving price alignment across pools and DEXes, but its impact is multifaceted:

  • Market Efficiency: Empirical studies demonstrate that cyclic arbitrage becomes especially prevalent during periods of high underlying market volatility, when AMM reserves cannot instantly track volatile spot prices (Berg et al., 2022). The exploitation of these opportunities by bots reduces mispricings and contributes to aggregate market efficiency, but they also reveal limitations of the AMM design.
  • Liquidity Provider (LP) Value Loss: Each arbitrage intervention "rebalances" the AMM reserves, typically extracting value from LPs to the benefit of arbitrageurs. This loss—impermanent loss—is formalized as

IL=1pA(T)x2+pB(T)y2pA(T)x1+pB(T)y1IL = 1 - \frac{p_A^{(T)}x_2 + p_B^{(T)}y_2}{p_A^{(T)}x_1 + p_B^{(T)}y_1}

where (x1,y1)(x_1, y_1) are LP holdings at deposit and (x2,y2)(x_2, y_2) after the arbitrage, and pA(T),pB(T)p_A^{(T)}, p_B^{(T)} are prices. In cyclical markets (with reversions), these losses are permanent for LPs, as arbitrageurs systematically extract surplus before any pool state can revert (Capponi et al., 2021). Nonetheless, fees earned from the arbitragers’ volumes can, under certain dynamic conditions, offset such losses (Hafner et al., 15 Jan 2024).

  • Miner/Builder Extractable Value (MEV): The atomicity and profitability of cyclic arbitrage incentivize bots to compete for transaction ordering priority, leading to "Priority Gas Auctions" (PGAs) (Daian et al., 2019). This mechanism yields substantial MEV, part of which is effectively redistributed to miners through higher gas fees, and raises new consensus-layer security risks (such as fee-based forking or "time-bandit attacks"). Empirical studies estimate multi-million dollar revenue flows to miners via MEV.

5. Design Innovations to Eliminate or Mitigate Cyclic Arbitrage

Several recent architectures address the root causes of cyclic arbitrage:

  • Dynamic AMM Curves: AMMs refresh their price functions in real time using externally sourced oracle prices, thereby aligning pool prices with market prices and closing arbitrage windows (Krishnamachari et al., 2021). For example, a dynamic constant-product curve satisfies

w(t)(x(t)a(t))y(t)=kw(t)\cdot (x(t) - a(t))\cdot y(t) = k

with w(t),a(t)w(t), a(t) tuned at every update to match ppool=pmktp_\text{pool} = p_\text{mkt}, thus precluding price gaps.

  • Unified Batch Clearing: Systems such as SPEEDEX (Ramseyer et al., 2021) process all trades in a block at a single set of conversions (an Arrow–Debreu equilibrium), enforcing

pA/pB=(pA/pC)(pC/pB)p_\mathcal{A}/p_\mathcal{B} = (p_\mathcal{A}/p_C)\cdot (p_C/p_\mathcal{B})

across all routes. This construction eliminates internal cyclic arbitrage by design, since no multi-hop path can deliver a better rate than a direct trade.

  • Automated Arbitrage Market Makers (A2MM): By combining routing and arbitrage into a single atomic smart contract that levels prices across pools as trades are executed, A2MM eliminates arbitrage opportunities and minimizes MEV (Zhou et al., 2021).
  • Enhanced Routing Algorithms and STAP Metric: The Standardized Total Arbitrage Profit (STAP), computed via convex optimization, provides a global measure of DEX efficiency and arbitrage potential. Executing trade orders that maximize STAP and reintegrating fees eliminates all arbitrage paths—cyclic or otherwise (Zhang et al., 5 Aug 2025). Line-graph-based routing algorithms, capable of systematically exploring more lucrative paths than depth-first methods, further suppress the emergence of residual cyclic arbitrage and yield more stable trader returns without unduly increasing LP profits via canonical arbitrage extraction.

6. Algorithmic and Empirical Advances in Arbitrage Pathfinding

Improved algorithms have expanded the detection and quantification of cyclic arbitrage. The modified Moore–Bellman–Ford (MMBF) with line-graph transformation locates both loop and non-loop arbitrage paths, parameterized by a specified start token and supporting detection of all candidate profit opportunities. Empirical applications on Uniswap V2 demonstrate that the MMBF method uncovers not just a greater number of arbitrage cycles but also those with higher maximal profits—sometimes exceeding $1,000,000 on a single path—compared to traditional MBF approaches (Zhang et al., 24 Jun 2024). The distribution of path lengths and profits is broader and more symmetric, revealing a richer cyclic arbitrage landscape. Temporal analysis documents a general decline in total network arbitrage profit over time, indicating a trend toward increasing market efficiency, although substantial opportunities remain, particularly during periods of market stress or liquidity fragmentation.

7. Broader Implications and Future Directions

Cyclic arbitrage, as both a market-corrective mechanism and a systemic vulnerability, remains a central challenge for DEX and AMM protocol designers. Persistent opportunities during periods of volatility or across fragmented liquidity (including cross-rollup and cross-chain contexts (Gogol et al., 4 Jun 2024)) highlight the need for continued innovation in oracle design, routing protocols, auction mechanisms (including MEV mitigation), and equilibrium clearing architectures.

Simultaneously, for practitioners and LPs, the nuanced effects of arbitrage—balancing fee income against impermanent loss and systemic risk—necessitate active optimization and dynamic participation strategies. From the perspective of market design, the development and implementation of unified clearing mechanisms, dynamic curves with robust oracles, and empirically calibrated routing algorithms (as evidenced by the reductions in STAP) are essential to suppressing cyclic arbitrage and achieving efficient, fair, and resilient decentralized exchange systems.


Table 1. Key Concepts, Models, and Algorithms

Concept Mathematical/Algorithmic Representation Main Implication
Profit Condition for Cycle (i,j)cyclepij>1/krk\prod_{(i, j)\in\text{cycle}} p_{ij} > 1/\prod_k r_k Determines existence of arbitrage
Atomic Arbitrage Implementation Bundle trades in smart contract Eliminates risk from state changes
Optimal Input Size (δ\delta^*) Solve U(δ)=0U'(\delta) = 0 numerically Maximizes arbitrage yield
Cyclic Arbitrage Elimination Dynamic AMMs, SPEEDEX batch clearing Precludes arbitrage by price alignment
Arbitrage Detection Algorithm Modified MBF, line graph construction Finds more/fatter arbitrage cycles
Market Efficiency Metric STAP = TAP / TVL Zero in perfectly efficient DEX
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.

Don't miss out on important new AI/ML research

See which papers are being discussed right now on X, Reddit, and more:

“Emergent Mind helps me see which AI papers have caught fire online.”

Philip

Philip

Creator, AI Explained on YouTube