OKLink: Layer 2 is here, how does StarkNet achieve value transfer?

This article is approximately 2199 words,and reading the entire article takes about 3 minutes
ZK technology may be one of the most underestimated technologies in our era, as it brings valuable privacy protection in the age of big data where personal information has nowhere to hide. As an important application direction of ZK technology in the field of blockchain, ZK Rollup also holds the pot

Original author: Jason Jiang

The concept of Layer 2 exploded in the summer of 2023. Cryptocurrency giants like Coinbase and ConsenSys have deployed their native L2 solutions, Base and Linea, which have successfully gone live on the mainnet over the past two months. StarkNet, known as one of the four L2 giants, also successfully completed the "quantum leap" upgrade in the summer, greatly improving transaction performance and efficiency, smoothly entering a new stage of development.

In this L2 summer, OKLink, the EuroChain, officially launched the StarkNet blockchain browser for the ZK Rollup star project. This is the 30th blockchain browser launched by OKLink, and OKLink has officially collected Optimism, Arbitrum, zkSync, and StarkNet, the four L2 giants. It is reported that OKLink will also launch ZK-based L2 blockchain browsers such as Polygon-zk and Base in the future, providing more comprehensive and rich on-chain data insights and services for users who are interested in and participating in ZK Rollup and L2 ecosystem construction.

OKLink: Layer 2 is here, how does StarkNet achieve value transfer?

What did OKLink do in L2 summer, from launching the StarkNet browser to account abstraction analysis?

As one of the highest valued and most market-dominant projects in the ZK Rollup field, since its mainnet launch in November 2021, the StarkNet ecosystem has encompassed a variety of use cases, with numerous wallets, DeFi, GameFi, and NFT projects built on its blockchain network. The StarkNet ecosystem is expanding rapidly and becoming more vibrant, and is believed to have the potential to become one of the leading players in the L2 field.

Compared to other scaling projects, in addition to using zk-STARK technology as the proof system (which will be discussed below), StarkNet also differs in terms of data availability and account system design.

ZK Rollup itself has an important advantage over Optimistic Rollup, which is more efficient data availability. In fact, it is crucial for data to be linked to the L1 mainnet for verification: only by linking data can each transaction be queried on the blockchain explorer, ensuring traceability and verification of transactions, thereby enhancing the security of the blockchain network. In Plasma and previous state channel scaling solutions, data and computation are completely placed in the L2 network, and when the L2 network interacts with Ethereum, all transaction data from L2 is not included. This means that if Ethereum is disconnected from the L2 network, it cannot recover the previous state changes, so Ethereum's data availability is highly dependent on data protection on L2.

Starknet currently provides three data availability modes:

1. Rollup solution: The ledger is directly published on the blockchain to ensure on-chain data availability. However, because most of the gas cost consumed by the mainnet is used for data storage, not verification proofs, this solution is more expensive;

2. Validium solution: The data availability committee (DAC) ensures ledger security, and only the hash value is saved on the chain. This mode reduces the amount of data stored on the chain and greatly reduces costs, but sacrifices decentralization and is only suitable for data availability of non-critical transactions.

3. Volition solution: Users can choose the DA mode (Rollup or Validium) for each transaction they initiate, providing more flexibility.

With more efficient data availability, users can easily use tools such as OKLink StarkNet browser to query on-chain transaction details.

OKLink: Layer 2 is here, how does StarkNet achieve value transfer?

In addition, OKLink's newly launched Starknet browser provides rich block and address information to help users quickly understand the real-time status of the StarkNet network.

OKLink: Layer 2 is here, how does StarkNet achieve value transfer?

In terms of the account system, Starknet is one of the few blockchain infrastructures that support account abstraction at this stage. Currently, account abstraction can be achieved on both Ethereum and Starknet, but the implementation methods are different: Ethereum adds account abstraction through ERC-4337 without ignoring the functionality of externally owned accounts (EOA), while Starknet directly incorporates account abstraction as its core, avoiding the potential impact of EOA and entering a world where every account is a smart account.

This model requires that all infrastructure of Starknet, including wallets and block explorers, be designed and built for account abstraction: this is unique among all L1 and L2 chains. However, due to only supporting account abstraction, Starknet users may face difficulties in interacting with other blockchains, as other blockchains may not yet support account abstraction and rely more on linking EOA with account assets to interact with the blockchain and hold assets.

