Mantis: first restaked SVM L2 on Solana, intents and chain abstraction
Article4,090 words
Long-form report on modularity, fragmentation and intents, arguing Mantis' IBC-powered cross-chain intent execution and settlement, secured by restaking, brings RFQ trading and decentralized solvers to Solana. Contrasts imperative transactions with declarative intents.
Key claims
Intents are signed declarative constraints (Paradigm definition)
Mantis is the first restaked SVM L2 on Solana
Mantis: The Billion $$$ Protocol
The future is multichain but the UX in crypto is broken. Mantis, a.k.a the first restaked SVM L2 on Solana, fixes this. Leveraging a unique cross-chain intent execution & settlement framework powered by IBC and secured by an asset-agnostic restaking layer, @mantis makes chain abstraction across 1000s of chains a reality, bringing RFQ trading and decentralized solver infra to @solana.
Web3 is getting ready for mass adoption. We are heading into a rollup-centric multichain future, composed of thousands of app- and vertical-specific blockchains that will provide the infrastructural basis for applications that can support 100s of millions of users. Unfortunately, this does not come without a cost.
As applications turn into app-specific execution layers the fragmentation of liquidity and users across ecosystems and chains increases, the UX suffers. To unify this multichain world, allow users to transact across any chain without having to worry about the technicalities on the backend and enabling protocols to capture billions of dollars in cross-domain MEV, one piece of the puzzle is missing.
Exactly anon, I’m talking about @mantis.
The Future is Modular
Before we dive into Mantis, let’s take a step back. Is modularity really the next big thing?
Yes anon.
Monolithic blockchains like Ethereum are constrained by certain limitations with regards to customizability and throughput. On any general purpose execution layer, applications ultimately compete for blockspace, which inevitably leads to congestion or spiking transaction fees.
In the case of Ethereum, high on-chain activity can price out many users from using DeFi applications. Other blockchains like Solana run on a smaller set of high-spec validators, which allows for more performant execution logic that can process transactions in parallel, in order to increase throughput at the base layer level.
However, this comes with a high degree of complexity in design and doesn’t guarantee that there won’t be any congestion. or, as happened in the past on Solana, even complete network outages. Additionally, the high validator requirements of blockchains like Solana have an adverse impact on the decentralization of the network as the barriers of entry and the cost of operation increase.
The need to balance scalability, decentralization, and ultimately security is also known as the blockchain trilemma. This fundamental challenge embodies the core difficulty faced by blockchain networks.
Achieving this balance is essential for the effective functioning of any blockchain system. However, optimizing for one often results in trade-offs with the others.
The modular thesis aims to fix this and overcome these limitations by stripping the core functions of a blockchain apart into distinct, interchangeable layers. In these functional areas, specialized players arise that optimize for specific functions.
In combination, these modular building blocks give rise to a future built on highly scalable execution layers that are optimized at every level of the tech stack to serve specific use cases or verticals. This enables more flexible & performant network designs, effectively overcoming the before-mentioned blockchain trilemma.
Rollup SDKs and Rollup-as-a-Service providers simplify the process of building decentralized networks, serving as a final abstraction layer on top of these customizable technology stacks and modular infrastructure.
Today, launching your own fully customized rollup can be done with only a few clicks of a button on a drop-down style web UI. The resulting app- or vertical-specific networks are not only fully customizable up to the application layer logic, but also function as dedicated and fully independent execution layers, which means that different applications that in a monolithic setting would compete for blockspace with user interactions potentially congesting the mempool, can scale much more effectively. This will provide the infrastructural basis for mass-adoption ready applications that can support millions of users.
Unfortunately, this modularity and the subsequent Cambrian explosion of L1 and L2 execution layers also fragments liquidity and users across an increasing number of ecosystems, adversely impacting the user experience on-chain. To overcome this friction, intents can help, significantly improving the overall Web3 UX.
WTF are Intents?
To unleash the full power of modularity as a design principle in Web3 it is important to ensure that users on the frontend are able to navigate the complexities of the web3 landscape on their own. This means taking inspiration from the evolution of Web2, where user needs were met with user-friendly tools like search engines and chatbots such as ChatGPT. Web3 must deliver a powerful experience that is also easy to use.
One promising approach is the concept of intents. In order to understand intents, we have to comprehend where we currently stand and how the Web3 UX looks today.
When we interact with a blockchain or an application that is built on-chain, what we do is basically expressing the desire to get something done. We want to swap a token on uniswap, we want to transfer tokens from A to B or we want to provide liquidity, or whatever it might be.
However, there are different ways to express that desire.
In the current, transaction-based flow, we have to give very specific instructions by signing transactions with our private key for every step of the interaction (approve tokens, sign transactions, etc.). This is an imperative paradigm of concise order & execution.
With intents, this is fundamentally different. If a transaction explicitly specifies the method for performing an action, an intent specifies the desired outcome of that action, creating a declarative paradigm.
For example:
A transaction may state: "do A then B, pay exactly C to get X back"
An intent would express "I want X and I'm willing to pay up to C.”
An analogy to simplify this a bit using a familiar concept is comparing transactions and intents as follows:
Transactions specify an execution path (specific location, store and item).
→ E.g. I go to McDonald’s two blocks down to buy a Big Mac meal with fries and coke zero for $8.
This translates well to your typical on-chain transaction, where you swap:
For a specific item (Token)
At a specific location (Chain)
A specific store (DEX)
At a specific Price
Intents on the other hand specify a certain desire.
→ E.g. I want a burger with fries and coke zero.
As buyers, we express intent and allow third parties to fulfill our desire in exchange for value. You specify your requirement and some conditions for fulfillment, without specifying where it’s from or how it’s obtained.
Think of intents as unfulfilled transactions:
McDonald’s can fulfill your intent. So can Five Guys, In-N-Out, or the bodega at the corner of the street.
Rings a bell? It should! Every time you use Trip(.)com or Uber Eats you're tapping into an intent network. These typically provide greater access to information and sellers, and complete transactions far more efficiently than you can by specifying your own path of execution.
So, now that we understand intents conceptionally, how can we define intents in more technical terms? A definition I like a lot is the one by
“An intent is a signed set of declarative constraints which allow a user to outsource transaction creation to a third party without relinquishing full control to the transacting party” (Paradigm)
Let’s put that into the context of Web3:
This declarative paradigm introduces exciting improvements in user experience (UX) and efficiency. With intents users can simply express their desired outcome, leaving the task of achieving that outcome to sophisticated third parties. This is in contrast to the current imperative paradigm, where every parameter is explicitly specified by the user.
While these improvements hold promise for the web3 space, intent-based designs on Ethereum can also have significant implications for off-chain infrastructure. In particular, there are important connections to activities related to MEV (Maximal Extractable Value) and market control.
In the standard transaction-based flow, a transaction signature enables the validator to follow a specific computational path against a particular state.
In contrast, an intent does not specify a specific computational path, but rather allows for any path that satisfies certain constraints.
When a user signs and shares an intent, they effectively grant permission to what is referred to as “solvers” to choose a computational path on their behalf (see figure below). This distinction allows for a slightly more precise definition of intents as signed messages that permit a set of state transitions from a given starting state. A transaction is a special case of an intent that allows for a unique transition.
Additionally, many intents can be included in a single on-chain transaction, allowing for matching overlapping intents, increasing gas and economic efficiency.
WTF is Cross-Chain MEV?
MEV, or Maximal 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 MEV is not only bad. 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. Personally, I 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 matures, 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.
In any case and aside from any specific technology, I definitely anticipate that cross-chain MEV will soon be productively extractable.
This MEV extraction approach has distinct benefits for different ecosystem participants:
Proposers: These entities propose which transactions to include in the next block by looking at which transactions in the mempool pay the highest priority fee; thus, proposers are able to take advantage of MEV opportunities.
Searchers: These entities extract MEV by running complex algorithms. On MANTIS, searchers extract MEV from the presence of transactions in pre-processed blocks proposed by proposers.
Users: A portion of revenues from proposers, searchers, and others can route to users to offset user gas fees (as explained below).
So before we dive into the L2 architecture and the app layer design on the Mantis L2, let’s have a look at how Mantis aims to implement this MEV extraction and what the benefits are.
Meet the @mantis Pay-for-order-flow model.
Pay-for-order-flow is a concept that has its origins in traditional finance. In PFOF, a market maker pays a broker for routing their clients’ trades to the market maker. Thus, market makers benefit from increased order flow (and increased earnings), while brokers earn money by effectively selling the order flow of their users to market makers. Moreover, clients can benefit from reduced trading costs.
This concept remains essentially the same in the DeFi context: market makers pay order flow originators to route trades to them. Benefits to participants include:
Market makers (solvers): On Mantis, market makers can be independent entities or solvers can play a market making role. These parties benefit from increased order flow, resulting in increased earnings
Orderflow originators: These are protocols that generate user orders (or intents, on Mantis). Such protocols make money from selling order flow to market makers
Users: End users can have reduced (or even completely eliminated) gas costs on their transactions.
Within the PFOF model on @mantis, gas costs are a dynamic value that is subject to market conditions. This means that users could be able to trade entirely for free in the event that the below incentive equation is positive, and solvers are able to cover user gas fees:
(+) 0.1% of transfer
(+) Sale to blockbuilders
(+) MEV
(-) Money paid to blockbuilders in the role of searcher
(-) User’s gas
If not, then users will have a partial gas payment. Solvers can also take out short term loans and use these to cover gas fees, then pay these loans off after the order is executed and they receive their rewards.
The Mantis Infrastructure (L2)
So what about this restaked L2?
@mantis is a chain abstraction stack implemented as the first restaked SVM L2 on Solana. It's where native yield meets chain-abstracted orderflow powered by a cross-chain intent settlement framework based on IBC.
The Mantis rollup is home to the Mantis solver-based request-for-quote system. It is the first SVM rollup on Solana and is first to bring RFQ swaps to the network for the first time. The L2 serves as a coordination and settlement layer for cross-domain intents and provides a framework for block proposals and credible commitments across chains, providing a vertically integrated pipeline for expression, execution, and settlement of cross-chain intents.
Uniquely, Mantis natively integrates trust-minimized IBC bridging and an intent-centric architecture to improve both user experience and execution. With its decentralized network of competing solvers, Mantis aims to optimize user results while creating extractable value for other parties (MEV), providing a way of addressing the significant yet under-explored space of cross-domain MEV.
Key L2 Components
The bridge contract facilitates deposits and withdrawals of SOL and liquid staked tokens (LSTs), providing both native and restaking yields. Users deposit SOL, which is then staked with Solana validators for proof-of-stake validation. The staked SOL is represented by LSTs, which users can choose to restake into the @solana restaking layer powered by @PicassoNetwork, thereby achieving doubled staking yields. Stablecoins deposited into the bridge contract are integrated with lending protocols on Solana, such as Kamino and MarginFi, further enhancing user yields.
The rollup’s execution engine is a lightweight SVM (parallel execution) with a decentralized sequencer to ensure censorship resistance and maintain the credibility of scoring and blockspace auctions.. The sequencing layer runs order flow auctions on the @mantis rollup, builds blocks confidentially, and interacts directly with the bridge contract on Solana mainnet for fund unlocking and routing intents to other chains. The rollup connects with IBC through Picasso’s IBC implementation on Solana, allowing seamless cross-chain operations. Mantis will feature a decentralized sequencing mechanism out of the gates where Picasso’s staking protocol serves as the crypto-economic security layer.
The cross-chain intent execution happens through solvers, which are staked agents that query the problem mempool and propose solutions. The initial implementation will have solvers directly tap into the sequencer to access the problem mempool. In the future, additional privacy mechanisms will be introduced to ensure no leakage in both proposed solutions and mempool problems.
@Mantis explores dynamic fee mechanisms to optimize intent processing and priority handling. This includes the introduction of a dynamic fee mechanism with top-of-block versus rest-of-block block auctions, enabling dynamic intent processing. These new fee markets can be implemented on L2 solutions like rollups, improving the native fee handling without requiring modifications to the underlying L1.
@PicassoNetwork's restaking layer on @Solana secures the sequencers, ensuring that transaction inclusion on L1 is not done maliciously. This also enables fast withdrawals by bypassing the normal fraud proof window associated with rollups, thanks to a permissionless, crypto-economically secured proof system that unlocks user funds on the L1 chain from Mantis.
Native Yield
The @mantis rollup is also a general-purpose SVM execution layer that enables builders to build novel applications that leverage the Mantis framework for cross-chain intent settlement and have IBC-powered interop capabilities.
Additionally, it offers the native yield, which is a key differentiator compared to many other L2s. Imagine funding your @dYdX account or @Binance account and being able to earn yield on your deposits while waiting for an opportunity. This can be huge to attract liquidity and TVL on-chain (especially if coupled with airdrop expectations, see Blast).
Intent Lifecycle
At the heart of @mantis lies a robust solver network capable of supporting various order types, including:
Cross-chain RFQs (Request for Quotes): These are requests for trading quotes that involve assets from different blockchains. They enable users to trade assets across various blockchain networks without needing to move their assets to a centralized exchange.
Single Chain RFQs: These are requests for trading quotes within a single blockchain. They facilitate trading of assets that exist on the same blockchain network, simplifying the process and reducing the need for cross-chain communication.
Coincidence of Wants (CoWs): This refers to a situation in trading where two parties each hold an asset the other wants, enabling a direct exchange. In a blockchain-based trading app-chain, this concept is used to match trades efficiently without the need for intermediary assets or complex swaps.
Generalized Intents: These are flexible trading intents that specify the desired outcome of a trade rather than the exact parameters. They allow for more dynamic and versatile trading strategies, where the app-chain can match trades based on the broader intent of the users rather than specific conditions.
The permissionless solvers will integrate with a wide range of orderflow destinations, including games, decentralized exchanges (DEXs), lending protocols, and more.
Mantis’ multi-domain processing capability will support Ethereum, Solana, and other ecosystems connected via the Inter-Blockchain Communication (IBC) protocol.
Across these chains, the lifecycle of an intent expressed through one of the before-mentioned UIs (see App Layer chapter) on the @mantis L2 involves the following steps:
The user expresses and signs an intent.
The intent is sent to the Mantis rollup mempool.
Solvers stake and propose solutions, submitting them to auction smart contracts on the Mantis rollup.
The Mantis protocol scores solutions based on utility maximization.
The winning solution is selected and executed on the destination chain.
Misbehavior by solvers results in IBC-based proof of misbehavior and slashing.
A central piece of the whole system are @mantis’ cross-domain combinatorial auctions to optimize MEV extraction and ensure atomic settlement of cross-domain intents. Initially, these auctions will have a just-in-time structure, evolving into a future blockspace market where rights to future blockspace can be bought and sold.
A just-in-time auction is a mechanism for atomic expression of preferences across domains. It involves simultaneous English auctions with a unique combinatorial block offering process. Validators pre-commit to block proposals, and if conditions are met, the relay decrypts signatures and broadcasts blocks to corresponding networks. This approach ensures efficient and secure cross-domain execution, even though it faces challenges like double-signing risks and trust in the relay that are subject to research.
The restaking component powered by @PicassoNetwork enables future blockspace allocation mechanisms, where block proposers issue credible commitments about future block construction. These commitments are traded in combinatorial batch auctions, enhancing efficiency and reducing monopolistic power of any participant. This allows it to support new paradigms like cross-domain flashloans and atomic arbitrage, increasing user welfare and validator revenue.
Why build a L2 on Solana?
Choosing @solana as the foundation for Mantis's rollup was a strategic decision driven by several factors:
Fast Finalization: Solana’s fast finalization on its L1 provides a solid foundation for the rollup and enables unprecedented throughput with low latency.
Privacy Control: The ability to control privacy through leader-based consensus mechanisms ensures secure & confidential transactions.
Custom VM Components: Solana allows for the creation of custom virtual machine (VM) components, enabling modular control over orderflow.
Native IBC Integration: Utilizing IBC to move assets between L1 & L2 ensures quick and easy transfers without the long withdrawal times seen in optimistic rollups on Ethereum.
The MANTIS Token
As mentioned earlier, @mantis aims to be the first L2 in production on Solana, and is looking to pioneer chain abstraction in order to combat the fragmentation and siloed liquidity issues common on Ethereum-based L2s.
With IBC baked into the core rollup, Mantis enables a singular, chain-abstracted point of interaction for all connected chains, significantly improving overall UX.
This entire system, or more specifically the Mantis L2 will be powered by a token.
The $MANTIS token is the native utility token of the Mantis L2, used for:
Security: Staked to secure the Mantis rollup and solvers.
Settlement Payment: Used for settling transactions on the rollup.
Fee Sharing: Stakers receive a percentage of revenue from order flow.
Network Fees: Used to pay fees on the network and settle on the rollup.
The Mantis App Layer
On top of this intent-centric infrastructure, @mantis will introduce its own application designed for intent-driven, cross-chain social trading (basically a frontend/UI for the Mantis infra).
However, beyond this, and since Mantis is a permissionlessly programmable SVM rollup, Mantis also aims to become the backend engine for Telegram bots, AI agents, wallets or other use cases that build with intents.
As a solver network powering chain-abstraction for these apps, the Mantis system will:
FIll cross-chain orders such as limit orders, market orders, DCA, etc.
Fill single-chain orders on @Solana, Ethereum, and the broader IBC ecosystem. This is particularly interesting on Solana, where the solver/intent based trading landscape is still quite nascent with Jupiter being the only real solution for aggregation.
Offer a variety of solutions for intents. This includes RFQs, CoWs, routes to different protocols, collaborative solving, and cross-pollination within these solution types.
Provide access to cross-chain actions beyond swaps. Mantis users will be able to tap into lending protocols, NFT platforms & more.
@mantis offers an experience for on-chain user interactions that feels familiar, much like the user experience on protocols like dYdX, (app-chain perp DEX) except, on Mantis, your account can be used for any on-chain action you desire across any supported chain.
Additionally, @mantis provides users with native yield. Normally, in the case of a protocol like dYdX, funds just sit idle without earning yield. Mantis addresses this issue. However, while any asset can be deposited into Mantis over IBC, only specific assets will earn native yield. When you deposit qualifying assets to your Mantis account, your assets will be earning yield. Built-in yield on your Solana holdings if you’re not busy spring shitocoins.
Towards the user, the complexity of the fragmented backend of chains is fully abstracted. Borrow $SOL from Ethereum mainnet, open a leveraged long using ETH as collateral on Drift, ape into $SOL shitcoins from any IBC-connected chain and much, much more. Users simply submit any intents, which are then optimally settled via the solver network, and earn yield on their assets in the process.
Combining native yield with optimized chain-agnostic intent settlement, Mantis provides users with a yield-bearing way to interact with the entire crypto space. Fully chain-abstracted.
Telegram bots, AI agents, and wallets built on this permissionless infrastructure, will be the endgame for UX in the modular multichain future we’re heading into.
To expand reach and functionality of the application layer, future plans also include integrating with MPC wallets and other expression layer components.
Conclusion
In the context of the modular expansion and the emergence of 1000s of fragmented app- and vertical-specific L1s and L2s, chain abstraction is key. The @mantis rollup provides a full stack solution for intent-driven chain abstraction and provides a vertically integrated pipeline for expression, execution & settlement of cross-chain intents.
This is a unique design in the market and addresses the significant yet under-explored space of cross-domain MEV, while enabling highly generalized cross-chain interactions (not just bridging and swaps).
Mantis is also a general-purpose SVM L2 on Solana that provides unparalleled speed, low cost, native yield and IBC-powered, intent-based interoperability, which will make it the basis for apps with a chain-abstracted & mass adoption ready UX.
On top of that, users get native yield just for holding assets on the network.
AI agents, multichain wallets, telegram bots or the native Mantis app are examples of frontends that will leverage the @mantis infrastructure, providing users with one singular UI for all of DeFi with built-in native yield.
Everything you imagine is real on Mantis.
Break free.
What came next · since 26 Jul 2024
Since then
Zero has written 4 more pieces on Mantis since this one.