RFP 8 - Introducing Cross-Rollup Atomicity Execution and Mempool matching into Shared Sequencer Design

Researcher: TBD

Summary

Mempools are a critical blockchain component. Yet rollups in particular do not put much emphasis on their management. This is a missed opportunity in terms of efficiency and MEV extraction. Moreover, the Based rollup design, which has many other strengths, does not allow for cross-rollup MEV extraction. Therefore, it does not solve the problem of introducing cross-rollup atomicity or cross rollup auctions.

With Composable’s MANTIS (Multichain Agnostic Normalized Trust-minimized Intent Settlement) comes the ability to aggregate multiple mempools of multiple rollups. This could provide a solution for shared sequencers that want to be able to, at the minimum, introduce things like cross-rollup atomicity (via mempool matching), before more complex pre-reservation schemas.

This initiative thus seeks to determine the following:

  • How best to design auctions that optimize for rollup mempool handling in the context of shared sequencers

Background & Problem Statement

Background

Core background concepts/definitions are as follows:

Mempools & Mempool Matching:

All blockchain nodes have memory pools (mempools) or similar components, which are a backlog of pending and unconfirmed transactions for the chain. Mempools are important in blockchain as they store transactions prior to their approval. Yet, mempools have a lot of inefficiency, as they are all closed, separate systems.

A blockchain can be viewed as a distributed system that allows multiple users at the same time to express themselves. If you have similar state machines, you can feasibly match these requests of state transitions, which is advantageous as it reduces the need to perform things on-chain. This is shown in the below example:

Alice is selling $500 USDC for ETH on Ethereum and Bob is selling $500 worth of ETH for USDC on Solana. Both transactions are in the mempools of their respective chains. This creates a CoW between the two pending transactions across the two chains. Settlement of these pending transactions can occur more efficiently if they are matched.

Composable’s Multichain Agnostic Normalized Trust-minimized Intent Settlement (MANTIS) framework involves implementing mempool matching follows:

  1. Mempools can be exported from various chains and protocols to a mempool auction contract, where an auction occurs and allows different entities to match the transactions pending in the mempools

  2. Initially, searchers match transactions in different mempools

  3. Searchers match transactions within blocks being built on Picasso Cosmos

  4. Thereafter, builders plug into MANTIS to share their mempools and facilitate matching

  5. From here, builders can identify matches between blocks being built on Picasso Cosmos

  6. Mempools are identified

  7. Mempools now become tagged with the type of transactions they contain, resulting in submission to the Picasso Cosmos chain and easier matching

The overall concept of mempool matching is depicted below:

The primary benefit of mempool matching is improved efficiency. This is because matching along the principle of CoWs means that less has to be processed on-chain; instead of two orders settling separately, the orders are used to settle each other. This improved efficiency may trickle down to users and result in lower gas. Further, this provides an opportunity for cross-domain MEV extraction.

Node operators/protocols from various blockchains can send pending transactions from their mempools to Composable’s ecosystem-agnostic intent settlement framework, MANTIS. Thus, Composable’s MANTIS can serve as a place where mempools from different nodes/networks are outsourced to us. From there, we can build the blocks for these protocols based on the pending transactions in their mempools. In particular, MANTIS would be building blocks on multiple chains in what we call “cross-domain slots”.

If we have a significant number of ecosystems that we are building blocks for, searchers (and then builders) can match mempool “intents” (e.g. intents that are pending, as opposed to transactions that are pending) based on Coincidence of Wants. Settlement can then occur, as facilitated by solvers and the rest of the MANTIS framework.

As a result, blockchains will be able to have transactions/intents in their mempools settled much more efficiently, outsourced and settled through MANTIS.

Rollup Mempools:

Cross-domain slots and mempool matching are also useful for rollups. This would be a large potential user base for mempool matching, and the larger the user base, the more easy it will be to find matches.

The Based rollup design provides a means of implementing rollup interactions between users and sequencers. However, most rollups do not specify how to handle mempools. FIFO is not necessarily the best way to handle things, and current designs are lacking in support for cross-rollup MEV extraction as well. A deeper level of synchronization between these rollups is required to enable cross-domain MEV.

Based Rollups:

