PBS across the layers
Patrick McCorry
*Paddy’s thoughts
Overview for a “layer-1” blockchain
Alice
Block Proposers
How can a user communicate their transaction to the block proposers?
Agents
Alice
Gossip Protocol
How can a user communicate their transaction to the block proposers?
Block Proposers
Agents
Alice
Gossip Protocol
User TX
Block Proposers
Agents
Alice
Gossip Protocol
User TX
Front-run transaction
A searcher may live in the “dark forest”, find the user’s transaction, and extract value from it.
Block Proposers
Agents
Alice
Gossip Protocol
User TX
Of course… there is more one searcher…
lurking in the forest.
It can trigger Priority Gas Auctions
as searchers bidding each other up <12 seconds
Block Proposers
Agents
h/t https://mirror.xyz/totlsota.eth/Vy8-41kYphcFt40rh8SpFsDojwlwGBGkWCafqD4nTak
Countless bids in a 10 second window to capture an MEV opportunity
Alice
Gossip Protocol
User TX
Two problematic issues
Block Proposers
Agents
Alice
Gossip Protocol
Direct communication
???
???
???
Flashbots “fix” it�
Transactions bypass the
dark forest
Block Proposers
Agents
What can we extract from that scenario?
Transaction Ordering Policy
Core Components
Communication
How can searchers find the pending transactions?
Highest fee first – maximise profit
< 12 seconds per block
User experience
How long does it take for a user to get a confirmation / estimate about how their transaction will execute?
Defend users from MEV extraction?
Implement a “fair” transaction ordering protocol that has minimal interference from searchers
Embrace MEV extraction?
Enable searchers to find user transactions and extract value from them
Wat do?
Defend users from MEV extraction?
Implement a “fair” transaction ordering protocol that has minimal interference from searchers
Embrace MEV extraction?
Enable searchers to find user transactions and extract value from them
Wat do?
Overarching layer-1 goal
Keep the set of block proposers decentralized
Block Proposer Fairness
I am not aware of any MEV-defensive protocol that works for “500k”+ validator instances?
Overarching layer-1 goal
Keep the set of block proposers decentralized
Block Proposer Fairness
===?
What if a proposer is a super successful searcher and outcompetes all other parties?
Overarching layer-1 goal
Keep the set of block proposers decentralized
===?
What if a proposer is a super successful searcher and outcompetes all other parties?
Block Proposer Fairness
Overarching layer-1 goal
Keep the set of block proposers decentralized
===?
What if a proposer is a super successful searcher and outcompetes all other parties?
Block Proposer Fairness
Overarching layer-1 goal
Keep the set of block proposers decentralized
Unique problems for L1
Breaks “fair reward” assumption
Most blockchain systems assume the validators all get “roughly the same” profit.
Off-chain Auction Protocol
“Fair” bidding process to enable an open market of searchers and filters “bids” before they reach the proposer
On-chain Auction Protocol
Necessity due to lack of direct communication channel
Proposer’s outsource MEV work
Pick transaction bundle that pays the most
“Democratize” the profit
Marketplace for block builders
Compete to extract MEV and convince proposers to include their bundles
bids
Accepts bid
Benefits
Proposer’s outsource MEV work
Pick transaction bundle that pays the most
“Democratize” the profit
Marketplace for extraction
Compete to extract MEV and convince proposers to include their bundles
bids
Accepts bid
How about a rollup? Is the environment any different?
Overarching layer-1 goal
Keep the set of block proposers decentralized
Small Sequencer Set
Only needs to be large enough to guarantee access to the ‘fast path’ for transacting
Open membership > large set
Rollup Overview
Time
Alice
Sequencer
Response
Direct communication
Alice sends it to the Sequencer and she can get a response about its execution
Rollup Overview
Time
Alice
Sequencer
Tx1,
…,
Alice’s Tx,
…,
TxN
Transaction Ordering
The Sequencer can decide how to order the transactions and have ample time to do so.
Rollup Overview
Time
Alice
Transaction data
List of transactions (Alice’s transfer)
Sequencer
Tx1,
…,
Alice’s Tx,
…,
TxN
Transaction Ordering Policy
Core Components
Communication
Private communication between Alice and Sequencer
What do you think it should be?
30 seconds — hours
User experience
Sequencer can return a promise about the transaction’s execution
Sequencer
Alice
Sequencer
Alice
Response
Sequencer
Tx1,
…,
Alice’s Tx,
…,
TxN
Transaction Ordering Policy
Core Components
What do you think it should be?
30 seconds — hours
User experience
Sequencer can return a promise about the transaction’s execution
Sequencer
Alice
Response
Sequencer
Tx1,
…,
Alice’s Tx,
…,
TxN
MEV vs experience�
Ordering directly
impacts the user experience �total ordering systems
Sequencer’s Ordering Policy
Ordering Policies
Tx1,
…,
Alice’s Tx,
…,
TxN
First Come First Serve (FCFS)
First Come First Serve (FCFS)
Ordering Algorithm
User experience
Tx1,
…,
Alice’s Tx,
…,
TxN
First Come First Serve (FCFS)
Sequencer Data Feed
Sequencer Feed
Sequencer can release the pending list of transactions for external services – help provider better information to the user!
Alice
Tx batch
First Come First Serve (FCFS)
Sequencer Data Feed
A Wild Searcher Appears!
A feed of pending transactions? With an opportunity to quickly front run?
Rise of the Latency Games
*back running tx*
Alice
Tx batch
First Come First Serve (FCFS)
Not just one… 150k websocket connections… Why?
Sequencer Data Feed
*back running tx,tx,tx*
Alice
Tx batch
Hashcash as short term solution
Create 50 dedicated and fast-path lanes for the connections with the lowest PoW nonce.
Fully Trusted Sequencer
I did every right!
But by improving the user experience… the MEV bots got me
Fully Trusted Sequencer
Dark forest is still lurking and ready to prey on any opportunity
What is more “fair”?
Latency Games?
Auctions / Economic?
One-line summary:
Searchers can get data in real time and bid to go “back in time” by ~500 ms.
I think buying a “position in the queue” vs “a timestamp” might be easier – but open research question.
Rapid auctions
Sequencer Data Feed
Alice
Looks eerily similar to BPS (builder proposer separation)
Rapid auctions
Sequencer Data Feed
Bundle Auction
Alice
Looks eerily similar to BPS (builder proposer separation)
Rapid auctions
Sequencer Data Feed
MEV bundle
Bundle Auction
Alice
Looks eerily similar to BPS (builder proposer separation)
Rapid auctions
Sequencer Data Feed
MEV bundle
response
Bundle Auction
Alice
Tx batch
Looks eerily similar to BPS (builder proposer separation)
Configurable auction
Auction time window: 500 ms, 3 seconds, etc
Purchase: Go back in time within window
Selective: Only allow back-running / inspect MEV in real time
Interesting questions
Timeboost paper by Offchain Labs should lead to many new rapid auction protocols for �how to deal with MEV for the Sequencer