Understanding Initia Interwoven Stack: Building a Truly Interconnected Rollup Ecosystem

CN
1 month ago

Initia is the true home of aggregated technology.

Author: Initia

Compiled by: Deep Tide TechFlow

The cryptocurrency ecosystem has had to adapt to new developmental realities, and Initia was born in this environment.

Our industry must acknowledge that a single state machine cannot meet the grand goals of cryptocurrency. While increasing transaction throughput, it is also necessary to maintain low costs for users and operators, as well as a reasonable level of decentralization, which is nearly impossible to achieve through a singular approach.

In fact, the view that a single chain can succeed is no longer mainstream. Earlier this year, discussions about modularity versus singularity became a hot topic. But the key is: this is not an either-or choice. The future direction is a combination of both: a fast, programmable Layer 1 blockchain (L1) paired with a series of rollups for specific applications that can collaboratively scale execution capabilities with L1.

When we observe Solana, we can clearly see the advantages of a hybrid (which we call interwoven) approach. Over the past six months, many teams have begun developing their own custom "network expansions" on Solana. However, isn't Solana known for its own scaling capabilities? Isn't that the core of their brand?

In reality, the significance of rollups goes far beyond scaling execution capabilities. They also involve sovereignty—allowing developers complete control over their execution environment. For instance, higher TPS, lower or even zero gas fees, control over transaction order and processing, and full ownership of their business economic model.

Clearly, rollups have become an indispensable part and will continue to exist.

The existence of Initia is based on the idea that it is specifically built to support a thriving interwoven rollup ecosystem called Minitias.

The Future is Interwoven

Initia's design goal is to become the home for thousands of Minitias, which collaborate to provide diverse, powerful, and unique applications through an organic design experience. Currently, there are two types of ecosystems. One is built for an interconnected chain world (like Cosmos), and the other is betting on rollups in the later stages (like Ethereum and now Solana). Each approach has achieved some success but also has shortcomings, and these lessons are invaluable when building new L1 models.

Initia bridges the gap between these two extremes, serving as an L1 design to support an interconnected L2 network, ensuring that Minitia developers have all the resources they need for success. From the very beginning, Initia has avoided the chaos in between through a clear design philosophy and posed a simple question: What does L2 actually need to obtain from a hub?

On Initia, rollups naturally integrate. Through Initia VIP, complete economic alignment is achieved between L1 and L2, with a clear product suite designed to ensure that Minitias have functionalities like oracles, bridging, liquidity, interoperability, and native stablecoins from the start. The interwoven stack allows teams to easily deploy a Minitia using any virtual machine (VM) of their choice, whether it be EVM, MoveVM, or CosmWasm.

So, what are the key components that make rollups on Initia possible? The answer is the Interweld Stack, an Optimistic Rollup framework built from scratch for the Cosmos SDK. Want to understand the secrets of this framework? Let’s dive deeper.

Interweld Stack

Initia's Optimistic Rollup framework consists of three closely integrated components: OPHost, OPChild, and OPinit Bots.

These three fit together like perfect puzzle pieces, forming a whole that provides robust support for each Minita.

OPHost and OPChild are modules of the Cosmos SDK, forming the core part of the interwoven stack, running on-chain. Since the OPinit stack is implemented at the chain level rather than relying on smart contracts at the specific VM level, this allows us to support multiple VMs, giving Minitia developers more freedom of choice.

On Initia, rollups are treated as first-class citizens on-chain. This provides us with the flexibility to adjust implementation details, resulting in a better user experience.

The OPHost module resides on Initia (i.e., L1) and serves as the base for all Minitias running on Initia. The main tasks of OPHost include:

  • Managing optimistic bridging (connecting L1 and L2) and the assets involved.

  • Confirming output proposals from Minitias.

  • Acting as an arbitrator between challengers and proposers to resolve disputes.

Meanwhile, OPChild exists within each Minitia, akin to the heartbeat of each rollup. Its responsibilities include:

  • Managing the rollup's operators.

  • Executing messages from L1.

  • Updating oracle price data.

  • Managing token withdrawals from L1.

OPHost and OPChild together form the optimistic bridge for each Minitia. An OPHost on Initia acts as the endpoint for L1, connecting to the OPChild modules within multiple Minitias.

It is important to note that for rollups, local bridging is not just for message passing; it actually serves as the headquarters for rollups on L1. Since two different consensus systems cannot understand each other's state machines, the bridging of rollups becomes the true basis for rollups on L1 by submitting state roots or similar verifiable outputs to ensure their correctness. This is also why L1 is often referred to as the settlement layer.

You might ask, "What connects OPHost and OPChild? Is it a relayer?" Not at all; that is the role of OPinit Bots! As an extension of the aforementioned content, the two different consensus systems cannot communicate directly without off-chain processes assisting, as the off-chain processes serve as the physical connection between their respective independent state machines.

