Uncovering the Intricacies of High-Frequency Trading and Crypto Arbitrage

flashboys 2 0 n.w
1 / 26
Embed
Share

Explore the world of high-frequency trading, arbitrage bots, and decentralized exchanges (DEXes) in the realm of cryptocurrency. Discover how bots exploit inefficiencies, compete in priority gas auctions, and extract value through Miner Extractable Value (MEV). Unveil the risks posed by fee-based forking and time-bandit attacks in the blockchain space.

  • Cryptocurrency Trading
  • Arbitrage Bots
  • High-Frequency
  • DEXes
  • Miner Extractable Value

Uploaded on | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Flashboys 2.0

  2. Flashboys High Frequency Trading Flashboys 2.0 Arbitrage Bots Bots exhibit many similar market-exploiting behaviors frontrunning, aggressive latency optimization, etc

  3. Arbitrage Bots and Ethereum 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 Arbritrage bots are especially prevelant in Decentralized Exchcanges (DEXes). This paper focuses on this. Shows in theory and with data how these bots effect DEXes. Also show how certain arb bots pose a systemic risk to consensus- layer security.

  4. Overview

  5. Pure Revenue Opportunities These are blockchain transactions that issue multiple trades atomically through a smart contract and profit unconditionally in every traded asset. I.e. either the entire contract (multiple trade) runs, and profits, or it fails and no trades are made.

  6. Priority Gas Auctions (PGAs) Pure revenue opportunities offer unconditional revenue, arbitrage bots often compete against each other by bidding up transaction fees (gas). PGAs. This will be modeled later.

  7. MEV MEV is value that is extractable by miners directly from smart contracts as cryptocurrency profit. One particular source of MEV is ordering optimization (OO) fees, which result from a miner s control of the ordering of transactions. PGAs and pure revenue opportunities provide one source of OO fees. Later will show that MEV creates systemic consensus-layer vulnerabilities.

  8. Fee-Based Forking & Time-Bandit Attacks OO fees can incentivize miners to mount forking attacks. High-MEV regimes in general lead to a new attack in which miners rewrite blockchain history to steal funds allocated by smart contracts in the past. Authors call these time-bandit attacks. Will detail this later.

  9. DEXes

  10. DEXes DEXes manage continuous-limit order books using smart contracts. Traders / users hold their assets on chain and the smart contract plays the traditional role of exchange operator. Order books are typically maintained off-chain and updated using Oracle price feeds. Example: Etherdelta. A more radical DEX design, called an automated market maker, bypasses order books altogether. Example: Uniswap.

  11. Pure Revenue Opportunities

  12. Opportunities Blockchains operate with transactions processed in discrete blocks. Transactions are inherently dependent and therefore serial: order failures depend on past order attempts, and in some exchanges prices depend directly on order history. With multiple exchanges operating on the same system, it is possible that price differences will occur across exchanges while transactions in a block, and therefore trades on exchanges, are executed sequentially.

  13. Smart Contract Arbitrage Trades

  14. Smart Contract Arbitrage Trades Batched Trades: It is possible to build bots that trade across exchanges through proxy contracts. These proxy contracts can execute batches of orders sequentially within a single transaction, reverting previous trades by throwing an exception if any trade in the batch fails. This means arbitrageurs have the opportunity to compose single transactions that execute multiple trades across multiple exchanges, with an all-or-nothing failure model. Example: buy an asset for price x and sell it immediately for price x 0 > x; if performed atomically, these transactions together generate guaranteed revenue in the base asset.

  15. Priority Gas Auctions (PGAs)

  16. PGAs Ethereum transactions are routed in a peer-to-peer gossip multicast protocol. Once an arbitrage transaction is submitted, therefore, the sequence of trades it involves is publicly known by the network s peer-to- peer nodes. To place a bid on an arbitrage opportunity, an arbitrageur issues a smart contract transaction with associated gas price g that atomically bundles multiple trades (performing the arbitrage). If they later wish to increase this bid, either for strategic reasons or because they notice a higher bid that would eliminate their profit issued on the p2p relay network, they reissue the transaction with the same nonce and a higher gas price. If two arbitrageurs are bidding against each other, what emerges is essentially an auction

  17. PGAs

  18. PGA Prevelance Show data/ Results of the paper s analysis

  19. PGA Game Theoretical Model Show game theoretical model that authors created. How it incentivizes (and is supported in data) to lead to implicit coercion.

  20. MEV and Blockchain Security

  21. Problem with MEV In a stable blockchain, block rewards incentivize honest miner behavior. However, through order optimization (OO) fees, or implicit fees a miner is able to reap by leveraging their control of a consensus epoch, can exceed the block reward. This can instead incentivize forking attacks.

  22. Order Optimization Prevalence Show data

  23. Undercutting Attacks Explain

  24. Time-Bandit Attacks Explain

  25. Open Questions

  26. Arbritrage and MEV on Ethereum post-merge Reference author suggestions. Add more details

More Related Content