The OKLink browser of OKLink is currently one of the few choices that can provide account abstraction resolution, and it is the only visual window that supports querying user actions. Through the OKLink multi-chain browser, users can query valid information of account abstraction, understand relevant information about transactions and contract executions on the blockchain, including transaction fees, information related to contract executions and logs, in order to better understand the execution of smart contracts, and so on, similar to using Google for searching.

Whether they are ordinary users truly participating in StarkNet's on-chain interactions or speculators who hope to participate in airdrop activities in the future, they can now use the Starknet browser provided by OKLink to query the progress of on-chain transactions and achieve accurate account abstraction cross-chain interactions and data queries through the multi-chain aggregation function and multidimensional statistical data, which cannot be compared to the official browser.

OKLink: Layer 2 is here, how does StarkNet achieve value transfer?

The Starknet browser is the 30th blockchain browser launched by OKLink. It is also the second ZK Rollup browser following zkSync. According to the product manager of OKLink, OKLink will continue to develop ZK Rollup technology innovation and ecological layout, and will continue to launch blockchain browsers for well-known ZK Rollup projects such as Polygon-zk and Base in the future.

Someone might ask: Why does OKLink pay so much attention to ZK Rollup and the development of Layer 2? How has ZK technology evolved to its current level? Let's go back to the origin and explore the reasons behind the attention towards ZK Rollup.

Why should we pay attention to ZK Rollup?

With the increasing number of decentralized applications (DApps) deployed on Ethereum, on-chain interaction activities have become more frequent. The congested network and high gas fees make scalability necessary. There are two common scalability methods: one is on-chain scalability, which involves making modifications to the blockchain itself; the other is layer 2 scalability, which involves off-chain computation and transaction execution while the main chain verifies transaction validity and ensures security. Rollup is a core concept in the L2 scalability roadmap that developers are currently focusing on.

Compared to on-chain scalability, L2 scalability significantly reduces the limitations of the main network without changing the main network consensus. State channels, Plasma, side chains, and other technologies have been proposed as L2 scalability solutions, but developers are now shifting towards a Rollup-based L2 scalability approach.

Rollup refers to outsourcing transaction execution to L2, compressing multiple transaction data together, and sending them along with the state root to the L1 network for validation and confirmation. Rollup improves scalability by verifying multiple transactions at once, and ensures the availability of on-chain data while achieving security guarantees from the main chain by synchronizing transaction data and network states with L1.

This may still be abstract, so let's use a vivid example for comparison:

Xiao Ou obtained a shopping card from a mall near the company and topped it up with 2000 yuan. Every time he goes shopping, he only needs to swipe the shopping card without using his bank card for payment. After a month, Xiao Ou decided not to continue shopping at this mall and requested to cancel the shopping card. There was still a balance of 200 yuan left, so he withdrew the balance to his own bank card.

During this month of consumption, Xiao Ou's bank card only interacted with the mall account twice, and all transactions were completed within the mall's internal system. This method significantly reduces the settlement pressure on the banking network. Similarly, Rollup can reduce the transaction pressure on the main network.

Before Rollup was proposed, scalability solutions such as Plasma didn't send the data from L2 to the main chain for storage and verification. They only submitted a final state result. This resulted in unverifiable results, similar to the mall only providing you with the final balance but not the transaction details.

Rollup will submit the data to the main chain, but it will compress the data to the maximum extent through clever encoding methods, and appropriately delete and reduce some data based on the characteristics of Rollup itself, ensuring that the data submitted in the end can be verified by everyone.

Based on the different ways of synchronizing transaction data to L1, Rollup is usually divided into two schemes: ZK Rollup and OP Rollup. The key to ZK Rollup lies in "questioning everything", which is in contrast to the optimistic assumption of "everyone behaves honestly" in OP Rollup.

Returning to the example above, the difference between ZK Rollup and OP Rollup is like this:

If Xiao Ou does not check the details after extracting the balance, but waits until some day in the future to realize that something is wrong and then checks, it is similar to OP Rollup; but if Xiao Ou requires the mall to provide a transaction details file to ensure the accuracy of the balance when extracting the balance, it is similar to ZK Rollup.

Although OP Rollup is currently leading in terms of transaction volume and market share due to its lower technical implementation difficulty and higher compatibility with Ethereum, its withdrawal time and security in the OP Rollup scheme are currently debatable, and its cost optimization is slightly inferior to ZK Rollup. Most of the weaknesses of ZK Rollup are technical problems, but with the involvement of a large number of excellent developers in related research, relying on higher security, faster verification efficiency, and better data availability in theory, ZK Rollup may become a better scaling option in the future.

