Rollup — Stepstone of Mass Adoption to DePIN Utility

This article was originally written by Zealot D.S.


Rollup — Stepstone of Mass Adoption to DePIN Utility

This article was originally written by Zealot D.S.

Bitcoin successfully addressed the challenge of achieving consensus in the decentralized realm through the innovation of blockchain technology. Subsequently, engineers have grappled with the intricate task of enhancing scalability, a formidable challenge given the inherent conflict between scalability, security, and decentralization — a predicament commonly referred to as the blockchain trilemma. The scalability dilemma has proven to be a major impediment to the widespread adoption of blockchain. Balancing the imperative aspects of security and decentralization, which are non-negotiable for blockchain integrity, poses a continuous challenge. Without maintaining this delicate balance, blockchain risks resembling a centralized system. Furthermore, the low scalability drives up the cost of using blockchain. Consequently, despite its potential, the mass adoption of blockchain has been impeded in recent years.

What‘s Modular Blockchain

In recent years, engineers have diligently tackled the challenges posed by the blockchain trilemma and have now arrived at a viable solution: Modular Blockchain. This innovative approach involves the division of the blockchain into distinct modules and layers, with each layer dedicated to handling specific requirements. Typically, security and decentralization take precedence on Layer1 (L1), while scalability is addressed on Layer2 (L2).

Conceptually, L1 and L2 can be perceived as interconnected yet distinct blockchains. L1 assumes the responsibility of ensuring the security and decentralization of L2, with the world state being settled on L1. L1 primarily executes transactions and stores states, essentially functioning as the backbone. Notably, even in scenarios where all L2 nodes are offline, the community can recover L2 from the information stored on L1, reinforcing the resilience of this modular blockchain solution.

In a typical modular blockchain, key modules drive functionality:

1 Consensus: This module is crucial in determining the transactions to be included in the blockchain and establishing their order.

2 Execution: Responsible for executing transactions and obtaining the post-state.

3 Settlement: decides the consensus state. Designed to decide the consensus state, this module steps in when there’s a disagreement on the state, facilitating resolution.

4 Data Availability (DA): Ensuring universal access to transaction history within the community, this module is pivotal for settlement procedures and blockchain recovery efforts.

What Is Layer 2(L2), and Why Ethereum Needs It

Feeling perplexed? No need to fret. Let’s approach it from Ethereum’s viewpoint. If another blockchain (L2) claims it can enhance scalability, what specific expectations might arise?

Task One: It needs to tell me what happened to it (Clarify the transaction details and their sequence).

Task Two: How does it convey the latest state post-transaction execution, and is there a method for verifying its accuracy?

Task Three: Is there a specified mechanism for facilitating cross-chain calls?

……

Exploring How Rollups Achieve These Three Tasks

Rollup is referred to as L2; let’s check how it works to accomplish the three tasks above.

Task One: Data Availability (DA)

To begin, initiate the process by sending a designated amount of ETH to the Layer-2 (L2) network to cover gas fees. Execute this step through the L1->L2 cross-chain bridge, referred to as “deposit.” Typically, the L2 network will also run the L1 node; simply await the finalization of the L1 block containing the deposit transaction; once confirmed, the deposit will be secured.

Next, move forward by sending transactions to the L2 sequencer. The L2 sequencer node will efficiently manage the transactions. Think of it as a standard blockchain process: the sequencer constructs blocks housing the transactions, executes these blocks, and maintains the chain’s most current state. At regular intervals, typically every two minutes or when a sufficient number of transactions are gathered, the L2 sequencer compresses the transactions and securely commits them to the L1 chain. This strategic approach ensures that the L1 is fully informed about the L2 transactions and their specific order. With the successful completion of Task One, we refer to this entire process as “Data Availability (DA)”.

Task Two: Optimistic(OP) and Zero Knowledge(ZK) Rollups

Now, both L1 and L2 nodes have visibility into the transactions executed by the L2 sequencer. These transactions undergo significant compression, being exclusively stored on calldata, resulting in minimal gas costs. Other L2 nodes prefer to obtain the DA (Data Availability) data from L1 as a trusted source rather than relying on the L2 peer-to-peer network, despite also receiving blocks from L2 (although not entirely trusting it). At regular intervals, such as every hour, the L2 sequencer node commits the Merkle root of the L2 state to the L1 RollUp contract. This action ensures that the L1 is updated with the latest state of the L2. However, at this point, the L1 doesn’t automatically trust this information. L2 employs two methods, OP and ZK, to convince L1 of its accuracy — details of which will be discussed later. With the successful completion of Task Two, let’s raise a cheer!

Task Three: Withdrawal from Layer 2

Once you've completed your activities on L2 and decide to retrieve your ETH to L1, this process is known as “Withdrawal”. While it may resemble cross-chain operations in other scenarios, the key distinction lies in the fact that the withdrawal originates from L2, leading to differences in security guarantees compared to other cross-chain operations. On the L1 side, it is imperative to handle the withdrawal operation with caution. Since it originates from the external world beyond L1, initiating this action triggers an L1 transaction (e.g., transfer token). Incorrect execution of this transaction can result in alterations to the L1 state.

The withdrawal process entails the following steps:

1. Initiate a withdrawal transaction on L2, similar to other cross-chain scenarios.

2. Wait for the transaction to be rolled up to L1, covering both Data Availability (DA) and state. Verify the state’s accuracy using OP or ZK methods.

3. Execute the withdrawal transaction on L1, similar to other cross-chain scenarios.

OP and ZK Rollups

Let’s delve deeper into OP and ZK to understand how L2 ensures the accuracy of the state committed to L1, the foundation of Rollups security.

OP stands for Optimism. L1 optimistically assumes that the L2 sequencer node is truthful but doesn’t blindly trust it. It initiates a challenging window, typically lasting seven days. Within the challenging window, any L2 node can challenge the stated root’s correctness. The challenged transaction is then replayed on L1 to determine the correctness between the sequencer node and the challenging node. Successful challenges result in the sequencer node being penalized, with the challenger receiving the staked funds on L1. The state root is adjusted to the correct value, but note that only the state root is modified, not the transaction list.

Typically, L2 DApp operators run their own L2 nodes, opening the door to potential challengers. From a challenge perspective, if the sequencer node provides inaccurate information, a successful challenge could lead to a significant reward from the funds staked by the sequencer node on L1. Thus, it is imperative to initiate the challenge upon the occurrence of an incorrect state. Conversely, from the sequencer node’s viewpoint, a challenge is inevitable if it commits a wrong state root, resulting in a penalty, loss of staked funds on L1, and the reversion of the incorrect state root. This discourages the submission of inaccurate state roots, ensuring the secure operation of the Optimism solution.

However, the OP solution has a drawback: a 7-day challenging window. This means that if you plan to withdraw your tokens to L1 via the official OP bridge, you must wait for 7 days after initiating the withdrawal action on L2. Yet, for those withdrawing fungible tokens (e.g., ERC20 tokens), using third-party dapps can expedite the process at a minimal cost.

On the other hand, ZK, short for Zero Knowledge, relies on a cryptographic algorithm called Zero Knowledge proof. The sequencer node runs zk-EVM on L2, generating a ZK proof that validates the transition of the L2 state from the pre-state to the post-state after applying a set of transactions. This proof, verifiable in an L1 contract, ensures that the L1 can trust the correctness of the state transition. Generating a ZK proof can be challenging, requiring several hours. However, the verification process is straightforward, involving a simple transaction on EVM. In contrast to OP, the withdrawal delay with ZK is typically measured in hours, presenting a more efficient option. Additionally, with a more powerful machine, the delay can be further shortened.

Upon scrutinizing OP and ZK, it’s apparent that both can scale L1, requiring trust only in transactions on L1 and eliminating the need for trust in anything on L2. When considering the RollUp system comprising L1 and L2, security and decentralization align closely with L1, while scalability extends to the combined potential of L1 and L2. Having multiple L2s rolling up to the same L1 significantly extends scalability.

Zk-rollups bundle transactions into batches, Chainlink

Pioneering Mass Adoption: The Role of Rollups in DePIN Utility

Typically, utilizing Rollup allows Ethereum’s TPS to reach into the thousands. However, the current bottleneck is the Data Availability (DA). Despite efficient compression of L2 transactions before committing them to L1, gas costs escalate with increasing transaction numbers. An alternative approach involves committing transactions to a third-party decentralized storage service, leading to substantial gas savings in L1 blocks. This, combined with other solutions, could potentially offer near-unlimited scalability. However, this comes with trade-offs, as the influence of third-party decentralized storage services on system security must be considered. Anyway, blockchain could achieve great scalability while remaining secure and decentralized. The blockchain trilemma was resolved. This breakthrough opens up the potential for mass adoption. So, Rollup emerges as a crucial stepping stone in the widespread adoption of DePIN utilities.

DePIN, short for Decentralized Physical Infrastructure Network, leverages blockchain rewards to foster the development of physical infrastructure networks. Take Arkreen as an example; it uses blockchain rewards to inspire individuals to contribute to building a clean energy network. Miners, in this case, construct solar systems, collect data for electricity generation, and submit it to the Arkreen network. Arkreen network will identify and filter out the honest and valuable data and supply token rewards to the miners according to the data. The Arkreen network operates in a decentralized manner, boasting over 12,000 miners at present and anticipating potential growth into the millions in the near future. Hence, it requires a highly scalable blockchain infrastructure to accommodate this extensive miner base. In the past, achieving this level of scalability was technically and economically challenging. However, with the support of scalability introduced by modular blockchain, such as Rollups, it has become feasible.

Envisioning DePIN projects built on a modular blockchain (e.g., Rollup) allows them to attain high scalability at a minimal cost, while still benefiting from the security and decentralization of a foundational blockchain like Ethereum. Tokens issued by DePIN projects, known as RWA (Real World Asset), derive their value from real assets. These assets, with on-chain liquidity, generate funds for miners, motivating them to contribute to the DePIN network’s growth and creating a value flywheel. Multiple DePIN projects can collaborate in the real world and form a DePIN ecosystem on-chain, further increasing the value of DePIN. Collaboration among multiple DePIN projects in the real world establishes a DePIN ecosystem on-chain, amplifying the overall value. This collaborative approach enables blockchain to serve the real-world economy, fostering new growth within the blockchain space.

In summary

A Modular blockchain (e.g., Rollup) effectively addresses the blockchain trilemma, offering elevated scalability and paving the way for widespread adoption. In the context of DePIN projects, the demand for high-performance and cost-effective blockchain services finds a fitting solution in Modular Blockchain. With the support of Modular Blockchain, DePIN projects stand to gain substantial value.

By Arkreen on January 31, 2024.