Ignas | DeFi Profile picture
Subscribe to my DeFi blog to get ahead of the curve 👉 https://t.co/7O0WAdXUnT Co-founder of @PinkBrains_io DeFi Creator Studio

Nov 21, 2022, 14 tweets

1/ TIL that MEV problem is older than #Ethereum itself.

The frontrunning issue was first mentioned on Reddit in 2014: one year before Ethereum first launched!

A short 🧵 on MEV history and it's current state in #DeFi

2/ 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.'

3/ Then Vitalik Buterin himself (Just some guy) offered a possible solution.

The full post and comments is an interesting read. History in the making.

Check it here: reddit.com/r/ethereum/com…

4/ 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.'

Read it in full: arxiv.org/pdf/1904.05234…

5/ A year later Paradigm team published their 'horror story' 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.

6/ 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.

7/ 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.

8/ 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'.

9/ There are different opportunities for MEV in DeFi: arbitrage, liquidations, even NFT MEV - to be first in line for buying an NFT.

Yet Sandwitch attack is perhaps the most notorious.

10/ Uniswap, Balancer and Aave are the most MEVed #DeFi protocols.

Arbitrage accounts for 99.1% of all MEV transactions.

And in total $675m USD has been extracted since 2020,

(Flashbots data)

11/ 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 on-chain liquidity.

Basically hides transactions from bots.

12/ Other solutions include:

• Flashbots: docs.flashbots.net
• Chainlink's Fair Sequencing Services
• Optimism's MEV Auction

and more...

13/ If you want to dig much deeper, I highly recommend reading @ether_world's research on MEV in DeFi:

etherworld.co/2022/04/05/mev…

14/ Follow me @DefiIgnas for more.

Like/Retweet the first tweet below if you can:

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling