Mempool Matching: Unlocking the key to efficiency through cross-domain synchronization

Introduction

With MANTIS, Composable introduces multi-domain block-building architecture. Multiple domains will be sequenced at the same time. The result is a number of new and interesting cross-domain efficiencies, such as matching mempools between different ecosystems.

Specifically, I believe that mempool matching can occur cross-chain using tools such as Composable’s MANTIS (Multi-chain Agnostic Normalized Trust-minimized Intent Settlement). Through this technology, pending transactions in mempools on different chains can be matched, and subsequently settled.

In this post, I explore Composable’s introduction of “cross-domain slots”, which we define as blocks that are created across multiple chains at the same time. I further discuss how such cross-domain blockbuilding can be expanded, such as with cross-chain mempool matching, which has a number of benefits.

The Problem

All blockchain nodes have memory pools (mempools) or similarly functioning components, which serve as 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.

The Solution

Luckily, new cross-chain technology has been introduced that enables the interoperability of blockchains at a deep level, which can include passing information back and forth about chains’ respective mempools.

You can think of a blockchain as being a distributed system that allows for 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:

Imagine that 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 Coincidence of Wants (CoW) between the two pending transactions across the two chains. Settlement of these pending transactions can occur more efficiently if they are matched.

Thus, we present a path towards full “mempool matching”.

The steps for implementing this are as follows:

  1. Initially, searchers match transactions in different mempools

  2. Searchers match transactions within blocks that are being built on Composable Cosmos (the Cosmos SDK chain serving as a core component of Composable’s cross-chain interoperability infrastructure)

  3. Thereafter, builders plug into MANTIS

  4. From here, builders can identify matches between blocks that are being built on Composable Cosmos

  5. Mempools are identified

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

As shown in the above steps, this mempool matching can be done using MANTIS, the ecosystem-agnostic intent settlement framework. If you’re unfamiliar with intents, in general, they are understood to be users’ desires for a given transaction or other outcome. Intents include desired parameters (such as to swap X amount of A token for B token), but leave some room for flexibility (such as where this swap occurs) in the solution that solvers provide.

Different use cases/iterations of mempool matching are described in further detail below:

Application to Blockchains:

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.

Application to Rollups:

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.

I am convinced that the Based rollup design (exemplified here) is the correct way to implement rollup interactions between users and sequencers. However, most rollups seem to be pretty unopinionated about 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.

To support Based rollups while optimizing their management of mempools, Composable could do the following:

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

Benefits:

In all of the above use cases, mempool matching results in 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.

Conclusion

To summarize, Composable’s MANTIS introduces architecture for cross-domain slots. This in turn introduces the opportunity for a number of cross-domain efficiencies to be implemented, such as mempool matching according to Coincidence of Wants. This could be particularly useful in the case of rollups, which often lack in the area of mempool management. As a result of cross-domain mempool matching, efficiency is improved across the board, including in the amount of data that is being posted on chain, costs to users, and cross-domain MEV extraction.

In conclusion:

1 Like