Yesterday Flashbots published MEV-SGX, our proposal for using secure enclaves to provide a private mempool and a sealed bid MEV auction.

Thread on how MEV-SGX works and why it matters ๐Ÿ‘‡๐Ÿป
ethresear.ch/t/mev-sgx-a-seโ€ฆ
Flashbots' focus is to enable a permissionless, transparent, and fair ecosystem for MEV extraction.

To date we've made progress on this by releasing two products: Flashbots Alpha and MEV-Explore.
Flashbots Alpha is composed of MEV-Geth and MEV Relay

MEV-Geth is a client that allows users to communicate granular transaction order preferences through transaction "bundles"

MEV-Relay is a gateway that Flashbots runs today, for reasons we'll discuss below
In early 2021 Flashbots launched with these design goals

While Flashbots Alpha has been and continues to be successful it offers incomplete trust guarantees. It is not permissionless or completely private. ImageImage
It is not permissionless because miners need to be permissioned by MEV-Relay to receive bundles & the relay also prevents DOS attacks

It is not completely private because bundles can be seen by miners prior to inclusion on-chain

Both of these design goals are v hard to achieve
Flashbots introduced 0 gas price tx paying fees via smart contracts. These need to be simulated to tell what they pay miners

New DOS vector: a searcher can spam a miner with worthless 0 gas txs & force them to spend $ simulating

A trusted relay that filters txs stop this today Image
That's why permissionlessness is hard, what about privacy?

Well, miners want to produce valid & profitable blocks. They lose out on $ otherwise.

How can we give miners guarantees that the blocks they are mining are valid & profitable without them actually seeing the block?
There are a few different approaches summarized in the post. I encourage you to read the details about each! Also, this isn't exhaustive.

While these aren't being ruled out (we might build some of them!) we are presenting a proposal for the usage of secure enclaves. Image
How does it work? Searchers create blocks & validate them in an SGX. These are encrypted & sent to the miner w/ the block's header hash, which is all that is needed to do proof-of-work for a block

Only after finding a PoW solution can miners use their SGX to decrypt the block ImageImage
To expand on the above, miners don't need entire blocks to perform proof-of-work. They only need the "truncated header hash" of a block, which doesn't leak info about txs.

Thus searchers only send miners this in a decrypted form so they can kick off PoW without seeing the block
Due to the tamperproof nature of SGX both the searcher and the miner know that their counterparty is running specific code in an environment that can't be tampered or peered into.

This is important and helps us achieve our goals.
The searcher knows they won't be frontrun because their transactions are hidden until a PoW solution is provided (complete privacy)

The miner knows blocks they receive from searchers have been checked in the SGX for validity/profit & don't need a relay (permissionlessness).
Lastly I want to note that while we focus on searchers MEV-SGX is a private mempool that by design *anyone* can run. This could provide frontrunning protection to regular users of Ethereum too.
Also: this is all possible without forking/changing Ethereum today!

There's some more details on MEV-SGX in the ETHResearch post so please read that.

ethresear.ch/t/mev-sgx-a-seโ€ฆ
Here's a few limitations of MEV-SGX. Image
So where are we now?

The early stages of development. We intend to take this proposal, implement a proof-of-concept to learn more, test assumptions, and get some benchmarks.

We're also doing research into alternatives that achieve our design goals.
Want to contribute?

There are a bunch of open questions on the ETHResearch post. You can also learn more about Flashbots in our Git repo, where we have some jobs descriptions and would love to see community contributions.

github.com/flashbots/pm
Thanks to everyone who contributed to this proposal in one way or another along the way, and to the Flashbots team for their amazing work.
@phildaian @tzhen @epheph @ObadiaAlex @thegostep @jparyani @fiiiu_ @tkstanczak @EdgarArout @taarushv @LukeYoungblood @sui414 @akash_khosla

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with Robert Miller

Robert Miller Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @bertcmiller

9 Jun
A thread of all my MEV related threads in chronologic order ๐Ÿ‘‡๐Ÿป
The first Uncle Bandit pulling off a multi-block heist and launching a new category of MEV strategies
Read 8 tweets
13 May
Introducing the Flashbots Dashboard, a collection of real time metrics to give the community transparency on the Flashbots Network:

dashboard.flashbots.net

Thread ๐Ÿ‘‡๐Ÿป
In January Flashbots released Flashbots Alpha v0.1, a proof of concept communication channel between miners and users that enables transparent and efficient MEV extraction.

Since then we've seen rapid adoption, and now over 30% of blocks on Ethereum are Flashblocks.
Flashbots has two types of direct users today: searchers & miners

Searchers are users who send transactions via Flashbots - today these are mostly bot operators extracting MEV

Miners are the block producers of Ethereum today, who want to extract MEV in a fair & transparent way
Read 12 tweets
12 May
Even @VitalikButerin can't escape the monsters of the dark forest

Twitter wasn't the only party watching Vitalik's wallet. As always bots were ready to extract what value they could from his pending transactions.

Brief recap of those bots and what Vitalik did
Earlier today Vitalik sold his Shibu on Uniswap, and @FrankResearcher documents that adventure well

Normally when you swap on Uniswap the transaction is publicly relayed through nodes until it reaches miners. Due to this anyone who wants to can see the transaction before it is mined.
Read 13 tweets
12 May
Deleted my tweet about V getting sandwiched, he actually got backrun
This bot backran 3 different shibu transactions in a single block, including Vitalik's

Never seen that before
The plot thickens! The bot that backran Vitalik was actually Ethermine's.

They also run sandwich bots so it's interesting they chose to backrun him instead of sandwiching.
Read 4 tweets
22 Apr
An Ethereum Uncle Bandit strikes again, this time for 145 ETH

However this time the bandit left a trail to their identity, and you'll learn who it is in this MEV story ๐Ÿงต๐Ÿ‘‡๐Ÿป

h/t @AlchemyPlatform for the artwork
If you haven't read about the OG uncle bandit then that would be a good place to start.

I won't repeat all the mechanisms of this attack here, but I made a previous thread on it:


Alchemy also had a good writeup: medium.com/alchemy-api/unโ€ฆ
Our investigation starts with this massive - but otherwise innocuous - Flashbots transaction that has 0 gas price and a payment of 80 ETH to a miner. Makes sense.

It looked at first like someone sniping a new token on Uniswap.
Read 15 tweets
15 Apr
Alright everybody, join me as I relay a heist that took place across blocks yesterday and unveil a novel form of MEV.

Again it will be a long and semi-technical journey but I think it is worth it.
I woke up yesterday to a searcher extremely distraught because apparently only 1 of 3 transactions in their bundle landed on-chain.

What's worse is someone else's transaction seemed to have been added instead of their own.
A quick look and the searcher seemed to be right.

Only the "buy" part of a sandwich bundle they submitted had landed on-chain, and right after that buy someone else had inserted a 7 gas tx arb-ing it

Check the images for a bit more info
Read 22 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(