[Infrastructure] Understanding the Strengths of Modular Structures through Mantle

May 22, 2024
Disclaimer: This post is for informational purposes only, and the author is not liable for the consequences arising from any investment or legal decision based on the information contained in this post. Nothing contained in this post suggests or recommends investing in any particular asset. Making any decisions based only on the information or content of this post is NOT advised.

1. Introduction: Modular vs. Monolithic

Blockchain technology has been working tirelessly to process as many transactions as possible in a unit of time without compromising (or redefining) the fundamental value of trustlessness. The methods to achieve this have evolved over the past 3–4 years into two distinct approaches: monolithic and modular.

  • Monolithic: A structure in which a single network is responsible for the functioning of the blockchain.
  • Modular: A structure that divides blockchain functionalities into consensus, execution, settlement, data availability, and more, solved by multiple networks.

Leading the monolithic camp are Solana, Aptos, and Sui, while Ethereum stands out as the flagship for modularity. As each chain operates under different trust assumptions, making direct comparisons is challenging. Nevertheless, as of 2024, all have achieved significant scalability. For instance, Aptos demonstrated a TPS of 30K during a performance test on Previewnet in December last year, while Ethereum boasts 48 active rollups according to L2BEAT, enabling it to handle a vast number of transactions.

As both camps have achieved high scalability, one might question whether structure matters. Thus, this post explores the forward-looking advantages the modular architecture offers.

In 2024, fast transaction speed is no longer considered a strength for blockchains; rather, they are seen as a basic qualification. Investment in Layer 1 has been almost non-existent, with a heightened focus on Layer 2(L2) and interoperability indicating this shift. The current buzz around blockchain technology centers on enhancing user experience. Examples include enabling fee payments, ensuring secure storage and recovery of private keys, or the feature to separate and delegate account execution rights in a simple and consistent manner. However, executing upgrades in line with the rapid development of technology can only be burdensome when considering the relevant risks.

The strengths of the modular structure lie in addressing this challenge. By separating blockchain functions and handling them across multiple networks, the impact of changes is contained and development can occur in parallel. This is why Ethereum can maintain its position at the forefront of technology trends without needing frequent upgrades.

In this article, we’ll showcase the power of modularity through the example of Mantle’s Tectonic upgrade.

💡 Mantle is an L2 protocol using the rollup technology. It serves as the execution layer in a modular structure and stores the data required for consensus on Ethereum.

2. Mantle Network Mainnet v2 Tectonic Upgrade

Mantle announced the Tectonic Upgrade in a blog post on March 15th. This upgrade, built on the OP Stack Bedrock upgrade, introduces significant architectural changes aimed at enhancing the transactional experience for users.

2.1. Architecture

2.1.1. Transaction Recording and Validation

The transaction flow within the architecture is as follows:

  1. Transactions submitted by the user to the RPC node are validated by op-geth.
  2. The sequencer creates a block every two seconds by ordering the transactions submitted by users.
  3. The Merkle root value of the block is sent to the op-proposer, who records it to the Ethereum smart contract.
  4. The transaction information for the block is transmitted to the op-batcher who stores it in MantleDA.
  5. Validators use transaction information from Ethereum’s Merkle root and MantleDA for validation.

The depicted architecture is more complex than the typical monolithic design, as blockchain responsibilities are divided among multiple services. The sequencer handles transaction validation and ordering, while the op-batcher and op-proposer manage data storage and validation between Ethereum and MantleDA. Ultimately, the data stored in Ethereum and MantleDA can be fetched and validated by anyone.

2.1.2 MantleDA

What sets apart the Mantle architecture from typical OP Stack chains is the MantleDA part. MantleDA serves as its own Data Availability (DA) layer, developed in collaboration with the EigenDA team at EigenLayer. It is designed to store the data required for validation externally, reducing costs and speeding up queries. Mantle previously relied on an external DA layer, but with this upgrade, MantleDA and the OP Stack functions have been upgraded to provide the same service without the Data Transport Layer (DTL) service that was present in v1.

The modularity of the architecture is a significant strength, allowing for flexibility in technology selection despite the need for different services. This is exemplified by Mantle’s decision to adopt MantleDA to enhance cost-efficiency and query capabilities, even though it could store validation data on Ethereum. Moreover, this choice was driven by the flexibility of the modular structure for future changes; it can be adapted at any time to store transactions on Ethereum with minimal adjustments. In a landscape of rapidly evolving requirements, a modular architecture offers notable advantages over a monolithic one.

2.2. Enhanced Transaction Experience

With this upgrade, Mantle has focused on enhancing the transaction creation experience for users, introducing two new features: Meta Transaction, which allows for the payment of transaction fees on behalf of users, and fee optimization strategy.

2.2.1. Meta Transaction

The requirement to physically hold tokens, even in small amounts, to submit transactions has long been a barrier to blockchain usability. While Account Abstraction (AA) was introduced to the Ethereum mainnet in 2023 as a solution, it remains impractical due to high gas fees, prompting ongoing discussions on improvements.

In response, Mantle Protocol has developed Meta Transaction technology, enabling fee payment even in the absence of fully mature account abstraction. Let’s delve into the sequence diagram to understand how this technology operates:

  1. With the simulateTx transaction, users can choose a sponsor and decide how much of the gas bill they are willing to pay.
  2. The user asks the sponsor to sign
  3. The sponsor forwards the signature to the user.
  4. op-geth validates meta tx and submits gas fees on the user’s behalf.

