[Paper Review] High-Frequency Trading on Decentralized On-Chain Exchanges
This paper formalizes and empirically evaluates sandwich attacks on decentralized on-chain exchanges, particularly Uniswap, demonstrating that a single adversarial trader can earn an average daily revenue of $3,414 USD by front-running and back-running victim transactions using public blockchain data. The attack exploits transaction latency and the deterministic nature of automated market maker (AMM) protocols, with profitability decreasing significantly under multiple competing adversaries.
Decentralized exchanges (DEXs) allow parties to participate in financial markets while retaining full custody of their funds. However, the transparency of blockchain-based DEX in combination with the latency for transactions to be processed, makes market-manipulation feasible. For instance, adversaries could perform front-running -- the practice of exploiting (typically non-public) information that may change the price of an asset for financial gain. In this work we formalize, analytically exposit and empirically evaluate an augmented variant of front-running: sandwich attacks, which involve front- and back-running victim transactions on a blockchain-based DEX. We quantify the probability of an adversarial trader being able to undertake the attack, based on the relative positioning of a transaction within a blockchain block. We find that a single adversarial trader can earn a daily revenue of over several thousand USD when performing sandwich attacks on one particular DEX -- Uniswap, an exchange with over 5M USD daily trading volume by June 2020. In addition to a single-adversary game, we simulate the outcome of sandwich attacks under multiple competing adversaries, to account for the real-world trading environment.
Motivation & Objective
- To formalize and analyze sandwich attacks as a form of market manipulation on on-chain decentralized exchanges (DEXs).
- To quantify the profitability of sandwich attacks on Uniswap, an AMM-based DEX with high trading volume.
- To evaluate the impact of multiple competing adversaries on attack profitability through simulated fee-based bidding contests.
- To assess the likelihood of adversarial transaction positioning within a blockchain block using fee strategies.
- To highlight the trade-off between slippage settings and system scalability in DEX design.
Proposed method
- Formalizing the AMM mechanism and sandwich attack using mathematical models to describe asset price impact and arbitrage opportunities.
- Modeling adversarial behavior as a liquidity taker or provider to maximize profit from price slippage caused by victim trades.
- Using real-world Uniswap transaction data (blocks 9M–9.1M) to empirically validate attack profitability and timing.
- Simulating a competitive environment with 2, 5, and 10 adversaries using reactive fee-bidding strategies to model real-world market dynamics.
- Analyzing transaction positioning probability based on transaction fee payments (±1 Wei) and block-level latency.
- Employing a gas consumption model based on average DAI market data (85,488 ± 34,782 gas) to estimate break-even points under varying attack conditions.
Experimental results
Research questions
- RQ1What is the maximum expected revenue an adversarial trader can extract from a sandwich attack on Uniswap?
- RQ2How does the probability of a transaction being front- or back-run depend on its relative position within a blockchain block?
- RQ3How does the presence of multiple competing adversaries affect the profitability of sandwich attacks?
- RQ4What is the break-even time for a sandwich attack under increasing network congestion and competition?
- RQ5How do default slippage settings in DEXs influence the trade-off between scalability and vulnerability to manipulation?
Key findings
- An adversarial trader can achieve an average daily revenue of $3,414 USD by performing sandwich attacks on Uniswap, even without collusion with miners.
- The probability of successfully front- or back-running a victim transaction is at least 79% when using a ±1 Wei transaction fee strategy.
- With 2, 5, and 10 competing adversaries, expected profitability per attacker drops by 51.0%, 81.4%, and 91.5% respectively, reducing average gains to 0.45, 0.17, and 0.08 ETH ($67, $25, $12).
- The break-even point for a sandwich attack becomes unattainable if the victim transaction remains pending on the network for more than 27.7, 20.3, and 16.3 seconds under 2, 5, and 10 adversaries respectively.
- The attack becomes increasingly unprofitable under network congestion, as higher latency increases the cost of execution and reduces arbitrage window.
- The study reveals a fundamental dilemma in DEX design: low default slippage reduces scalability, while high slippage increases vulnerability to MEV-based attacks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.