1 of 45

PBS across the layers

Patrick McCorry

*Paddy’s thoughts

2 of 45

Overview for a “layer-1” blockchain

3 of 45

Alice

Block Proposers

How can a user communicate their transaction to the block proposers?

Agents

4 of 45

Alice

Gossip Protocol

How can a user communicate their transaction to the block proposers?

Block Proposers

Agents

5 of 45

Alice

Gossip Protocol

User TX

Block Proposers

Agents

6 of 45

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

7 of 45

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

8 of 45

h/t https://mirror.xyz/totlsota.eth/Vy8-41kYphcFt40rh8SpFsDojwlwGBGkWCafqD4nTak

Countless bids in a 10 second window to capture an MEV opportunity

9 of 45

Alice

Gossip Protocol

User TX

Two problematic issues

  • Wasteful failed transactions. Priority Gas Auctions lead to lots of confirmed, but failed transactions. �
  • Unrestricted MEV as the “dark forest” will snap up all opportunities.

Block Proposers

Agents

10 of 45

Alice

Gossip Protocol

Direct communication

???

???

???

Flashbots “fix” it

Transactions bypass the

dark forest

Block Proposers

Agents

11 of 45

What can we extract from that scenario?

12 of 45

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?

13 of 45

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?

14 of 45

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?

15 of 45

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?

16 of 45

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?

17 of 45

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

18 of 45

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

19 of 45

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.

20 of 45

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

21 of 45

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

22 of 45

Benefits

  • Shares rewards. It helps non-competitive proposers to earn a share of the MEV reward.
  • Reduces on-chain spam. All the wasteful transactions / failed bids are filtered before they reach the proposer. �

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

23 of 45

How about a rollup? Is the environment any different?

24 of 45

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

25 of 45

Rollup Overview

Time

Alice

Sequencer

Response

Direct communication

Alice sends it to the Sequencer and she can get a response about its execution

26 of 45

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.

27 of 45

Rollup Overview

Time

Alice

Transaction data

List of transactions (Alice’s transfer)

Sequencer

Tx1,

…,

Alice’s Tx,

…,

TxN

28 of 45

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

29 of 45

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

30 of 45

Sequencer’s Ordering Policy

Ordering Policies

  • Highest extraction first
    • Order transactions based on the total profit the Sequencer can extract from transactions�
  • Highest fee first
    • Order transactions according to network fee paid.�
  • First come first serve (FCFS)
    • Order transactions according to arrival timestamp

Tx1,

…,

Alice’s Tx,

…,

TxN

31 of 45

First Come First Serve (FCFS)

32 of 45

First Come First Serve (FCFS)

Ordering Algorithm

  • Take user’s transaction,
  • Timestamp it,
  • Order all transactions according to timestamp

User experience

  • Quick response. A user can be informed about the execution of their transaction very quickly <1 second.
  • No MEV? Well… Well… Well…..

Tx1,

…,

Alice’s Tx,

…,

TxN

33 of 45

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

34 of 45

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

35 of 45

First Come First Serve (FCFS)

Not just one… 150k websocket connections… Why?

  • Random connections. Best strategy is to open as many connections as possible and win the lotto to get the data first. �
  • Extraction time. More time to run MEV algorithm and maximise profit.

Sequencer Data Feed

*back running tx,tx,tx*

Alice

Tx batch

36 of 45

Hashcash as short term solution

Create 50 dedicated and fast-path lanes for the connections with the lowest PoW nonce.

37 of 45

Fully Trusted Sequencer

I did every right!

But by improving the user experience… the MEV bots got me

38 of 45

Fully Trusted Sequencer

Dark forest is still lurking and ready to prey on any opportunity

39 of 45

What is more “fair”?

Latency Games?

Auctions / Economic?

40 of 45

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.

41 of 45

Rapid auctions

Sequencer Data Feed

Alice

Looks eerily similar to BPS (builder proposer separation)

42 of 45

Rapid auctions

Sequencer Data Feed

Bundle Auction

Alice

Looks eerily similar to BPS (builder proposer separation)

43 of 45

Rapid auctions

Sequencer Data Feed

MEV bundle

Bundle Auction

Alice

Looks eerily similar to BPS (builder proposer separation)

44 of 45

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

45 of 45

Interesting questions

  • Should the Sequencer be allowed to inspect an MEV bundle and decide not to include it?
    • Does this impact the credible neutrality of a rollup?�
  • Should the Auction Time Window be established so front-running / sandwiching is hard, but back running is easy? �
  • Is ~500ms auction long enough to enable a competitive MEV marketplace?
    • Is it really competitive if there are only ~5 transactions to analyze? vs 50 transactions in ~10 seconds

Timeboost paper by Offchain Labs should lead to many new rapid auction protocols for �how to deal with MEV for the Sequencer