Layer 2 Summer has arrived, how does StarkNet achieve value leap?
How does StarkNet achieve value leap in Layer 2 Summer?
The concept of Layer 2 exploded in the summer of 2023. Cryptocurrency giants such as Coinbase and ConsenSys have deployed their native L2 solutions, Base and Linea, which have been launched on the mainnet in the past two months. StarkNet, one of the four L2 kings, also successfully completed the “quantum leap” upgrade in the summer, significantly improving transaction performance and efficiency, smoothly entering a new stage of development.
In this L2 summer, OKLink, the European cloud chain, officially launched the ZK Rollup star project StarkNet blockchain explorer. This is the 30th blockchain explorer launched by OKLink, which officially completes the collection of Optimism, Arbitrum, zkSync, and StarkNet, the four L2 kings. It is reported that OKLink will also launch Polygon-zk, Base, and other ZK-based L2 blockchain explorers in the future, providing more comprehensive and richer on-chain data insights and services for users who are interested in and participate in ZK Rollup and L2 ecosystem construction.
From launching the StarkNet explorer to analyzing account abstraction
OKLink’s achievements in the L2 summer
As one of the highest-valued and largest market share projects in the ZK Rollup field, since its launch in November 2021, the StarkNet ecosystem has encompassed many scenarios. Many wallets, DeFi, GameFi, and NFT projects are built on its blockchain network. The StarkNet ecosystem is expanding rapidly and becoming more vibrant, and is considered to have the potential to become one of the leading players in the L2 field.
Compared with other scalability projects, StarkNet is different not only in using zk-STARK technology as the proof system (which will be introduced later), but also in terms of data availability and account system design.
- A comprehensive analysis of the potential of TG Bot, who will be th...
- NFT reaches a freezing point, what changes are the 7 projects of Me...
- After Friend.tech, how will Base ecosystem continue?
One important advantage of ZK Rollup compared to Optimistic Rollup is its more efficient data availability. In fact, it is very important to verify data on the L1 mainnet: only when data is on-chain can every transaction be queried on the blockchain explorer, ensuring that the transactions are traceable and verifiable, thereby enhancing the security of the blockchain network. In the Plasma and previous state channel scalability solutions, both data and computation are completely offloaded to the L2 network. 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. Therefore, the data availability of Ethereum relies heavily on the protection of L2 data.
Currently, StarkNet 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 consumed by the mainnet is used for data storage rather than verification proofs, this solution is more expensive;
2. Validium solution: The Data Availability Committee (DAC) ensures the security of the ledger, and only the hash value is stored on the chain. This mode reduces the amount of data stored on the chain, greatly reducing costs, but sacrifices decentralization and is only suitable for data availability of non-important transactions.
3. Volition Solution: Users can choose the DA mode (Rollup or Validium) for each transaction they initiate, making it more flexible.
With higher data availability, users can conveniently use tools like the OKLink StarkNet browser to query transaction details on the chain.
In addition, the latest OKLink StarkNet browser provides abundant block and address information, helping users quickly understand the real-time status of the StarkNet network.
In terms of the account system, StarkNet is one of the few blockchain infrastructures that support account abstraction. Currently, account abstraction can be achieved on Ethereum and StarkNet, but the implementation methods are different: Ethereum adds account abstraction through ERC-4337 without ignoring the functionality of external accounts (EOA), while StarkNet directly treats account abstraction as the core, eliminating the potential impact of EOA and entering a world where every account is a smart account.
This mode requires all infrastructure of StarkNet, including wallets and block explorers, to be designed and built for account abstraction: this is unique among all L1 and L2 chains. However, because it only supports account abstraction, it also brings difficulties for StarkNet users to interact with other blockchains, as other blockchains may not yet support account abstraction at this stage, and users mostly interact with the blockchain and hold assets by linking EOAs with account assets.
OKLink’s browser is currently one of the few choices that can provide account abstraction resolution and the only one that supports querying user operations in a visual interface. Through the OKLink multi-chain browser, users can query effective information about account abstraction like using Google, understand transaction and contract execution information on the blockchain, including transaction fees, relevant information about contract execution, and logs, in order to better understand the execution of smart contracts and more.
Whether it is ordinary users who actively participate in StarkNet 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 transactions on the chain, and achieve precise account abstraction cross-chain interaction and data query through the multi-chain aggregation function and multi-dimensional statistical data, which cannot be compared to official browsers.
The StarkNet browser is the 30th blockchain browser launched by OKLink and the second ZK Rollup browser after 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.
Some may ask: why does OKLink pay so much attention to the development of ZK Rollup and the L2 track? How has ZK technology evolved to its current level? Let’s go back to the origin and explore the reasons behind the attention to ZK Rollup.
Why should we pay attention to ZK Rollup?
As decentralized applications (DApps) deployed on Ethereum increase, on-chain interactions become more frequent. Congestion on the network and high gas fees make scalability imperative. There are two common ways to scale: on-chain scaling, which involves modifying the blockchain itself, and layer 2 (L2) scaling, which offloads computation and transaction execution off-chain and relies on the main chain for transaction validation and security, commonly known as L2 solutions.
Compared to on-chain scaling, L2 scaling significantly reduces the limitations of the mainnet without changing the mainnet consensus. State channels, Plasma, and sidechains have been proposed as L2 scaling solutions, but developers are now shifting towards L2 scaling roadmaps centered around Rollup.
Rollup refers to outsourcing transaction execution to L2, compressing and bundling multiple transactions together, and sending them, along with the state root, to the L1 network for validation and confirmation. Rollup improves performance by validating multiple transactions at once and ensures both on-chain data availability and mainnet security by synchronizing transaction data and network state with L1.
Still abstract? Let’s use an analogy:
Xiao Ou got a shopping card at a mall near the company and topped it up with 2000 yuan. Every time he makes a purchase, he only needs to swipe the shopping card instead of using a bank card. After a month, Xiao Ou no longer plans to shop at this mall and decides to cash out the remaining balance of 200 yuan to his bank account.
During this month of shopping, 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 bank network, and Rollup can similarly reduce the transaction pressure on the mainnet.
Before the proposal of Rollup, scaling solutions like Plasma did not send the data generated on L2 to the main chain for storage and validation. They only submitted a final state result. This resulted in unverifiable results, similar to the mall providing only the final balance without giving you the transaction details.
Rollup, on the other hand, submits data to the main chain, but it compresses the data to the maximum extent possible using clever encoding techniques. Based on the characteristics of Rollup, it appropriately deletes and reduces some data, ensuring that the final submitted data is verifiable by everyone.
Depending on the method of synchronizing transaction data to L1, Rollup is usually divided into two types: ZK Rollup and OP Rollup. The key to ZK Rollup lies in “doubting everything,” which contrasts with the optimistic assumption that “everyone behaves well” in OP Rollup.
Going back to the example above, the difference between ZK Rollup and OP Rollup is like this:
If Xiao Ou withdraws the balance without checking the details and only realizes something is wrong in the future when he decides to check, that is similar to OP Rollup. But if Xiao Ou requests a transaction detail file from the mall to ensure the accuracy of the balance when withdrawing, that is similar to ZK Rollup.
Although OP Rollup is currently in a leading position in terms of transaction volume and market share due to its lower technical implementation difficulty and higher compatibility with Ethereum, there are still concerns about the withdrawal time and security of the OP Rollup solution due to the use of fraud proofs. The cost optimization of OP Rollup is slightly inferior to ZK Rollup. On the other hand, the weaknesses of ZK Rollup are mainly technical issues. With the involvement of a large number of excellent developers in related research, ZK Rollup may become a better scaling option in the future, thanks to its higher security, faster verification efficiency, and better data availability as outlined in the theory.
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, mainstream ZK technologies on the market can be categorized into three types: zk-SNARKs, zk-STARKs, and Bulletproofs. Among them, both zk-SNARKs and zk-STARKs are applied in ZK Rollup scaling solutions (Note: Bulletproofs have been used in the design of privacy coins).
zk-SNARKs technology was proposed by Professor Alessandro Chiesa and others from the University of California, Berkeley in 2012 in the paper “From extractable collision resistance to succinct non-interactive arguments of knowledge, and back again”. It is one of the earliest and most popular ZK solutions, and currently the most widely used ZK technology in the blockchain field. SNARKs is a non-interactive proof, and 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 based on zk-SNARKs technology, which provides a low-cost and trustless scaling protocol for scalable and low-cost payments on Ethereum.
However, zk-SNARKs has some issues. 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 relies on trusted setups during the key generation phase, which may introduce centralization risks. Therefore, in 2018, Eli-Ben Sasson, co-founder of StarkWare, proposed a new ZK technology solution 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, which addresses the weakness of SNARKs relying on trusted setups. It can complete blockchain verification without relying on any trusted setups, thereby reducing the complexity of launching the network and eliminating any collusion risks. At the same time, zk-STARKs uses a more streamlined encryption method, avoiding the need for elliptic curves, pairings, and knowledge of exponential assumptions. Instead, it relies on hash functions and information theory, theoretically providing resistance against quantum attacks.
StarkNet, one of the four L2 kings, currently adopts the SATRK validity proof to solve the scalability problem of Ethereum.
In addition to the different underlying technologies, the current ZK Rollup projects all generate ZKP (Zero-Knowledge Proof) of transaction data and send it to the main chain for verification. The direct differences between projects are more reflected in their compatibility with the EVM (Ethereum Virtual Machine).
Based on the level of transformation and EVM compatibility, Vitalik classifies the current ZK Rollups into the following levels:
Generally speaking, the better the compatibility with Ethereum/EVM, the less design refactoring work is required, but the more computational work is required for generating ZK verification in subsequent tasks. However, as the two leading projects in the current ZK Rollup track, both StarkNet and zkSync belong to ZK Rollups that are equivalent to high-level programming languages.
Although StarkNet itself is not compatible with EVM, it can be made compatible with Ethereum through other means, such as Kakarot (a zkEVM written in Cairo, which is a bytecode-equivalent EVM), thus reducing the development difficulty.
Summary
ZK technology may be one of the most underestimated technologies of our time. Unlike the extensive news coverage related to artificial intelligence and big data technologies, ZK technology has received little attention. However, despite this, it is still a great innovation because it provides valuable privacy protection in the era of personal information being everywhere in big data. 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 and enable more Web3 innovations to be widely applied in complex business environments.