Based rollups are a relatively new form of rollup that were introduced by Ethereum Research to be driven by the base L1 (hence, based). As per Ethereum Research, “a based rollup is one where the next L1 proposer may, in collaboration with L1 searchers and builders, permissionlessly include the next rollup block as part of the next L1 block.”

Advantages of based rollups include enhanced liveness (e.g. the same liveness guarantees as the L1), enhanced decentralization (also from the L1), simplicity in sequencing, zero gas overhead, optional sovereignty, and L1 ergonomic alignment (e.g. MEV from the rollup flows to the L1).

Yet, a major limitation of based rollups is their constrained sequencing. Ethereum Research states that “Fast pre-confirmations with L1 sequencing is an open problem.” Moreover, given that based rollup MEV is transferred to the L1, they have no MEV income themselves.

MANTIS:

Through MANTIS, an ecosystem-agnostic intent settlement platform is introduced. A summary of the flow of the MANTIS protocol is below:

  1. Intent Submission:
  • User-Driven Transactions: Users specify their transaction requirements, typically involving an exchange of a certain amount of one cryptocurrency (Token A) for another (Token B).
  • Assisted Order Formulation: MANTIS assists in setting up order limits; in the example of exchanging A for B, MANTIS provides suggestions for the exchange amount of Token B. The exchange rate will not be less than the user-defined A/B ratio.
  • Confirmation and Blockchain Registration: Users review, confirm, and sign their transaction details for blockchain recording.
  • Timeout vs. Price Limits: A balance between price limits and matching times is maintained, with tighter limits possibly leading to longer wait times for order matching.
  1. Order Execution Observation:
  • Status Monitoring: Users can track the status of their orders post-placement.
  • Possible Outcomes: Orders may be fully executed, partially filled, canceled, or timed out.
  • Handling Partial Fills: Partially filled orders result in users receiving a portion of the requested amount, with the remainder being canceled or expiring based on the order settings.

3a. Single-Chain Execution Scenario:

  • Efficient Execution: The platform swiftly matches orders in a single transaction block for prompt fulfillment.
  • Batch Auctions: Batch Auctions process multiple orders simultaneously, maximizing the product of exchanged amounts (A * B) for efficient matching.

Order Pricing:

  • Dynamic Price Matching: The platform matches orders to achieve optimal trading volume without violating user-set limits.
  • Execution at Optimal Prices: Execution occurs at a price that maximizes volume, ensuring efficiency.

3b. Cross-Chain Execution Scenario:

  • Multi-Chain Execution: Certain orders are executed using liquidity pools across multiple blockchain networks, involving several blocks and chains.
  • Cross-Chain Virtual Machine (CVM) Program: The CVM facilitates these transactions, ensuring efficient multi-chain swaps.
  • Monitoring Interface: A detailed interface provides real-time updates for multi-chain transactions.
  • Cross-Chain Transfers: This includes straightforward cross-chain transfers.

Problem Statement

The problem here is that rollups do not optimally handle their mempools. This is a missed opportunity all around for optimization and value extraction.

Thus, the question that this research aims to address is as follows:

  • How can auctions optimize for rollup handling of mempools in the context of shared sequencers?

Plan & Deliverables

Expected outputs/deliverables are as follows:

  • A model for auctions that optimizes for rollup mempool management

The plan for achieving this output is outlined below:

Experiment 1: Create infrastructure to support Based rollups while optimizing their management of mempools

This could provide a solution for shared sequencers that want to be able to, at the minimum, introduce things like cross-rollup atomicity (via mempool matching), before more complex pre-reservation schemas.

This involves developing architecture that does the following:

  1. Hook into shared sequencers
  2. Sequence mempools
  3. Pass these mempools to sequencers
  4. Sequencers thus implement mempool matching for rollups

Experiment 2: Create an auction structure that optimizes rollup mempool management

This will be done by analyzing the existing auction structure and assessing for/addressing MEV loss. We will also incorporate mempool matching between rollups, using shared sequencers. We will model/simulate this auction structure to demonstrate its effectiveness.

References

How to Participate

If you’re a researcher who believes that you would be a good fit to contribute to any of the Composable RFPs, please reach out to Composable’s Lead Research Associate, Sydney Sweck, at sydney@composable.finance. In the email, be sure to include:

  • The RFP number(s) you’d like to contribute to
  • Your relevant background experience
  • How you think you could contribute to the research