To implement Meta Transactions in the op-geth component of the diagram, Mantle additionally developed the functionality by introducing the metaTx flag in the transaction payload and a signature for gas fee sponsorship payments. This allows users to have their fees paid by a sponsor. Mantle’s Meta Transaction functionality was also developed to allow sponsors to terminate sponsorships at a set block height and to allow partial gas fee payments for greater flexibility.

Compared to account abstraction technologies existing outside of Ethereum, such as mempools and bundlers, Mantle offers a simpler solution to the problem of fee payment at the protocol level. The reason Ethereum has to address complex issues externally is due to the extensive impact of changes on its infrastructure, which limits modifications and results in lengthy development and verification processes (e.g., EIP-4337 was proposed in 2021 and implemented in 2023). However, L2 protocols like Mantle enjoy greater flexibility and independence from Ethereum, allowing for easier problem-solving through protocol modifications.

2.2.2. Fee Optimization Strategy

Mantle’s Tectonic upgrade, in conjunction with EIP-1559 support enabled by the OP Bedrock upgrade, has introduced a fee optimization policy leveraging the tokenRatio variable. Let’s delve into the transaction costs on Mantle using the following formula:

L2ExecutionFee = L2gasPrice * L2gasUsed * tokenRatio

The L2gasPrice follows the fee model introduced in EIP-1559, which aims to enhance fee predictability and manageability by incorporating a base fee and a priority fee. Unlike Ethereum’s EIP-1559, where the base fee is burned, in OP Bedrock’s version, it’s directed to the BaseFeeVault, promoting a more predictable gas fee system (though this depends on how BaseFeeVault operates). Furthermore, Mantle supports both Legacy Transactions, akin to Ethereum, for backward compatibility, and the EIP-1559 transaction type. The latter is marginally more cost-effective for submission to the sequencer, given the control over transaction costs.

The tokenRatio represents the value (eth_price/mnt_price). This price ratio of the two tokens is important because the transaction fees submitted to Ethereum for storing data on Mantle are tied to the price of Ethereum. In the Tectonic upgrade, the ratio values mentioned earlier are capped to prevent rapid fluctuations in the prices of MNT or ETH, which could otherwise lead to spikes in gas costs. This measure will enable more predictable gas fees.

As a result of these changes, Mantle now provides a stable and predictable gas fee structure, along with the introduction of the new Fee Estimation feature. This feature brings several enhancements compared to Mantle v1:

In addition, Mantle now has the capability to hold multiple transactions per block, a major benefit of the Bedrock upgrade, enabling the consistent creation of one block every two seconds. Additionally, the platform maintains the same block tags — safe, unsafe, and finalized — which can be beneficial for compatibility across OP Stacks.

3. Benefits of Modular Design

Above, we’ve explored Mantle’s Tectonic upgrades. Mantle leverages the EigenDA layer to streamline expenses and query functions, has developed fee payment functions easily at the Mantle protocol level rather than relying on account abstractions, and has proposed a proprietary gas fee calculation system to optimize gas costs. Freed from the complexities of consensus algorithms and the operational overhead of managing a large group of validators, such as in Cosmos, users can efficiently prioritize delivering desired features and autonomously set their own policies, including fees, within Mantle.

These enhancements are made possible by Mantle’s modular structure. While a monolithic architecture might lean towards conservative choices to ensure system compatibility, a modular approach allows for independent development and upgrades of each component. This flexibility enables swift adaptation to emerging technologies in the dynamic blockchain landscape while ensuring overall system stability.

Consider the Dencun upgrade in March as an example. During the development of the Tectonic upgrade, EIP-4844 had not been applied to the mainnet. Mantle’s decision to maintain its own DA likely aimed at stability, especially considering the performance constraints imposed by the 128kb size limit for blobs after the Dencun upgrade, particularly when competing with multiple L2s. Since the implementation of EIP-4844, the cost of data storage for rollups has significantly reduced. In extreme cases, as illustrated below, gas costs have approached zero. The sheer magnitude of this reduction may render the comparison unnecessary, but it represents a reduction of about 140 billion times compared to previous levels.

Blob gas costs 140 billion times lower than Calldata storage costs

In this context, if Mantle wants to store the data required for validation in Ethereum without incurring significant data storage costs, it can modify the DA layer it uses by simply modifying the functionality of op-node and op-batcher in the current structure using EigenDA. This flexibility is possible because it’s all modular.

In this context, if Mantle needs to store the data required for validation in Ethereum without incurring significant data storage costs, it can achieve this by modifying the DA layer through adjustments to the functionality of op-node and op-batcher within the current structure, utilizing EigenDA. This level of flexibility is achievable due to Mantle’s modular architecture.

4. Conclusion

Blockchain is constantly evolving, moving beyond scalability to become a technology capable of delivering real value by enhancing user experience. However, the increasing complexity of the technology and demands for stability pose challenges for rapid upgrades to new features. A modular approach to blockchain, which divides its functionality and limits impact, allowing for parallel evolution, could offer a solution.

Mantle’s Tectonic upgrade serves as a prime example. It effortlessly addressed the fee payment issue at the protocol level and proposed a gas fee optimization strategy tailored to its characteristics. Moreover, it demonstrated flexibility in accommodating new blockchain features. This adaptability is crucial, as protocols risk losing public interest if they lag in development. However, there are drawbacks. The complexity of modular structures poses challenges in assessing system stability, and they inherit security risks from the layers they depend on. As we’ve seen with the rise of interoperability in DeFi, each protocol became a potential target for attacks, despite undergoing thorough audits.

Nevertheless, I remain optimistic about the modular structure. Breaking down formidable goals into smaller, achievable ones is the first step towards a solution. It will be fascinating to witness how the modular era of blockchain evolves to deliver trust-minimized value.


Related Articles