OKLink: Layer 2 is here, how does StarkNet achieve value transfer?

 Evolution of ZK technology: from zk-SNARKs to zk-STARKs

ZK Rollup is an L2 solution based on ZK technology, and the main difference between projects lies in the different ZK technologies used. Currently, the mainstream ZK technologies in the market can be divided into three categories: zk-SNARKs, zk-STARKs, and Bulletproofs. Both zk-SNARKs and zk-STARKs are applied in the ZK Rollup scalability solution (Note: Bulletproofs have been used in the design of privacy coins).

zk-SNARKs technology was proposed by Professor Alessandro Chiesa of the University of California, Berkeley and others in the paper "From extractable collision resistance to succinct non-interactive arguments of knowledge, and back again" in 2012. It is one of the earliest and most popular ZK solutions, and it is currently the most widely used ZK technology in the field of blockchain. SNARKs is a non-interactive proof, where the verifier only needs to use the proof generated by the prover to obtain the verification result. Well-known ZK Rollup projects like zkSync are built on zk-SNARKs technology, providing low-cost and trustless scalability protocols for scalable and low-cost payments on Ethereum.

However, there are some issues with ZK-SNARKs. For example, this technology uses elliptic curve cryptography (ECDSA) for encryption. Although the ECDSA algorithm is currently secure, the development of quantum computers may break its security model. In addition, zk-SNARKs rely on trusted setups during the key generation phase, which may introduce centralization risks. Therefore, in 2018, Eli-Ben Sasson, the co-founder of StarkWare, proposed a new ZK technology called zk-STARKs in the paper "Scalable, transparent, and post-quantum secure computational integrity".

zk-STARKs is a technical evolution of the zk-SNARKs algorithm, addressing the weakness of SNARKs relying on trusted setups. It can achieve blockchain verification without relying on any trusted setups, reducing the complexity of bootstrapping the network and eliminating any collusion risks. At the same time, zk-STARKs use more streamlined encryption methods, avoiding the need for elliptic curves, pairings, and exponential assumptions, and instead relying on hashing and information theory, which theoretically can withstand quantum attacks.

Starknet, one of the "Four Kings of Layer 2," currently uses the SATRK validity proof to solve the scalability problem of Ethereum.

OKLink: Layer 2 is here, how does StarkNet achieve value transfer?

Aside from the different underlying technologies, the current ZK Rollup projects all generate ZKPs (Zero-Knowledge Proofs) from transaction data and send them to the main chain for verification. The direct differences between projects are more reflected in compatibility with the EVM (Ethereum Virtual Machine).

Based on the degree of modification and EVM compatibility, Vitalik categorizes the current ZK Rollups into the following levels:

OKLink: Layer 2 is here, how does StarkNet achieve value transfer?

Generally speaking, the better the compatibility with Ethereum/EVM, the smaller the required design and refactoring effort, but the larger the workload for generating ZK verification calculations in subsequent work. However, as the two leading projects in the current ZK Rollup track, both StarkNet and zkSync are currently only equivalent to high-level programming languages in terms of ZK Rollups. Although StarkNet itself is not compatible with EVM, it can be made compatible with Ethereum through other means such as Kakarot (Kakarot is a zkEVM written in Cairo, which is a byte-code equivalent zkEVM), thus reducing the development difficulty.

Summary

ZK technology may be one of the most underestimated technologies of our time. Unlike the overwhelming publicity related to artificial intelligence and big data technologies, ZK technology has received little attention. However, despite this, this technology is still a great innovation because it provides valuable privacy protection in the era of big data where personal information has nowhere to hide. As an important application direction of ZK technology in the blockchain field, ZK Rollup is expected to solve the biggest challenge of limiting the large-scale application of blockchain, allowing more Web3 innovations to be widely applied in complex real-world business environments.

Original article, author:欧科云链OKLink。Reprint/Content Collaboration/For Reporting, Please Contact report@odaily.email;Illegal reprinting must be punished by law.

ODAILY reminds readers to establish correct monetary and investment concepts, rationally view blockchain, and effectively improve risk awareness; We can actively report and report any illegal or criminal clues discovered to relevant departments.

Recommended Reading
Editor’s Picks