Otravez

  • Home
  • About
  • Location
  • Contact
  • …  
    • Home
    • About
    • Location
    • Contact

Otravez

  • Home
  • About
  • Location
  • Contact
  • …  
    • Home
    • About
    • Location
    • Contact

Flashboys 2.0 & MEV

 

Michael Lewis’ 2014 book about the high frequency trading (HFT) industry revealed what had been common knowledge to most people in the financial industry for quite some time, that the vast majority of financial transactions were done by computers rather than people. Trading had become a game of cat and mouse, dark pools and algorithms warring for supremacy and dependent on minimizing latency. Tales of firms spending hundreds of millions of dollars to construct cables a few feet straighter to reach their trading partners and co-locating servers became commonplace. The amount of money at stake was worth billions, hence the ROI was obvious. In April 2019 a group of researchers wrote a paper called Flash Boys 2.0, describing a similar war beginning to develop in the Ethereum ecosystem. On May 1st we met with our research team to read the paper and discuss its monumental impact on the crypto ecosystem. The paper coined the terms, priority gas auction (PGA), miner extractable value (MEV) and questioned the security assumptions of the Ethereum network.


While a traditional financial application would never work this way, the Ethereum network doesn’t provide any privacy or priority to its clients. Part of its ethos is an unbiased global state machine that allows no client or node priority to its computation over any other. The only way to achieve priority over another transaction is to pay a higher fee, capitalism and meritocracy in its most fundamental form. When Uniswap, the first AMM, was designed, its designers didn’t take into account that to use it, one would have to submit a publicly readable intention to swap two assets at any price. Because transactions have no privacy, and anyone can run the Ethereum VM, you are broadcasting to the planet that you would like to get frontrun. I have 5 of asset X and I’d like to swap for however many of the AMM algo inside Uniswap will give me for asset Y. These trades were so easy to frontrun, no one made any money frontrunning them. An odd equilibrium developed as all economic profits were eventually competed away to the miners.

When a trader wants to trade using Uniswap they submit a transaction not to a centralized server in private in a queue with guaranteed execution time. Instead, they submit a public transaction to the global Eth mempool, which is simply a list each node keeps of unprocessed transactions waiting to be mined. Any bot can then query the mempool, run all uniswap transactions through its own VM to see what the trader wants to trade, and then submit their own transaction with a higher fee to the miner where they buy the asset and resell it to the trader at a higher price. These arb bots were so easy to design and run in 2019 that the researchers coined the term priority gas auction. If a bot designer estimated that they would make $20 on a transaction by frontrunning, many bots would try and outbid each other guessing what the winning bid would be, an informal auction to get ahead of the trader. Eventually these bots started losing money as their transaction costs and many lost auctions to each other ended up making their economic profits negative. The winner, from all the bots bidding up the gas fees (Eth transaction costs) were the miners, who collected all the fees from the bots trying to outbid each other. As a result, that profit that “should” have gone to the frontrunning bots ended up in the pockets of the miners, who control the order of transactions that move from the mempool into an Eth block. The researchers coined this profit MEV or miner extractable value. As Ethereum grew from a system where most transaction ordering didn’t matter, to the base layer for a complex financial system (DeFi), the ordering of transactions became one of the most valuable resources in the Eth ecosystem. As the MEV discussions heated up we hosted another research event on MEV.

DeFi summer, and the beginnings of a use case for the ETH blockspace began to drive gas prices to unforeseen heights. In late 2020, a team of researchers got together to see if they could reduce gas prices and make the system more efficient. Out of that effort, flashbots were born. Rather than submitting transactions to the public mempool, flashbots allowed users to send bundles of transactions directly to miners. They put together a bundle of transactions they want mined, and a transaction that “tips” the miner, a direct transfer of Eth from bot to miner and a 0 gas fee. This way, rather than having a large gas auction that affects regular users, we just have a private transfer of money from bot to miner. Additionally for bots, if the miner takes their bundle, they’re happy to pay the “tip”, but they won’t ever have a case where they end up in an auction where they pay a high gas fee and still don’t get the arb. The idea was so good that within months of launch, the majority of Eth transactions mined used flashbots. In May of 2021 we took a look at flashbots in our research group.

As we head into the merge, Ethereum's move to Proof of Stake, the question of MEV continues to be an important one. Does MEV violate the fundamental security assumptions of the Ethereum protocol? As MEV moves across chains and across layers?

 In February and August we studied the new Danksharding design, which proposes that we separate the job of a validator into two roles, a proposer and a builder. This would increase censorship resistance while also reducing MEV. The cat and mouse game of MEV is unlikely to end, and the new Danksharding design will massively reduce the costs of Optimistic Layer twos like Optimism, Arbitrum and the ZK rollups Starkware and Zk Sync to store their state on the ETH main chain likely massively increasingly usage on layer two. As these networks begin to see transaction costs on the order of 1,000-10,000X we’re likely to see a range of new types of financial applications that were not possible before, which will create a new game of arbitrage and opportunity for those paying attention.


 

Previous
Ethereum As A Delflationary Asset
Next
 Return to site
Cookie Use
We use cookies to improve browsing experience, security, and data collection. By accepting, you agree to the use of cookies for advertising and analytics. You can change your cookie settings at any time. Learn More
Accept all
Settings
Decline All
Cookie Settings
Necessary Cookies
These cookies enable core functionality such as security, network management, and accessibility. These cookies can’t be switched off.
Analytics Cookies
These cookies help us better understand how visitors interact with our website and help us discover errors.
Preferences Cookies
These cookies allow the website to remember choices you've made to provide enhanced functionality and personalization.
Save