A Ripple for Change: Analysis of Frontrunning in the XRP Ledger

Blockchains are disrupting traditional finance by reducing the number of intermediaries and providing transparency. Blockchains, however, come with their own set of prominent issues. One such challenge is frontrunning. Attackers try to influence the transaction order so that their transaction executes before their victims' transaction. While frontrunning is a well-studied topic on Ethereum, it is unknown whether other blockchains are also susceptible to such attacks. One proposed defence strategy against frontrunning attacks is to randomize the transaction execution order. XRP Ledger is the highest-value blockchain to use such a strategy. Furthermore, it runs a Decentralized Exchange, which provides ample frontrunning opportunities. Therefore, in the context of XRP Ledger, we examine whether randomized transaction order provides sufficient protection against frontrunning. Our results show that the mechanism embedded in the XRP Ledger protocol is insufficient to prevent these attacks. We showcase two strategies to perform frontrunning attacks. The first, “naive” strategy, uses randomly generated accounts, whereas the second uses carefully selected accounts to improve the attack's success. Based on our analysis of the XRP Ledgers' historical data, we estimate that attackers could generate up to approx. 1.4M USD profit over two months, provided they succeeded to frontrun every opportunity.

[1]  Gustavo F. Camilo,et al.  Security and Performance Analysis of Quorum-based Blockchain Consensus Protocols , 2022, 2022 6th Cyber Security in Networking Conference (CSNet).

[2]  C. Nita-Rotaru,et al.  A flash(bot) in the pan: measuring maximal extractable value in private pools , 2022, IMC.

[3]  R. State,et al.  Topology Analysis of the XRP Ledger , 2022, ACM Symposium on Applied Computing.

[4]  S. Misra,et al.  FIRST: FrontrunnIng Resilient Smart ConTracts , 2022, ArXiv.

[5]  N. Weaver,et al.  Extracting Godl [sic] from the Salt Mines: Ethereum Miners Extracting Value , 2022, ArXiv.

[6]  Matthias Fitzi,et al.  FairTraDEX: A Decentralised Exchange Preventing Value Extraction , 2022, IACR Cryptol. ePrint Arch..

[7]  A. Capponi,et al.  The Evolution of Blockchain: From Lit to Dark , 2022, SSRN Electronic Journal.

[8]  Roger Wattenhofer,et al.  Eliminating Sandwich Attacks with the Help of Game Theory , 2022, AsiaCCS.

[9]  Jiahua Xu,et al.  Jack the Rippler: Arbitrage on the Decentralized Exchange of the XRP Ledger , 2021, 2021 3rd Conference on Blockchain Research & Applications for Innovative Networks and Services (BRAINS).

[10]  Arthur Gervais,et al.  A2MM: Mitigating Frontrunning, Transaction Reordering and Consensus Instability in Decentralized Exchanges , 2021, ArXiv.

[11]  Ronen Tamari,et al.  Helix: A Fair Blockchain Consensus Protocol Resistant to Ordering Manipulation , 2021, IEEE Transactions on Network and Service Management.

[12]  Radu State,et al.  Frontrunner Jones and the Raiders of the Dark Forest: An Empirical Study of Frontrunning on the Ethereum Blockchain , 2021, USENIX Security Symposium.

[13]  Christian Cachin,et al.  Security Analysis of Ripple Consensus , 2020, OPODIS.

[14]  Klaus Kursawe,et al.  Wendy, the Good Little Fairness Widget: Achieving Order Fairness for Blockchains , 2020, AFT.

[15]  Arthur Gervais,et al.  High-Frequency Trading on Decentralized On-Chain Exchanges , 2020, 2021 IEEE Symposium on Security and Privacy (SP).

[16]  Ari Juels,et al.  Order-Fairness for Byzantine Consensus , 2020, IACR Cryptol. ePrint Arch..

[17]  Ari Juels,et al.  Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability , 2020, 2020 IEEE Symposium on Security and Privacy (SP).

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

[19]  Brad Chase,et al.  Analysis of the XRP Ledger Consensus Protocol , 2018, ArXiv.

[20]  R. State,et al.  Topology Analysis of the XRP Network , 2022, ArXiv.

[21]  Carsten Baum,et al.  P2DEX: Privacy-Preserving Decentralized Cryptocurrency Exchange , 2021, IACR Cryptol. ePrint Arch..

[22]  Sreeram Kannan,et al.  Themis: Fast, Strong Order-Fairness in Byzantine Consensus , 2023, IACR Cryptol. ePrint Arch..

[23]  Rafail Ostrovsky,et al.  FairMM: A Fast and Frontrunning-Resistant Crypto Market-Maker , 2021, IACR Cryptol. ePrint Arch..

[24]  Enis Ceyhun Alp,et al.  CALYPSO: Private Data Management for Decentralized Ledgers , 2020, Proc. VLDB Endow..

[25]  Stelvio Cimato,et al.  A Formal Approach for the Analysis of the XRP Ledger Consensus Protocol , 2020, ICISSP.

[26]  Alan Kaminsky,et al.  Testing the Randomness of Cryptographic Function Mappings , 2019, IACR Cryptol. ePrint Arch..

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

[28]  David Schwartz,et al.  The Ripple Protocol Consensus Algorithm , 2014 .

[29]  J. Markham 'Front-Running' - Insider Trading Under the Commodity Exchange Act , 1988 .