MANTIS: A Revolution in X-Chain MEV
The missing piece of the modular puzzle: A composable orderflow abstraction layer for MEV-optimized cross-chain intent settlement powered by IBC and secured by restaking.
Primer on Cross-Chain MEV
MEV, or Miner Extractable Value, occurs when block producers prioritize or manipulate the order of transactions to extract value from a blockchain. In a cross-chain MEV attack, the attacker targets transactions involving assets or data from multiple blockchain networks, potentially damaging the parties involved. These attacks can be difficult to detect and prevent due to their complex nature. To mitigate the risk, it's crucial for any blockchain network to have robust security measures (such as a separation of duties among different parties, see visualization below) and for users to be aware of potential risks.
But let’s have a look at cross-chain MEV from a different perspective. Composable proposes that cross-chain MEV should be studied as an alternative to CEX-DEX arbitrage, suggesting it might offer greater earnings potential to arbitrageurs. Currently, the valuation of cross-chain MEV and its contributing factors, such as latency, are not fully understood.
Despite industry sentiment that latency in cross-chain MEV may be a deterrent, there is no quantifiable study confirming this. I personally strongly believe that cross-chain MEV is becoming an increasingly significant and viable opportunity, potentially enabling users to trade for free or at a reduced cost if the extracted value is redistributed the right way.
But why should you think about this as an alternative to CEX-DEX arbitrage? Well, similar to CEX-DEX arbitrage, cross-chain MEV involves arbitrage based on price differences between digital assets in two different locations. However, in cross-chain MEV, these locations are on two separate chains, not exchanges. This significantly increases the potential for larger price differences and arbitrage opportunities (much less efficient markets across chains as this is a very nascent space).
As cross-chain DeFi progresses, I believe the potential for cross-chain MEV will only grow (probably massively and rapidly). Cross-chain interoperability protocols like for instance IBC, are accelerating cross-chain composability, which will definitely increase opportunities for cross-chain MEV extraction. Additionally, as the industry trends towards being more on-chain and less CEX-dependent, which implies that opportunities for CEX-DEX arbitrage (a very crowded space anyhow) may decrease going forward.
Overall, I definitely anticipate that cross-chain MEV will soon be productively extractable.
The Cross-Chain Intents / MEV Landscape
Anoma and SUAVE have similar concepts of generalizing user intents/preferences to Composable. They both involve a market of solvers/executors who compete to fulfill these intents/preferences, using privacy technology to facilitate trustless collaboration. However, they have fundamentally different approaches to achieve it.
Anoma envisions many fractal instances with a homogeneous architecture. This means that many chains with shared standards can benefit in several ways as described above.
Flashbot’s SUAVE on the other hand takes a different approach by recognizing that many chains are likely to have completely heterogeneous architectures. It serves as another abstraction layer in the stack to cater to this role for any chain, regardless of its specific architecture. SUAVE aims to optimize as the universal preference layer by outsourcing key components for any domain.
To achieve this, SUAVE provides a single environment where parties can collaborate on the expression, execution, and settlement of preferences in a decentralized manner. It consists of three main components:
Universal Preference Environment: This is a chain and mempool specialized for expressing and settling preferences. It aggregates preferences from users and searchers across all participating chains into a unified location.
Optimal Execution Market: This is a network of executors who listen to the SUAVE mempool and compete to provide the best execution for user preferences.
Decentralized Block Building: This is a decentralized network for block builders to access encrypted preferences from users and merge them into partial or full blocks.
At the core of SUAVE is the concept of preferences. A preference is a message that a user signs to express a specific goal and unlock a payment if the user's conditions are met (like intents, which I have previously covered in the context of Composable here). Preferences can range from simple transfers or swaps within a single domain to complex sequences of events across multiple blockchains. Preferences serve as the native transaction type on SUAVE and can either contain a payload to be executed on a specific domain (such as Ethereum) or make a more abstract statement of the user's desired outcome, leaving the optimal routing to the executors.
MEV in the Context of Composable X-Chain Intents
Conceptually, Composable is very similar to SUAVE. Instead of preferences, we just call it intents. A cross-domain intent settlement platform, such as the one being developed by Composable, introduces a new type of Miner Extractable Value (MEV), known as the before-mentioned cross-domain MEV. As this is a new form of MEV and MEV itself is still relatively under-studied and reported, this introduces a number of difficult questions on the infrastructure level. I believe one of these is the potential impact of cross-domain MEV on the price of intent settlement.
Let’s quickly revisit the concept of cross-domain MEV. As we learned before, this refers to the value extracted from cross-chain transactions. This extractable value comes from two main sources, as outlined by McMenamin in 2023:
Intrinsic-extractable value: This is the expected value for an extractor at the exact moment the state or transaction needs to be acted on (t = 0).
For an order, this is roughly the combined expected value of all front- and back-running opportunities.
For a pool, this is approximately the expected value from moving a price up or down when orders are included in the chain.
Time-extractable value: This value, similar to an option, is derived because the extractor has time between confirmation times/blocks to decide whether to act on a particular blockchain state.
For extractors, this is the summation of all paths with a positive extractable value at expiration, multiplied by the probability of that path occurring.
Specifically within the Composable ecosystem, cross-domain MEV arises from cross-chain intent settlement. Composable’s MANTIS receives user transaction intents, which are then picked up by solvers competing to find the optimal solution for executing these intents. After the best solution is selected through a scoring mechanism, the winning solver is then required to carry out their proposed solution (path). A single solution can encompass a number of different domains. Searchers can access the order flow from these solutions not only within each domain, but also between domains, thus resulting in cross-domain MEV.
Enabling Pay-for-Orderflow On-Chain
Composable’s Cosmos chain is optimized for order flow processing. This enables novel network designs with Composable taking a key role with regards to orderflow management. But before we dive in, let’s revisit some important concepts that we need to understand.
The MEV Supply Chain
The MEV (Maximal Extractable Value) supply chain in a blockchain ecosystem involves various actors and processes that interact to identify and exploit MEV opportunities. Key components of this supply chain include:
Searchers: These actors identify MEV opportunities by analyzing the state and transactions within a blockchain. They employ strategies like front-running, where they anticipate and replicate the transaction strategy of others, and back-running, where they aim to position their transactions immediately after a specific transaction to gain profits. An advanced strategy includes the sandwich attack, where a user's transaction is encased between two transactions initiated by the searcher to exploit price slippages​​.
Block Builders: This group is responsible for assembling blocks in the blockchain. They select transactions and transaction bundles from the mempool based on specific criteria, aiming to maximize the profitability of the block. The block building process is critical in the MEV supply chain, as it determines which transactions are included in a block and their order​​​​.
Relays: Relays facilitate the communication between block builders and other network participants. They play a pivotal role in transmitting transaction bundles and other relevant data, ensuring that the information necessary for effective block construction and MEV extraction is readily available to block builders​​.
Cross-Domain Proposer-Builder Separation (PBS)
Cross-Domain Proposer-Builder Separation (PBS) represents an evolution in blockchain architecture aimed at enhancing efficiency and decentralization. In this model:
Separation of Roles: The roles of block proposers and builders are distinctly separated. While proposers are responsible for proposing new blocks to the blockchain, builders focus on assembling the contents of these blocks. This separation is intended to reduce the potential for centralized control and manipulation within the block production process.
Enhanced Efficiency: By separating these roles, each actor can specialize and optimize their part of the block production process. Builders can concentrate on identifying the most profitable transaction sets (including MEV opportunities), whereas proposers ensure the timely and secure addition of these blocks to the blockchain.
Decentralization and Security: This separation can lead to a more decentralized system. Since builders are not in direct control of the block proposal process, it becomes harder for any single entity to exert undue influence over the contents of a block, thereby enhancing the security and integrity of the blockchain.
To delve deeper into the technical aspects of Composable's architecture and its role in enabling Pay-for-Orderflow (PFOF) on-chain, let’s examine how Composable fits into all of this.
Composable Cross-Chain Execution
As hinted at before, Composable's Cosmos chain is designed for optimized order flow processing, a critical component in enabling efficient PFOF. This optimization is achieved through the MANTIS system - Multichain Agnostic Normalized Trust-Minimized Intent Settlement. MANTIS empowers users to define and execute their intents across various blockchains, effectively abstracting the complexities involved in cross-chain transactions while leveraging the security of the Inter-Blockchain Communication (IBC) protocol​​​​.
User Intents and Transaction Bundling
User Intents at Wallet Level: Users express their transaction intentions directly within their wallets. This approach prioritizes user experience, making blockchain interactions more intuitive.
Solving and Executing Transactions: The expressed intents are converted into executable transactions. This involves intelligent routing and execution strategies to optimize transaction outcomes.
Cross-Chain Transaction Bundling: Transactions destined for different blockchains are aggregated into blocks. This bundling facilitates efficient processing across multiple ecosystems​​​​.
The Orderflow Auction (OFA) Mechanism
This finally brings us to the core of the system. Orderflow auctions, that basically enable an on-chain implementation of a Pay-for-Orderflow model (PFOF).Â
Payment for Order Flow (PFOF) is a financial practice where brokerage firms receive compensation from market makers for directing clients' orders to them. This mechanism allows brokers to offer lower or zero commission trading to their clients, as they generate revenue through these payments. Market makers, in return, benefit from the spread between bid and ask prices of securities. While PFOF has been credited with reducing transaction costs and increasing market liquidity, it also raises concerns about potential conflicts of interest and market transparency. Brokers might prioritize routing orders to market makers offering the highest payments, potentially impacting the quality of trade execution for clients. This practice is subject to regulatory oversight to ensure transparency and protect investor interests.
In the context of Composable's cross-chain intent settlement layer and Orderflow Auctions (OFA), it is basically the same concept that facilitates efficient transaction routing and execution across chains. PFOF incentivizes certain network participants, like validators or relayers, for efficiently processing and settling cross-chain transactions.Â
But let’s have a closer look at Composable OFAs:
Blocks Exposure to Searchers: Bundled transactions are exposed to searchers via an auction on the Composable Cosmos chain.
Auction Dynamics: Searchers participate in the auction, expressing their bids and tipping via the OFA mechanism. This process introduces a market-driven approach to transaction processing.
Cross-Chain Settlement: Post-auction, the bundles are dispatched to their respective ecosystems for processing according to the logic of the corresponding chain, with settlements occurring on the Composable Cosmos chain​​.
Composable PFOF Participants
Composable's intent settlement framework includes many roles, each of the actors listed below may be willing to pay for order flow through the on-chain PFOF introduced above. Therefore, the ecosystem's incentives can be tailored to motivate these actors to perform their roles effectively. If the incentives are significantly positive, a part could be used to cover user gas costs.
Solvers
In the MANTIS framework, solvers propose and execute user intents, earning rewards based on the quality of their solutions. The reward is calculated by subtracting the reference score (the score of the second highest solution) from the observed quality (the sum of the user surplus and fees paid to MANTIS). If a settlement fails, the observed quality is zero, potentially leading to the solver paying the protocol, thereby incentivizing feasible solutions.
Searchers
Searchers in the X-Chain MEV system can extract MEV by looking through transactions in the mempool for profitable opportunities. They can order transactions to maximize potential value capture, add an additional fee to their transaction bundle to increase the chance of being added to the block, and profit from MEV opportunities such as arbitrage and liquidations.
Validators
Validators securing the network and validating transactions earn rewards from MEV. A restaking layer is planned for the intent settlement framework, involving a network of off-chain validators restaking native tokens and running a light client. This protocol will store necessary information, enabling restakers to sign on-chain. Validators can opt into the restaked validator layer and select protocols to restake with, increasing potential rewards but also the amount slashed for malicious actions.
Block builders
Builders interact with the system by receiving bundles from Composable. Their role includes the construction of blocks in the system. They earn money by selling block space to searchers at a price lower than what the searcher is willing to pay. Essentially, builders are compensated for including order flow in their blocks.
After successfully isolating the centralizing effects of MEV to the block builder role, our next challenge is to decentralize block building itself. Exclusive order flow and cross-domain MEV pose centralization threats to all cryptocurrencies. Therefore, we must strive to keep MEV decentralized to maintain the overall decentralization of crypto.
Composable separates the mempool and block builder role from existing blockchains and provides a highly specialized and decentralized plug-and-play alternative. By sharing the same sequencing layer, Composable allows crypto to remain decentralized, enable block builders to capture cross-domain MEV, allow validators to maximize their revenue, and enable users to transact with the best execution. This also helps in reducing the economic centralization pressure on each domain.
Economic Model and MEV Integration
Composable introduces an economic model where Miner Extractable Value (MEV) can be used to subsidize transaction fees. This model is critical in making on-chain transactions financially viable and user-friendly.
Dynamic Gas Costs: Gas costs are made dynamic, adjusting based on market conditions. This flexibility can potentially enable users to trade without incurring direct transaction fees.
Incentive Equation: The model includes various revenue and cost components like a percentage of the transfer (akin to CoW Swap), MEV, sales to block builders, and fees paid to block builders as searchers (the PFOF model discussed above).
Solver Loans for Gas Fees: In scenarios where the incentive equation is not positive, solvers can cover user gas fees by taking short-term loans, to be repaid after the execution of orders and receipt of rewards​​​​.
Searcher Conditioning and Commitments
The architecture also incorporates advanced features like searcher conditioning and specified commitments.
Searcher Conditioning: This involves defining the criteria or conditions that searchers would specify or condition in their auction participation.
Specify Commitments: A commitment mechanism is required for ensuring the inclusion of transactions in blocks. This involves agreements by proposers on both chains.
In the context of Composable's Pay-for-Orderflow (PFOF) model and cross-chain intent settlement layer, searchers (the parties interested in processing the transactions) would specify or condition various aspects of the transactions to maximize their profitability and efficiency. Key areas that searchers would likely focus on include:
Transaction Type and Size: Searchers would specify the types of transactions they are interested in, such as swaps, transfers, or other DeFi operations. They might also condition their interest based on transaction size, preferring either large transactions for higher profits or small ones for lower risk.
Chain Specifics: Given the cross-chain nature of the transactions, searchers would specify which blockchain networks they are focusing on. This could be based on their expertise, the transaction fees on different chains, or the liquidity available in those ecosystems.
Slippage Tolerance: In the context of trading or swapping assets, searchers would condition their activities based on the acceptable level of slippage, balancing the potential profit against the risk of price movements during the transaction execution.
Gas Fees and Execution Cost: Considering the cost of transaction execution, including gas fees on various chains, would be a critical condition. Searchers might seek to optimize their strategies based on dynamic gas prices and the overall cost-effectiveness of the transaction execution.
Time Sensitivity: Some searchers might condition their participation based on the time sensitivity of orders, focusing on transactions that need to be executed quickly, where they can leverage their efficiency, or alternatively, on less time-sensitive transactions where they can maximize other aspects like cost efficiency.
Risk Management Parameters: Searchers would also consider the risk associated with different types of transactions and might set parameters to manage this risk, such as limiting exposure to certain assets or avoiding transactions with high volatility.
Regulatory Compliance: In certain jurisdictions, regulatory compliance might be a condition for participating in the order flow, especially in regions with strict financial regulations.
Profitability Thresholds: Ultimately, searchers are incentivized by profits. They would likely set conditions based on expected profitability thresholds, engaging in transactions that meet or exceed these thresholds.
The combination of these searcher conditioning and the above mentioned proposer commitments effectively enables a cross-domain PBS design similar to the high level design introduced earlier in this chapter. This would essentially be a network of relays, similar to IBC relayers with PEPC-boost.
So how exactly are participants in this cross-domain PBS design impacted vs. their traditional roles? Let’s explore!
Searchers: Continue to operate within their respective blocks, but with enhanced strategy and execution options due to the auction-based mechanism.
Block Builders: Interact with mempools built for mempool matching, increasing efficiency and improving value extraction.
Proposers: Involved in the commitment process, integral in facilitating efficient transaction inclusion and execution​​.
MEV-Resistant Block Building in the Modular Stack
Building Blocks for the Ethereum Ecosystem
Composable is uniquely designed to support any L1 or L2 network and could potentially even serve as a shared sequencer for rollups. However, Composable's role is distinct from traditional shared sequencer designs.
Let’s assume we’re talking about Ethereum: Users transmit transactions to its mempool, and Composable's block builders then generate blocks for Ethereum. These blocks vie with those from traditional Ethereum builders, giving proposers the option to choose them for the canonical chain.
In the context of L2 rollups, Composable doesn't replace existing block selection mechanisms but could be integrated into a PoS consensus similar to Ethereum L1. Sequencers or validators in rollups might opt for blocks created by Composable, enhancing the overall efficiency of block construction.
Aligning with PBS principles, Composable decentralizes the role of the trusted third party (TTP) that assembles transaction bundles. This innovative approach is designed to diminish the impact of MEV, complementing shared sequencers to fortify security and user experience in the blockchain space.
Composable as an Orderflow Layer for Rollups
Based on the design outlined above, Composable can take on a pivotal role in enhancing the efficiency and functionality of rollup orderflow. In this capacity, Composable does not compete with existing L1 or L2 networks; instead, it focuses on optimizing the mempool and the block builder role. This specialization allows Composable to support a wide array of networks, including rollups, providing a set of valuable services
Rollups can export Mempool to Composable
Rollups can provide pre-confirmations and export their mempools to Composable’s chain-agnostic orderflow layer. By exporting their mempools to Composable, rollups can leverage Composable’s network to run order flow auctions efficiently. These auctions facilitate the determination of transaction order and inclusion, enhancing the overall throughput and reducing potential bottlenecks and addressing the MEV-related intricacies discussed earlier in this report.
Shared Sequencers and Orderflow Auctions
Composable's architecture allows it to act as a shared sequencer for rollups conduciting orderflow auctions in conjunction with the rollups it serves. Alternatively shared sequencers that rollups are using can synchronize with Composable’s system to manage order flow and participate in block auction. This in turn can lead to more efficient transaction processing and potentially lower costs for users.
Cross-Domain PBS Integration
Composable provides rollup a plug-amd-play integration to a cross-domain PBS design that not only improves MEV extraction but also bolsters the decentralization and security of their networks.
Liquid Staking Tokens and Value Accrual
Composable can collaborate with rollup teams to introduce liquid staking tokens. These tokens could potentially accrue value from the integrated orderflow auctions and overall transaction processing enhancements brought by Composable. This model can create a new avenue for value distribution within the rollup ecosystem, benefiting stakeholders and enhancing the economic model of the rollups.
Distribution of Value Accrual to Users
A significant aspect of Composable’s integration with rollups is the potential to pass a portion of the value accrual back to the users. This approach aligns with the decentralized ethos of blockchain, ensuring that the benefits of enhanced efficiency and value generation are shared among the network participants. Users of the rollup, by virtue of participating in the network, could receive a share of the profits generated from the orderflow auctions and other Composable-enabled enhancements.
Enhancing Security in X-Chain MEV and Atomicity
Composable’s infrastructure bears significant potential in boosting security for cross-chain MEV and improving cross-rollup atomicity as it opens the door for collaboration with Shared Sequencers for improved transaction coordination and safety. This is important because generally, while improving cross-chain composability, the atomicity enabled by is limited due to the lack of execution guarantees.
Example:
Consider a cross-chain arbitrage example using Composable:
Block 1 (B1): Features a trade to buy ETH at a lower cost on Rollup 1.
Block 2 (B2): Includes a trade to sell ETH at a premium on Rollup 2.
Composable can propose both B1 and B2 to a shared sequencer, with a condition for joint execution or rejection. This guarantees synchronized execution and consistent state outcomes.
Composable’s adaptable framework accommodates a variety of user intents and the specific challenges of each domain. If a user insists on the execution of both trades, the solver shoulders the risk of potential failure, using their capital for both transactions.
However, this requires the solver to be skilled in managing price execution risks, thereby catering to users and solvers based on their unique risk tolerances. Composable effectively delivers economic cross-domain atomicity from the user's perspective, with the solver assuming potential risks.
Conclusion
The future is cross-chain and with a rapidly growing number of L1s and L2s, there is a very urgent need for infrastructure that enables cross-chain composability whilst abstracting cross-chain execution, maximizing UX benefits and minimizing MEV externalities. Composable’s cross-chain intent settlement layer that, similar to Flashbot’s SUAVE but extending to multiple domains in parallel, enables MEV-resistant, decentralized block building, could easily become a key component for increasingly modular network designs. This would also introduce a number of significant benefits to the modular chains (rollups) that integrate with Composable, as it would allow them to basically build out a PBS design on L2, effectively countering the MEV problem and centralization forces within that. By adding some degree of economic execution guarantee on user cross-chain intents, Composable can also improve the atomicity that is enabled by shared sequencing networks that service multiple rollups. I will definitely continue to follow the developments around Composable as the importance of cross-domain MEV continues to grow quickly and the modular design thesis gains traction quickly.