OPinit Bots are responsible for handling key operations between Initia and Minitias in off-chain processes. They are divided into two types: Executor and Challenger. In short, these two Bots are jointly responsible for the following tasks:

  • Executing token transfers.

  • Submitting output proposals to Initia L1.

  • Submitting transaction batches to Celestia to ensure data availability (DA).

  • Passing oracle price updates to Minitias.

In the remainder of this article, we will delve into how specific functionalities within The Interwoven Stack are implemented, which will help everyone better understand how the various parts work together!

Token Transfers on the Optimistic Bridge

One of the most critical features of rollup technology is its ability to inherit the security of the L1 where it settles.

Did you know? Local bridging between L1 and rollups is often the safest way to transfer assets. This is because using local bridging does not introduce additional trust assumptions—just trust the two chains.

Before discussing the transfer mechanism, let’s address an obvious question:

Why not use the Inter-Blockchain Communication (IBC) protocol?

Although all chains on The Interwoven Stack are built on the Cosmos SDK, local bridging cannot simply serve as an IBC channel. This is because the instantaneous nature of IBC transfers does not align with the trust assumptions of our protocol. Suppose one day, a malicious Minitia operator decides to insert a malicious transaction, tampering with the balance of INIT on L2, and withdraws all INIT from their Minitia back to L1. We cannot accept such a scenario, as such an error would be catastrophic.

Withdrawals to Initia through optimistic bridging have a 7-day delay period. During this time, the Challenger can challenge and cancel suspicious withdrawals in case of malicious behavior.

On Initia, we aim to provide a seamless user experience during the asset movement process between Mintia and Initia L1. To achieve this, we have developed a secure custom solution called Minitswap for fast transfers from L2. You can learn more here: Minitswap — L2 to L1 Withdrawals Completed in Seconds, Not Days.

Token Deposits (L1 → L2)

Token deposits from Initia to Minitia are almost instantaneous. The process is as follows:

  1. The user submits a deposit transaction on Initia, which locks their tokens on L1 and triggers a deposit event from the OPHost module.

  2. The Executor OPinit Bot continuously listens for new events on Initia. When it detects the initiatetokendeposit event:

    2.a — The Executor constructs a FinalizeTokenDeposit message and submits it to Minitia.

  3. Upon receiving the message, Minitia mints the corresponding tokens on L2 and sends them to the user.

This process is both simple and secure, ensuring smooth operation!

Next is Token Withdrawals (L2 → L1).

The withdrawal operation is slightly more complex. While the deposit process from L1 to L2 is relatively straightforward, trust from L1 to Minitias cannot be easily established.

The reason is that Initia is secured by a decentralized group of validators with economic stakes, while Minitias are typically managed by a single or a few operators without economic stakes. Therefore, when a Minitia initiates a withdrawal request to L1, it needs to prove that it has not acted maliciously.

The specific withdrawal process is as follows:

  1. The user submits a withdrawal transaction on Minitia, causing the OPChild module to burn their tokens and trigger the initiatetokenwithdrawal event. Meanwhile, the Executor listens for all blocks on L2. When it captures this event, it stores the withdrawal request but does not immediately pass it on; instead, it waits for a checkpoint submission.

  2. When the checkpoint submission is reached, the Executor performs the following actions:

    3.a — Collects all withdrawal requests during that time period.

    3.b — Generates a sorted Merkle Tree to organize these withdrawal requests.

    3.c — Creates an L2 output containing the root of that Merkle Tree.

    3.d — Submits this output to the OPHost on L1.

  3. After that, the withdrawal enters a review period. During this time, if the Challenger OPinit Bot detects any suspicious activity, it can challenge the withdrawal and cancel the operation.

  4. If no challenges occur during the review period, the user can call the finalize_withdrawal function on Initia to unlock their tokens.

    5.a — This function receives the withdrawal request and its corresponding proof.

    5.b — It verifies whether the submitted proof is valid.

    5.c — If the verification passes, the tokens will be sent to the user!

Although the withdrawal process takes some time, it is a necessary cost to ensure security. However, to enhance the experience for Interwoven users, Initia has developed Minitswap. By leveraging IBC and the OPinit Bridge, Minitswap can achieve instant withdrawals while providing a high level of security.

Now that you understand how withdrawals work, the challenge mechanism may still be unclear—let's delve into that next.

What Happens When Minitia Tries to Cheat?

In previous sections, we mentioned that Minitia may engage in deceptive behavior. This is precisely why a withdrawal period is established to prevent fraudulent token theft through the OPinit Bridge.

So, who is responsible for stopping fraudulent withdrawals? This task is undertaken by the Challenger OPinit Bot.

  1. The Challenger continuously monitors the L2 outputs submitted to L1.

  2. With each submission, it retrieves the output from Initia and independently calculates the output based on Minitia's state.

  3. If the output submitted on Initia does not match the result calculated by the Challenger, the Challenger will delete the output proposal by sending a DeleteOutput message. This function can only be called by the Challenger.

