Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability

Blockchains, and specifically smart contracts, have promised to create fair and transparent trading ecosystems.Unfortunately, we show that this promise has not been met. We document and quantify the widespread and rising deployment of arbitrage bots in blockchain systems, specifically in decentralized exchanges (or "DEXes"). Like high-frequency traders on Wall Street, these bots exploit inefficiencies in DEXes, paying high transaction fees and optimizing network latency to frontrun, i.e., anticipate and exploit, ordinary users’ DEX trades.We study the breadth of DEX arbitrage bots in a subset of transactions that yield quantifiable revenue to these bots. We also study bots’ profit-making strategies, with a focus on blockchain-specific elements. We observe bots engage in what we call priority gas auctions (PGAs), competitively bidding up transaction fees in order to obtain priority ordering, i.e., early block position and execution, for their transactions. PGAs present an interesting and complex new continuous-time, partial-information, game-theoretic model that we formalize and study. We release an interactive web portal, frontrun.me, to provide the community with real-time data on PGAs.We additionally show that high fees paid for priority transaction ordering poses a systemic risk to consensus-layer security. We explain that such fees are just one form of a general phenomenon in DEXes and beyond—what we call miner extractable value (MEV)—that poses concrete, measurable, consensus-layer security risks. We show empirically that MEV poses a realistic threat to Ethereum today.Our work highlights the large, complex risks created by transaction-ordering dependencies in smart contracts and the ways in which traditional forms of financial-market exploitation are adapting to and penetrating blockchain economies.

[1]  M. Shubik The Dollar Auction game: a paradox in noncooperative behavior and escalation , 1971 .

[2]  Nick Szabo,et al.  Formalizing and Securing Relationships on Public Networks , 1997, First Monday.

[3]  A. Cabrales,et al.  Equilibrium selection through incomplete information in coordination games: an experimental study , 2002 .

[4]  R. Aumann,et al.  Unraveling in Guessing Games : An Experimental Study , 2007 .

[5]  Dan Bernhardt,et al.  Front-running dynamics , 2008, J. Econ. Theory.

[6]  Henry G. Berg,et al.  Hanson's Automated Market Maker , 2012 .

[7]  Ronald L. Rivest,et al.  FlipIt: The Game of “Stealthy Takeover” , 2012, Journal of Cryptology.

[8]  M. Lewis Flash Boys: A Wall Street Revolt , 2014 .

[9]  Joshua A. Kroll,et al.  On Decentralizing Prediction Markets and Order Books , 2014 .

[10]  Daniel Davis Wood,et al.  ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER , 2014 .

[11]  Eric Budish,et al.  The High-Frequency Trading Arms Race: Frequent Batch Auctions as a Market Design Response , 2015 .

[12]  Elaine Shi,et al.  The Ring of Gyges: Investigating the Future of Criminal Smart Contracts , 2016, CCS.

[13]  S. Matthew Weinberg,et al.  On the Instability of Bitcoin Without the Block Reward , 2016, CCS.

[14]  Prateek Saxena,et al.  Making Smart Contracts Smarter , 2016, IACR Cryptol. ePrint Arch..

[15]  Viktor Manahov Front‐Running Scalping Strategies and Market Manipulation: Why Does High‐Frequency Trading Need Stricter Regulation? , 2016 .

[16]  Elaine Shi,et al.  Hawk: The Blockchain Model of Cryptography and Privacy-Preserving Smart Contracts , 2016, 2016 IEEE Symposium on Security and Privacy (SP).

[17]  Feng Hao,et al.  A Smart Contract for Boardroom Voting with Maximum Voter Privacy , 2017, IACR Cryptol. ePrint Arch..

[18]  Neil Gandal,et al.  Price Manipulation in the Bitcoin Ecosystem , 2017 .

[19]  Michele Marchesi,et al.  The ICO phenomenon and its relationships with ethereum smart contract environment , 2018, 2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE).

[20]  Iddo Bentov,et al.  Paralysis Proofs : Secure Dynamic Access Structures for Cryptocurrencies and More , 2018 .

[21]  Understanding Gambling Behavior and Risk Attitudes Using Massive Online Casino Data , 2018 .

[22]  Joseph Bonneau,et al.  Hostile Blockchain Takeovers (Short Paper) , 2018, Financial Cryptography Workshops.

[23]  Ari Juels,et al.  Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges , 2019, ArXiv.

[24]  Jeremy Clark,et al.  SoK: Transparent Dishonesty: Front-Running Attacks on Blockchain , 2019, Financial Cryptography Workshops.