Source-linked AI summary
Quantifying Blockchain Extractable Value: How dark is the forest?
Kaihua Qin, Liyi Zhou, Arthur Gervais
TL;DR
Blockchain extractable value threatens blockchain security, but its real-world severity has not been comprehensively measured. This paper quantifies several BEV sources, introduces generalized replay trading, and analyzes BEV relayers, finding that relayers further endanger blockchain security.
Problem
The real-world severity of blockchain extractable value has not been comprehensively measured, limiting quantitative understanding of risks to blockchain users.
Method
The paper measures sandwich attacks, liquidations, and arbitrage, introduces generalized transaction replay, and analyzes centralized BEV relayer systems.
Results
The study finds that emerging BEV relayers endanger blockchain security and provides empirical data on past sandwich attacks, arbitrage, and liquidations.
Takeaways & Limitations
The findings provide empirical insight into BEV practices and may help improve DeFi and blockchain security.
Takeaways & Limitations
Measurements cover only sandwich attacks, liquidations, and arbitrage, rely on custom heuristics, and lack ground truth, so results are estimates.
Abstract
from arXiv · showhide
Permissionless blockchains such as Bitcoin have excelled at financial services. Yet, opportunistic traders extract monetary value from the mesh of decentralized finance (DeFi) smart contracts through so-called blockchain extractable value (BEV). The recent emergence of centralized BEV relayer portrays BEV as a positive additional revenue source. Because BEV was quantitatively shown to deteriorate the blockchain's consensus security, BEV relayers endanger the ledger security by incentivizing rational miners to fork the chain. For example, a rational miner with a 10% hashrate will fork Ethereum if a BEV opportunity exceeds 4x the block reward. However, related work is currently missing quantitative insights on past BEV extraction to assess the practical risks of BEV objectively. In this work, we allow to quantify the BEV danger by deriving the USD extracted from sandwich attacks, liquidations, and decentralized exchange arbitrage. We estimate that over 32 months, BEV yielded 540.54M USD in profit, divided among 11,289 addresses when capturing 49,691 cryptocurrencies and 60,830 on-chain markets. The highest BEV instance we find amounts to 4.1M USD, 616.6x the Ethereum block reward. Moreover, while the practitioner's community has discussed the existence of generalized trading bots, we are, to our knowledge, the first to provide a concrete algorithm. Our algorithm can replace unconfirmed transactions without the need to understand the victim transactions' underlying logic, which we estimate to have yielded a profit of 57,037.32 ETH (35.37M USD) over 32 months of past blockchain data. Finally, we formalize and analyze emerging BEV relay systems, where miners accept BEV transactions from a centralized relay server instead of the peer-to-peer (P2P) network. We find that such relay systems aggravate the consensus layer attacks and therefore further endanger blockchain security.
I. INTRODUCTION … B. Decentralized Finance
The paper introduces BEV as a measurable source of profit from DeFi trading that can threaten blockchain security through transaction replay, chain forks, and centralized relayers. It provides quantitative measurements, a generalized replay algorithm, and formal analysis of BEV relays alongside the blockchain and DeFi background needed to understand these mechanisms.
- I. INTRODUCTION: 540.54M USD of BEV accrued over 32 months from sandwich attacks, liquidations, and arbitrage.The study measures BEV across known trading activities to assess its real-world severity.
- I. INTRODUCTION: Centralized BEV relayers proxy trades between traders and miners, maximizing BEV and thereby increasing expected forks and chain reorganizations.The paper formalizes relays as an extension of the P2P transaction fee auction model and finds they do not substantially reduce competitive-trading overhead.
- I. INTRODUCTION: 35.37M USD of BEV could have resulted from a generalized transaction replay algorithm that clones and front-runs victims without understanding their logic.The algorithm extends captured BEV by 35.18M USD while intersecting only 1.43% of liquidation and 0.11% of arbitrage transactions.
- A. Blockchain and Smart Contracts: Permissionless blockchains use globally distributed P2P nodes to forward transactions to miners, who unilaterally choose transaction execution order when constructing blocks.This execution-order discretion underlies the opportunity for traders to compete over profitable transactions.
- A. Blockchain and Smart Contracts: Ethereum supports DeFi protocols through smart contracts executed in the Ethereum Virtual Machine, with transaction fees determined by gas consumption and gas price.Smart contracts also enable on-chain assets such as ERC20 tokens.
- B. Decentralized Finance: 90B USD is the value locked in DeFi after excluding endogenous assets, across protocols including AMM exchanges, lending platforms, and margin trading systems.DeFi consists of autonomous finance-focused protocols operating on blockchain-based smart contracts.
- B. Decentralized Finance: AMM exchanges use smart contracts to govern trades against liquidity pools, commonly applying the constant product rule that keeps x · y = k.Traders face expected slippage from limited liquidity and unexpected slippage when blockchain state changes before execution, including through frontrunning.
- B. Decentralized Finance: DeFi lending typically requires over-collateralization, such as locking 150% of the borrowed value as security for the lender.The collateral protects lenders if borrowers fail to repay or if collateral values decline.
III. PRELIMINARIES … C. Transaction Ordering Taxonomy
The paper defines a permissionless-blockchain threat model and explains how atomicity, determinacy, and transaction ordering enable blockchain extractable value. It then classifies adversarial ordering strategies and distinguishes block-state from mempool/network-state attacks.
- III. PRELIMINARIES: The preliminaries establish the security and threat model, relate transaction order to BEV, and introduce a transaction-ordering taxonomy.
- A. System and Threat Model: A permissionless blockchain runs over a P2P network, where a trader can transact on AMM exchanges or lending platforms while choosing slippage tolerance, fees, and platform.
- A. System and Threat Model: The adversary is financially rational, well-connected enough to observe unconfirmed mempool transactions, controls a private key, and holds sufficient native cryptocurrency for its actions.
- B. Transaction Ordering and Blockchain Extractable Value: Atomicity makes transaction actions execute all-or-nothing, while determinacy allows traders to simulate execution results from a given blockchain state.
- B. Transaction Ordering and Blockchain Extractable Value: Adversaries manipulate transaction order so their transactions execute on states that maximize revenue or victim transactions execute on unfavorable states.
- C. Transaction Ordering Taxonomy: The taxonomy extends three frontrunning categories by adding back-running and distinguishes whether front-running causes victim failure or preserves successful execution.
- C. Transaction Ordering Taxonomy: Back-running places the adversarial transaction after the victim and is expected to cost less than front-running because it avoids fee bidding contests; clogging suppresses transactions by jamming the blockchain.
- C. Transaction Ordering Taxonomy: Transaction ordering operates on block or mempool/network states; sandwich attacks and transaction replay occur only on the network layer unless a miner forks the blockchain.
IV. MEASURING THE EXTRACTED BLOCKCHAIN VALUE … 2) Empirical Results:
Over 32 months, the study measures Ethereum extractable value through sandwich attacks, liquidations, and arbitrage, without claiming completeness. For sandwich attacks, it identifies 750,529 attacks yielding 174.34M USD and estimates that 63.30% of available value was extracted.
- IV. MEASURING THE EXTRACTED BLOCKCHAIN VALUE: Over 32 months, the study focuses on sandwich attacks, liquidations, and arbitrage trading to measure extracted financial value from Ethereum.The period spans 1 December 2018 to 5 August 2021, and the authors do not claim completeness.
- A. Sandwich Attacks: A sandwich attack wraps a victim transaction between adversarial front-running and back-running transactions after monitoring pending transactions on the P2P network.The adversary may be a miner or trader and acts when a large transaction is expected to move the asset price.
- 1) Heuristics: •: Sandwich identification uses heuristics requiring the front-run, victim, and back-run transactions to share a block and exact order, with matched directions, accounts, and traded amounts.The amount sold in the back-run must be within 90% ∼110% of the amount bought in the front-run; 603,431 (80.4%) detected attacks are “perfect”.
- 1) Heuristics: •: 750,529 sandwich attacks generated 174.34M USD in total profit across Uniswap V1/V2/V3, Sushiswap, and Bancor, involving 2,419 user addresses and 1,069 smart contracts.The heuristics found no sandwich attacks on Curve, Swerve, or 1inch; SHIB was the most sandwich attack-prone token, with 6.84M USD in adversarial profit.
- 2) Empirical Results:: 63.30% (62.13 ETH) of the available extractable value was extracted under the study’s comparison with the optimal Uniswap V1 setting.The comparison references 98.15 ETH of estimated revenue from attacking 7,793 Uniswap V1 transactions between blocks 8M and 9M.
B. Fixed Spread Liquidations · C. Arbitrage · 1) Heuristics:
The paper quantifies fixed-spread liquidation and arbitrage extraction across major DeFi platforms, identifying substantial profits and widespread use of transaction ordering and private relays. It detects 277.02M USD in arbitrage profits and 89.18M USD in liquidation profits over the studied periods.
- B. Fixed Spread Liquidations: Fixed-spread liquidations let liquidators purchase collateral at a fixed discount when repaying debt, unlike auction liquidations that use time-limited bidding.The analysis focuses on fixed-spread liquidation mechanisms used by Aave, Compound, and dYdX.
- B. Fixed Spread Liquidations: 89.18M USD profit came from 31,057 liquidations across Aave, Compound, and dYdX over 28 months.Events were collected from platform inception through block 12965000 on 5 August 2021, using platform price oracles for USD conversion.
- B. Fixed Spread Liquidations: 74.50% of liquidations used front-running, with 2,742 unique liquidators distributed across front-, back-, and mixed-strategy participants.The study identifies 1,758 front-running, 442 back-running, and 542 mixed-strategy liquidators.
- B. Fixed Spread Liquidations: 1,956 liquidation transactions, or 6.3%, had zero gas prices, indicating private miner relays that yielded 10.69M USD in profit.Back-running liquidations paid higher average gas prices because of the internal back-running concept.
- C. Arbitrage: Arbitrage traders synchronize prices across markets by buying and selling assets, monitoring confirmed states or pending trades before submitting transactions.Block-state arbitrage front-runs participants after a new block, while network-state arbitrage back-runs large pending trades.
- 1) Heuristics:: Arbitrages were detected using four heuristics requiring atomic multi-swap transactions, a closed asset loop, and non-increasing input amounts.The heuristics require all swaps in one transaction, more than one swap, asset continuity around a loop, and in(si) ≤ out(si−1).
- 1) Heuristics:: 277.02M USD profit came from 1,151,448 arbitrage trades involving 6,753 addresses and 2,016 smart contracts across seven DeFi platforms.The period spans 1 December 2018 through 5 August 2021, and all detected trades used smart contracts.
- 1) Heuristics:: 9.6% of arbitrage transactions were privately relayed to miners, representing 82.75M USD of extracted value.The study identifies 110,026 privately relayed arbitrage transactions.
2) Empirical Results: … V. GENERALIZED FRONT-RUNNING: TRANSACTION REPLAY
The empirical results show that arbitrage is usually conducted through simple, often back-running strategies, alongside observed blockchain-clogging activity. The paper then describes measurement limitations and an application-agnostic transaction-replay method for copying profitable unconfirmed transactions and attempting to front-run them.
- 2) Empirical Results:: Most arbitrage transactions involve only 2 or 3 markets, while fewer than 3% use more than four markets.The paper also reports combining two triangular arbitrages in one transaction to save gas costs.
- 2) Empirical Results:: One detected arbitrage swaps 400 ETH for 1040 COMP and then 1040 COMP for 476 ETH, realizing 76 ETH in revenue.The transaction uses Uniswap v2 for the first swap and Sushiswap for the second.
- 2) Empirical Results:: 44.02% of arbitrage transactions become unprofitable when re-executed at the top of blocks, indicating back-running rather than block-state arbitrage.A highly profitable example appears at index 141 of 162 transactions, contrary to the expectation of destructive front-running with higher gas prices.
- D. Clogging: The study observes blockchain clogging through simultaneous transactions that temporarily increase blockchain-writing costs.Apparent purposes include attacking gambling protocols and conducting mass token transfers.
- E. Limitations: The measurements omit some BEV sources and rely on custom heuristics that can produce false negatives and false positives.The authors tighten heuristics to reduce overreported revenues because they lack ground truth.
- V. GENERALIZED FRONT-RUNNING: TRANSACTION REPLAY: The proposed application-agnostic attack copies and replays an unconfirmed victim transaction’s execution logic while diverting revenue to an adversary-controlled account.The adversary observes the victim transaction, constructs and locally validates replay transactions, and proceeds if execution is profitable.
- V. GENERALIZED FRONT-RUNNING: TRANSACTION REPLAY: The replay algorithm includes transaction patterns that transfer profit either to the caller or to a specified beneficiary.The examples are presented in Solidity functions named TransferRevenueToSender and SpecifyBeneficiary.
A. Algorithm · Replay Algorithm: · B. Replay Evaluation
The replay attack targets transaction patterns that transfer revenue to an unauthenticated sender-controlled address, replacing the victim’s sender address in input data with the adversary’s address. Evaluated across 32 months of Ethereum history, replayable transactions yielded an estimated 57,037.32 ETH (35.37M USD), with notable concentration in vulnerable, low-capital, and privately relayed transactions.
- A. Algorithm: Unauthenticated sender benefits and controllable beneficiary input expose smart-contract transactions to replay attacks.The revenue recipient is transferred to the transaction sender without authentication, while the sender address is supplied in transaction input.
- Replay Algorithm:: The adversary duplicates the victim transaction’s fields and replaces the victim sender address in input data with the adversarial address.Because Ethereum addresses use an effective 20-byte representation, substitution can be performed efficiently with string replacement.
- B. Replay Evaluation: 883,023,232 transactions were evaluated across 32 months by executing replay transactions at the victim’s position and verifying profitability.ERC20 revenues were converted to ETH through on-chain Uniswap markets, excluding ETH from the token-revenue tally.
- Replay Algorithm:: The algorithm executes the constructed replay transaction on the current block, checks profitability, and front-runs the potential victim when profitable.It takes the current highest block, a potential victim transaction, and an adversarial account address as inputs.
- B. Replay Evaluation: 57,037.32 ETH (35.37M USD) was the estimated profit from 188,365 profitable replayable transactions, representing 0.02% of evaluated transactions.The most profitable replay transaction yielded 16,736.9 ETH; 1,213 ERC20 tokens contributed revenue in 128,200 transactions.
- B. Replay Evaluation: 41,529 ETH was generated by three transactions that appear to exploit a smart-contract vulnerability, while replayable-transaction counts generally increased after January 2020.The three transactions occurred from block 10954411 to 10954419.
- B. Replay Evaluation: 83.2% of replay transactions required no upfront ETH beyond transaction fees, and 1,007 of the 1,926 transactions earning more than one ETH had zero value.Replay profit was not directly correlated with transaction value.
- B. Replay Evaluation: 6,685 zero-gas-price replayable transactions represented 3.63M USD and were replayable only by mining adversaries or relay operators.For positive-gas-price transactions, the evaluation assumed they were visible in the mempool before mining.
C. Real-Time Detection … E. Naive Replay Protection
Real-time replay testing found fewer replayable transactions than on-chain analysis, indicating incomplete P2P visibility, while replayable transactions included liquidations and arbitrages. Naive protections mitigate simple replays but remain vulnerable to adversaries who emulate transactions and reconstruct application logic.
- C. Real-Time Detection: 8,206,977 tested transactions yielded 166 unique, non-conflicting locally replayable transactions during real-time monitoring.The modified go-ethereum client connected to at most 200 peers and tested each received P2P transaction.
- C. Real-Time Detection: 576 unique, non-conflicting replayable transactions with a positive gas price appeared in same-period on-chain data, versus 166 detected in real time.The discrepancy indicates insufficient P2P connectivity and missed replayable victims.
- Results:: 89 replayable transactions with zero gas price were exposed by on-chain data and likely mined through private agreements or a BEV relayer.The real-time node could not capture these transactions.
- D. Understanding Replayable Transactions: 443 fixed spread liquidations contributed 20.44K USD, while 1,268 arbitrages contributed 165.38K USD among 188,365 replayable transactions.The replay algorithm can act on unconfirmed transactions without understanding their logic.
- E. Naive Replay Protection: Two simple methods were proposed to protect profitable transactions from replay by Algorithm 1.These methods are presented as naive replay protections.
- E. Naive Replay Protection: Authentication can revert replay transactions invoked with an unauthorized address, but the method is not secure against a more advanced adversary.The passage characterizes this authentication approach as insecure.
- E. Naive Replay Protection: Beneficiary provision avoids simple replays by storing the beneficiary address in contract storage instead of transaction input.Both naive methods mitigate simple replay attacks, but an adversary can emulate a victim transaction, extract events, and reconstruct application logic.
F. Advanced Replay Protection … B. BEV Auction Modeling
The paper presents replay-protection designs and formalizes BEV relayers as centralized auction systems connecting searchers with miners. It models competing P2P and relay auctions, showing that relayers reduce expected P2P-auction payoffs while changing transaction privacy, ordering, and fee incentives.
- F. Advanced Replay Protection: Robust replay protection requires that only the issuer can inspect a transaction while miners can validate it without viewing it.
- F. Advanced Replay Protection: Strongly trusted BEV relayers may help prevent replay attacks, but this requires trusting the relayer and assuming miners do not replay transactions.
- F. Advanced Replay Protection: Fair ordering and trusted SGX enclaves offer alternative protections, yet fair ordering remains vulnerable to well-connected network adversaries.SGX enclaves could let traders verify ordering rules through remote attestation and provide transactions over an encrypted TLS connection.
- F. Advanced Replay Protection: These replay-protection approaches remain vulnerable to blockchain forks and reorganizations because transactions become public when their blocks are broadcast.
- A. BEV Relayer: BEV relayers create a centralized salesroom where searchers send transaction bundles to miners and share extracted profits directly instead of paying transaction fees.Relayers mediate between searchers and miners, while relay architecture is presented as a centralized, trusted server arrangement.
- A. BEV Relayer: Relayers forward bundles to connected miners, support bundled sandwich attacks, waive fees for failed transactions, and let miners prioritize profitable bundles.The passage also claims reduced P2P network congestion and reduced blockchain transaction fees.
- B. BEV Auction Modeling: The model divides miners into relay miners controlling hash-rate α and P2P miners, assuming honest relaying, no disclosure, and fee-ordered use of remaining block space.Relay miners select the most profitable relayed transactions, while P2P miners select transactions from the P2P network based on paid transaction fees.
- B. BEV Auction Modeling: The P2P auction is a first-price all-pay auction, whereas the relay auction is a first-price sealed-bid auction with payment only upon winning.Players choose between publicly fee-bidding through P2P or privately submitting crafted transactions through the relayer, and relayer presence decreases expected P2P-auction payoffs.
C. Incentive Compatibility of the Relay auction Participation · D. Network Impact of the BEV Relayer
The first-price relay auction gives players non-negative expected payoffs and encourages participation, while concentrating most BEV revenue in relay miners. BEV relayers can prevent some P2P propagation of BEV transactions, particularly when the transaction’s revenue-fee ratio lies in a middle range determined by relay-miner power.
- C. Incentive Compatibility of the Relay auction Participation: Non-negative relay-auction payoffs incentivize participation regardless of relay miners’ mining power or other players’ strategies.This contrasts with the proposed P2P front-running discouragement hypothesis, under which market leaders cause players to exit.
- C. Incentive Compatibility of the Relay auction Participation: Under a Bayesian Nash equilibrium, players bid higher fees as the number of bidders increases, raising relay-miner revenue.The analysis assumes rewards are independently drawn from U(0, Rmax), with n and the distribution treated as prior knowledge.
- C. Incentive Compatibility of the Relay auction Participation: The first-price relay auction therefore allocates the vast majority of BEV to relay miners, producing revenue concentration.Because the auction ensures non-negative payoff, this concentration coexists with incentives for players to participate.
- D. Network Impact of the BEV Relayer: Protogenetic opportunities are BEV opportunities with positive expected reward when no mining power adopts BEV relayers.They represent transactions players would broadcast to the P2P network absent a BEV relayer.
- D. Network Impact of the BEV Relayer: BEV relayers prevent a player from broadcasting an opportunity when the relay-auction participation condition in Eq. 6 is satisfied.The network-impact analysis measures how many such protogenetic BEV transactions could have been prevented from propagating.
- D. Network Impact of the BEV Relayer: A low revenue-fee ratio discourages broadcasting regardless of relayer availability, whereas a high ratio may still justify P2P-auction risk-taking.Thus, relayers discourage propagation only when the ratio falls within the middle range specified in Eq. 6, given relay-miner mining power α.
- D. Network Impact of the BEV Relayer: 1,041,422 arbitrages with positive transaction fees were evaluated by revenue-fee ratio under a winning-probability assumption PrPA(O, Si) ∼ U(0.1, 0.9).The resulting analysis is summarized as the percentage of arbitrage transactions that could have been prevented from broadcasting on the P2P network.
E. Privately Relayed Transactions · F. BEV Relayer Remarks · VII. SECURITY INSIGHTS OF BEV
The paper finds that private transaction relaying and BEV relayers create substantial consensus and network-security risks. Historical BEV opportunities could incentivize forking, while relay mechanisms add centralization and auction-manipulation threats without substantially reducing P2P overhead.
- E. Privately Relayed Transactions: 136,143 of 8,285,218 transactions (1.64%) were privately relayed from 22 December 2020 to 29 December 2020.These transactions were mined without appearing in the P2P network, including arrangements between miners and exchanges.
- F. BEV Relayer Remarks: BEV relayers aggravate consensus-layer attacks by making MEV more competitive, increasing opportunities and incentives for miners to fork.The paper presents this as a generic insight for smart-contract-enabled blockchains.
- F. BEV Relayer Remarks: BEV relay mechanisms do not substantially reduce P2P network overhead, despite introducing an intermediary that increases centralization.This result contradicts suggestions from the practitioners community.
- VII. SECURITY INSIGHTS OF BEV: When BEV reaches four times the block reward, a financially rational miner with 10% mining power is incentivized to fork the blockchain.Prior work characterizes these deliberate forks and chain overwrites as time-bandit attacks, essentially equivalent to double-spending attacks.
- VII. SECURITY INSIGHTS OF BEV: 2,407 blocks exposed BEV above four times the block reward plus transaction fees; the highest single-block opportunity was 4.1M USD, or 616.6 times that baseline.The highest opportunity was 8,453.9 ETH in block 11333037 and could have incentivized a miner with 0.1% mining power to fork.
- VII. SECURITY INSIGHTS OF BEV: BEV supplies financial resources for bribery and undercutting attacks, while relayer revenue concentration further increases miners’ extractable value and fork risks.Adversarial miners can offer extractable BEV and transaction fees on forked chains to attract mining power.
- VII. SECURITY INSIGHTS OF BEV: BEV congests the P2P network through front- and back-running transactions, reducing communication throughput and latency and increasing stale-block risk.The resulting stale-block increase negatively affects consensus security.
- VII. SECURITY INSIGHTS OF BEV: BEV relayers and miners may sell trader strategies, replay profitable transactions, or manipulate relay auctions using visible bids.The relayer can observe rebate bids and potentially manipulate the auction process after identifying the highest bid.
A. DeFi’s Impact on BEV … IX. CONCLUSION
The paper argues that BEV is a design flaw that undermines blockchain incentives and security, while presenting empirical measurements of extracted value and mitigation directions. It contributes a generalized real-time replay trading algorithm and highlights BEV relayers as a further security threat.
- A. DeFi’s Impact on BEV: BEV extraction grew with overall DeFi TVL and threatens users through attacks including economic exploits and sandwich attacks.The paper links increasing DeFi activity to deteriorating blockchain security.
- A. DeFi’s Impact on BEV: BEV should be treated as a design flaw, not a desired feature, because it creates transaction overhead and erodes block-reward and fee-based incentives.Arbitrage and liquidations may appear beneficial at the application layer, but the paper argues their BEV effects remain harmful.
- B. BEV Mitigation: Transparent execution and unilateral transaction-order manipulation allow BEV to persist, motivating fair-ordering and application-specific mitigation approaches.The paper identifies mitigation as promising but does not claim that the challenge is eliminated.
- B. BEV Mitigation: Aequitas protocols formalize order-fairness, but a powerful network adversary can retain an information-asymmetry advantage over slower victims.The cited approaches include permissioned protocols and a permissionless extension applied to DeFi.
- B. BEV Mitigation: Application-specific proposals mitigate sandwich attacks through minimum profitable victim inputs and use atomic transactions to capture or redistribute arbitrage and liquidation value.The proposals include atomic exploitation of exchange opportunities and routing liquidation revenue to a shared liquidity pool.
- VIII. RELATED WORK: The paper extends blockchain frontrunning research by distinguishing destructive from tolerating strategies and introducing back-running as a value-extraction strategy.Prior taxonomy covered displacement, insertion, and suppression front-running.
- VIII. RELATED WORK: 63.30% (62.13 ETH) of the available extracted sandwich-attack value was actually extracted, distinguishing the paper’s empirical measurement from prior theoretical simulations.The study quantifies realized extraction using past blockchain data rather than only simulating potential revenue.
- IX. CONCLUSION: The paper studies sandwich attacks and arbitrage on seven decentralized exchanges, liquidations on three lending platforms, and introduces a generalized real-time replay trading algorithm while warning that BEV relayers endanger blockchain security.The conclusion presents these empirical analyses and the replay algorithm as central contributions.
APPENDIX A ADDITIONAL EMPIRICAL DATA … 1) Heuristics:
The appendix reports rising sandwich-attack activity, intense gas-price competition, and empirically identified clogging periods on Ethereum. Its heuristics identify 333 clogging periods involving 10 user addresses and 75 smart contracts, while most lasted under two minutes.
- 1) Monthly Statistics:: 94,956 sandwich attacks occurred in April 2021, with 96.5% occurring on Uniswap V2.The number of attacks and adversarial addresses increased from 2020.
- 2) Sandwich Gas Prices:: 80.02% of back-running transactions TA2 paid only 0 to 1 GWei less than the victim transaction TV’s gas price.Closer TA2 and TV transactions have a higher attack success rate because of potential interference from other transactions.
- 2) Sandwich Gas Prices:: At least 19.11% of sandwich attacks experienced more than five counter-reactive bidding rounds under a 10% gas-price replacement assumption.The estimate considers 510,476 sandwich attacks with positive adversarial gas price.
- 2) Sandwich Gas Prices:: After five bidding rounds, the adversary must pay at least (110%)^4×(GasPriceV +1) Wei when the first TA1 bid adds 1 Wei to TV’s gas price.Reactive counter-bidding raises the gas price only after a competing transaction bids higher, whereas blind raising anticipates competitors’ increases.
- B. Clogging: 10,469 ETH was extracted through a clogging attack spanning 66 consecutive blocks in the Fomo3D game.The attacker clogged the blockchain until participating bidding bots ran out of funding.
- B. Clogging: A clogging attack consumes block space to delay other transactions on blockchains typically limited to about 7-14 transactions per second.Transaction-fee bidding contests can raise average transaction fees above 50 USD, and clogging requires an opportunity such as a liquidation or gambling event.
- 1) Heuristics:: Heuristic 1 requires the same user or smart-contract address to consume more than 80% of available gas in every block during a clogging period.Heuristic 2 requires at least five consecutive blocks, corresponding to around 1 minute given a 13.5 ± 0.12-second average block time.
- 1) Heuristics:: 333 clogging periods were identified from block 6803256 to 12965000, involving 10 user addresses and 75 smart contracts.The longest period lasted 5 minutes across 24 blocks, while 83.18% lasted less than 2 minutes across 10 blocks.
2) Empirical Results: … B. Empirical Results
The empirical analysis identifies privately relayed Ethereum transactions and characterizes replayable transactions and transaction-replay protection. Over one week, 1.64% of mined transactions were privately relayed, involving 81 miners and several major mining pools.
- A. Replayable Transactions Case Study: The study presents the top 15 non-reverted replayable transactions yielding more than 100 ETH and manually classifies their behavior.These transactions are presented as case studies of replayable transactions that produce more than 100 ETH.
- A. Replayable Transactions Case Study: Three replayable transactions were associated with the Eminence exploit, while a bZx attack transaction was also replayable.The authors observe that the Eminence attacker or attackers apparently did not consider replay transactions.
- A. Replayable Transactions Case Study: Three replayable transactions invoked the same DSSLeverage smart contract, which allows any address to close the contract’s position.This finding was derived from examining the DSSLeverage source code.
- B. Replay Protection: The paper presents Solidity snippets intended to mitigate transaction-replay attacks.The snippets are described as the implementation of the replay protection discussed in Section V-A.
- A. Identifying Non-Broadcast Transactions: The researchers measured non-broadcast transactions with a well-connected geth client using at most 1,000 Ethereum P2P connections.The client recorded incoming transactions before they entered the memory pool or were written to the blockchain, maximizing network coverage and early receipt.
- B. Empirical Results: 1.64% of 8,285,218 transactions were privately relayed rather than broadcast before mining across 45,669 Ethereum blocks observed over one week.The measurement identified 136,143 mined transactions absent from the observed network-layer transaction set, with 100 randomly selected transactions manually verified.
- B. Empirical Results: 81 miners engaged in mining non-broadcast transactions during the 45,669-block, one-week measurement period.The distribution was measured using a geth client that consistently maintained over 800 P2P connections, with miner hashrate based on blocks found during measurement.
- B. Empirical Results: Privately relayed transactions included two 1inch transactions from Spark Pool, one from Babel Pool, and one from F2Pool.The cited pools had 23.50%, 4.83%, and 9.59% hashrate, respectively.