Additionally, state synchronization rollbacks can be performed using Celestia.

Yes, when deleting an invalid proposal, does it mean that the current state of the aggregation becomes invalid? Indeed, this is why we have designed a robust rollback mechanism.

After a successful challenge, Minitia nodes can synchronize their state from the data previously published to Celestia, as all aggregated transaction batches are published to Celestia for data availability (DA), which is very useful when a rollback is needed.

To ensure the integrity of Minitia's state and prevent the Executor from engaging in malicious actions, the Executor and Challenger bots are designed as independent entities.

However, does this give the Challenger too much power? What if the Challenger acts maliciously and starts deleting valid outputs?

To prevent this situation, Initia has established a checks and balances mechanism through L1's governance system.

If the Challenger and Proposer (the entity responsible for submitting outputs) engage in malicious behavior, they can be replaced through governance proposals. For the Challenger, malicious behavior refers to deleting valid outputs; for the Proposer, it refers to submitting invalid outputs.

When a governance proposal is created, Initia's L1 validators will vote by running L2 nodes to confirm who has acted improperly. This system ensures that no single entity can review transactions or interfere with the withdrawal process.

Value-Added Features

If we were to settle for the ordinary without going further, it could not be called a work of Initia.

Initia makes it exceptionally easy to build your own rollup. Many may know that building a rollup is not just about hosting it; as a developer, you need to set up a lot of peripheral infrastructure, such as indexers, oracles, and bridging connectors.

Did you know? The Interwoven Stack provides all the functionalities you need.

Skip Connect—Built-in Oracle Service

Through Skip, Initia can provide fast and up-to-date asset price data for itself and all Minitias built on the Interwoven Stack.

Connect is a built-in oracle sidecar service run by Initia validators, responsible for pushing price updates on-chain. This implementation leverages two new features introduced in Cosmos SDK version 0.50: ABCI++ and Vote Extensions. These features allow validators to submit arbitrary data and store it on-chain, preventing malicious parties from filling blocks with junk data to block price updates.

Once price updates are on-chain, developers can query them through command line interfaces (CLI), application programming interfaces (API), or at the smart contract layer.

Additionally, Connect's prices will be passed to every Minitia on the Interwoven Stack, ensuring they can conveniently access the latest prices from day one.

This way, Minitia does not have to bear the burden of running necessary infrastructure or seek third-party oracle providers, negotiate with them, or invest resources for integration. Everything has been arranged for them!

Cross-Chain Contract Calls

To achieve true interoperability, Initia requires a secure and efficient cross-chain communication method. Developers can choose from various methods, one of which is to implement bridging hooks on the Optimistic Bridge. The bridging hooks function similarly to IBC hooks, allowing contract calls to be triggered during token transfers. The OPinit bridging hooks are used to trigger contract calls while transferring assets through the OPinit Bridge.

On OPHost, the bridging hooks are responsible for updating the metadata of the bridge; on OPChild, the hooks allow arbitrary transactions to be executed during the FinalizeTokenDeposit phase.

Our designed system supports multiple virtual machines, so whether it is EVM, MoveVM, or CosmWasm, the bridging hooks can execute arbitrary transactions based on the data fields in the message.

For example, here is the data format applicable to EVM chains.

Built-in Indexer

Minitia comes with a built-in indexer that automatically indexes and stores all relevant data on the chain. This data can be accessed via a REST API for querying historical records.

Whether it's token information, NFT details, or transaction records, all these functionalities are already integrated.

Indexing is a significant challenge when building on-chain applications, and this built-in indexer greatly simplifies the process! Running your own indexer is often both costly and cumbersome. With this built-in indexer, developers can display information such as token balances, NFTs, and transaction history without having to build their own or rely on third-party indexers.

This built-in indexer also provides out-of-the-box support for Initia Scan, which is the block explorer for L1 and each L2.

Conclusion

Delving into The Interwoven Stack has been a very enjoyable experience. This technology is beautifully designed and supports Initia's Interwoven vision. By building The Interwoven Stack as a Cosmos SDK module, Initia has successfully transformed the SDK into a technology stack for building optimistic rollups while retaining all the advantages of the Cosmos SDK, which is remarkable.

There is much more to The Interwoven Stack that we were unable to explore in depth today, and I strongly recommend checking out its code repository as well as the related bot code repository for a deeper understanding of this technology.

Ultimately, one unchanging fact remains: Initia is the true home of rollup technology. Initia was designed from the beginning for the development of Minitias. The Interwoven ecosystem has sparked innovation, with Minitias like Blackwing, Contro, MilkyWay, and Inertia being novel application-specific rollups that will be available from day one! All these innovations are made possible by the support of The Interwoven Stack.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink