Typefully

The History of MEV: Ethereum's Frontrunning Problem

Avatar

Share

 • 

2 years ago

 • 

View on X

Did you know that MEV problem is older than Ethereum itself? The frontrunning issue was first mentioned on Reddit in 2014: a year before Ethereum first launched. Yet it continues to cause controversy to this day. Here's the short history of MEV and it's current state:🧵
Reddit user 'Pmcgoohan' discovered the miner frontrunning issue in Ethereum's pre-Genesis draft paper. He explained what we now call 'sandwich attack' to earn 'an immediate profit.' 'It seems like a big problem to me, and one fundamental to the way ethereum operates.'
Then Vitalik Buterin himself (Just some guy) offered a possible solution. The full post and comments is an interesting read. Google "Miners Frontrunning, Reddit."
The term 'Miner Extractable value' was not mentioned here. It was coined only in 2019 in a research paper 'Flash Boys 2.0 : Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges.'
A year later Paradigm team published their 'horror story' on how $12k of supposedly stuck Uniswap LP tokens could be taken by 'ANYONE'. Essentially 'free money.' The problem was extracting money without alerting the bots. They ultimately lost to front-runners though.
A re-match was fought by @samczsun et al., a month later to rescue over $9.6M USD from a vulnerable smart contract without being front run. This time they succeeded. The endeavor shared in a blog post finally explained the MEV problem in detail. And how to overcome it.
To put it simply, MEV is possible because transactions are organized by transaction fee, with lowest fee transactions filled last. These 'waiting to be executed' transactions are visible in mempool, thus bots can front run profitable trades with higher gas fee.
Miner Extractable value was first applied in the context of proof-of-work. But after The Merge it has been rebranded to 'Maximal extractable value'.
There are different opportunities for MEV in DeFi: arbitrage, liquidations, even NFT MEV - to be the first in line to buy an NFT. Yet the Sandwich attack is perhaps the most notorious.
Uniswap, Balancer and Aave are the most MEVed #DeFi protocols. Arbitrage accounts for 99.1% of all MEV transactions. Uniswap v2 is still the most MEVed protocol to date. (Flashbots data)
Various solutions are available, like CoW Swap. It's no coincidence that FTX fund exploiter used CoW Swap, as its Batch Auction and Coincidence of Wants (CoWs) don't need access to onchain liquidity. Basically hides transactions from bots.
Other solutions include: • Flashbots • Chainlink's Fair Sequencing Services • Optimism's MEV Auction and more...
If you want to dig much deeper, I highly recommend reading @ether_world's research on MEV in DeFi. It explains the full history and functioning of MEV. twitter.com/ether_world/status/1593846327657385986
I initially shared this story a year ago, but I wanted to reshare it as the controversy surrounding MEV has never stopped. Is it good or positive for the ecosystem? Opinions are still divided. twitter.com/scupytrooples/status/1689424540383010816
Avatar

Ignas | DeFi

@DefiIgnas

Subscribe to my DeFi blog to get ahead of the curve 👉 ignasdefi.com Co-founder of @PinkBrains_io DeFi Creator Studio