StarkNet Sheds a Light on a New Direction for ZK Rollups

user-image
Ponyo
Research Analyst/
Xangle
Nov 02, 2022

Translated by Rhea

StarkNet Sheds a Light on a New Direction for ZK Rollups

We are inches away from the launch of tokens by StarkNet, the most sought-after Zero-Knowledge Rollup (ZKR) solution in the industry. (Please note that the launch was previously scheduled for September but postponed.) StarkNet token, to buy or not to buy? In an effort to help our readers make their investment decisions, this article explores the birth and vision of StarkNet and offers my personal input on the likelihood of its success.

 

*This report was written under the assumption that our general readers are familiar with the basics of ZK rollups and did not reiterate it in the article. For those who wish to brush up on the basic principle and workings of the ZK rollups, we recommend you refer to our previous articles "A Complete Summary of L2, the Ethereum Layer 2 Solutions" (currently available in Korean only) and "Would Optimistic Rollup Remain as a Viable Candidate Even After ZK Rollup Is Fully Developed?"

 

Table of Contents 

1. Introduction: Five Ways to Integrity 

2. Process and Background Technologies Behind the Birth of StarkNet

2.1. StarkEx, the Beginning of ZK-STARK Solution

2.2. CAIRO, a Move from ASIC to CPU 

2.3. SHARP, the Engine for General Computation

3. Cutting-Edge Technologies All Rolled-Up into StarkNet; Now, What Is the Key? 

3.1. Privacy 

3.2. Improved Scalability for Ethereum (L1)

Additional Insight – Taking Different Approaches to Solve the Scalability Issue: Solana With Hardware vs. StarkWare With Software

4. Why StarkNet Is Gaining Traction

4.1. Technological Prowess Proven With StarkEx 

4.2. Finding Its Own Independent Path With Cairo 

4.3. Proving the Proofs Again With Recursive Proving 

4.4. Layer 3 and Fractal Layering

5. Up Next: Building a Decentralized Network

6. Conclusion: Reviewing the Growth Potential of StarkNet

 

1. Introduction: Five Ways to Integrity

Before we get into exploring the growth potential for StarkNet, we need to clarify one of the most important ZKR-related concepts: computational integrity. In the field of computing, there is a concept called “integrity” that signifies a guarantee of data accuracy, consistency, and validity. This term is particularly important in the world of databases and DBMS (Database Management Systems). Without integrity, the data cannot be trusted, and the data that cannot be trusted generally drop in their value. That is why experts have put together the following five systems to secure data integrity. (Please refer to this link for more details.)

1.1. Centralized Systems 

Over the past hundred-and-some years, financial services have been provided by institutions such as banks, Visa, and SWIFT, based on credit as collateral. By handing off complex and difficult duties such as complicated computations, data storage, and system operation to these institutions, the general users are able to enjoy financial activities with much ease. However, it also comes with a critical downside in that the users are asked to put their complete trust in and blindly rely on these institutions. Such a centralized system has been pivotal in the financial market for a long period of time due to its efficiency. However, a trust-based system without sufficient transparency can sometimes be the perfect recipe for disasters, as witnessed in many cases, such as the financial crisis of 2008, the Wells Fargo scandal, and the HSBC incident. 

1.2. Security Hardware: TEE (Trusted Execution Environment)

The second way to secure integrity is using TEE chips, i.e., the hardware approach. The most representative would be the Intel SGX (software guard extensions). The SGX inputs a large number of transactions into TEE, which spits out a signature key. This key proves that the transactions are calculated correctly, and is posted on the blockchain. Since nodes are required to only verify the keys generated by TEE without having to go through a complex calculation process, utilizing TEE can greatly improve the blockchain’s scalability and integrity. However, TEE has a significant downside. It is vulnerable to the risk of thefts and exploits. Every TEE chip has a secret key inside. If anyone could get their hands on the said key, they would be able to manipulate the transactions at will. Of course, extracting this secret key is very difficult and requires huge capital investments, which makes theft or exploitation unlikely. Even so, the possibility cannot be ruled out completely if the benefits reaped from the exploits outweigh the cost.

1.3. Blockchains 

Using blockchain provides the advantages of being able to break away from the conventional centralized system while securing data integrity, transparency, fairness, and even security at the same. However, it also has the disadvantage of considerably lower scalability than the centralized system. This is also the critical reason for the slow speed at which blockchain is moving toward mass adoption. The industry is presented with various solutions aimed at overcoming blockchain's such deficiency. Fraud proofs and validity proofs, to be discussed below, are two examples of such efforts.

1.4. Fraud Proofs

Fraud proofs involve sequencers compressing a large number of transactions taking place on Layer 2 (L2) into batches and posting them on L1 blockchains. It assumes that there are no invalid or wrong transactions and does not include a separate verification process. However, the nodes acting as the watchtower, called verifiers or challengers, monitor L2 in real-time, and generate fraud proofs if they spot any faulty transactions. A closer read of Xangle’s previous articles, "A Complete Summary of L2, the Ethereum Layer 2 Solutions" (currently available in Korean only) and "Would Optimistic Rollup Remain as a Viable Candidate Even After ZK Rollup Is Fully Developed?" may help you better understand this topic in more details.

1.5. Validity Proofs

Validity proofs verify the validity of the transactions through mathematical algorithms, unlike fraud proofs which seek data integrity via an incentive structure. It holds a significant meaning in that it is the only L2 solution that reaches computational integrity with pure mathematics. It can be said that validity proof comes closest to the philosophy of blockchains which encourages people to “Don’t Trust, Verify.” For such reason, Vitalik Buterin has also claimed that L2s based on validity proof will be the most promising in the long run. Validity proofs can be roughly divided into SNARK, PLONK, DARK, and STARK based on the way validity proofs are generated, each with different strengths and weaknesses. StarkNet, to be further discussed in this report, falls under the category of STARK.

Validity Proof, StarkNet, StarkWare
Source: Vitalik Buterin

 

2. Process and Background Technologies Behind the Birth of StarkNet

2.1. StarkEx, the Beginning of ZK-STARK Solution

Mesmerized by validity proof that mathematically reaches computational integrity, the founders of StarkWare Industries invested years into the research and successfully developed the ZK-STARK technology based on such research results. The first L2 solution to utilize ZK-STARK is StarkEx, used by various major projects, including dYdX (scheduled to migrate to Cosmos), ImmutableX, Sorare, rhino.fi (formerly DeversiFi). StarkEx is an application-specific ZKR solution launched by StarkWare in the summer of 2020. It is distinct in its feature that only processes a specific type of transaction within a specific dApp. It could easily be understood as something like ASIC (Application-Specific Integrated Circuit) in semiconductors. For example, StarkEx for dYdX, ImmutableX, and rhino.fi, the projects using StarkEx, are only able to generate validity proof for transactions in regard to NFT minting and trading, perpetual futures contracts, and spot trading, respectively.

As mentioned above, since StarkEx is not a general-purpose solution, it requires the additional step of StarkWare developers designing ZKRs customized to the specific dApps for each project upon request. As evidenced by the various projects using StarkEx, there is no doubt about its superb performance. However, since the process involves StarkWare developers having to design new ZKRs for each and every project, there is a definite limitation in expanding StarkEx into a larger-scale business. Now that they have confirmed on the testbed that is StarkEx that their ZK-STARK runs well, it is time for them to develop an open-source general-purpose ZKR where anyone can freely build their own dApps as they would on L1. 

2.2. Cairo, a Move from ASIC to CPU

On November 29, 2021, StarkWare successfully launched StarkNet, a Turing-complete STARK L2 solution where smart contracts can be published. As we previously likened StarkEx to ASIC, we can say StarkNet is like the CPU. Then, how was StarkWare able to develop a general-purpose ZKR, and how does StarkNet work? The answers to these questions lie with 1) Cairo (CPU Algebraic Intermediate Representation) and 2) SHARP (Shared Prover).

Cairo is a programing language that supports STARK programs with general computation capabilities. You can verify any Cairo-based programs using Cairo, and, naturally, the composability between Cairo-based (or StarkNet-based) dApps is also outstanding. Since the Cairo language takes a similar form as WebAssembly (Wasm), any developer familiar with Wasm would easily be able to get used to Cairo. Moreover, it offers an easy-to-use development environment with an IDE (Integrated Development Environment) where everything from a native compiler converting Cairo language into bytecodes to Cairo-exclusive Virtual Machines (VMs) and debuggers can be used in a single program. Lastly, by using a general-purpose verifier contract, Cairo removed the need to build new verifier contracts for each dApp like before. On top of this, StarkNet also comes with the added advantage that it is composable with Ethereum dApps since it allows for interactions with Ethereum contracts via asynchronous message passing.

CPU AIR, StarkNet
Source: Eli Ben Sasson

2.3. SHARP, the Engine for General Computation

Another important concept in understanding StarkNet, along with Cairo, is SHARP (formerly known as GPS or Generic Proof Service). SHARP stands for shared prover, which can be understood as an engine generating STARK proof which verifies the validity of transactions executed on Cairo programs. SHARP’s most distinct feature is its ability to process various types of transactions occurring on multiple dApps, unlike StarkEx, which can only generate STARK proofs for only a single type of transaction. (Please refer to the figure below.)

StarkWare, StarkNet
Source: StarkWare

When you run a Cairo program, the data is put through the compiling process and sent automatically to SHARP. The figure below shows the result of such a process.

starkware, starkware sharp, 스타크넷
Source: StarkWare

 

3. Cutting-Edge Technologies All Rolled-Up into StarkNet; Now, What Is the Key?

This article has explored the process and background technologies behind the birth of StarkNet so far. What all boils down to are the following key points making StarkNet stand out.

3.1. Privacy 

Blockchains are destined to face the issue of privacy as the cost for seeking to maintain a trustless state by disclosing all the data. Anyone who has ever used Etherscan.io would be well aware that you can see all kinds of information, including which wallet is holding how many assets and NFTs, and to whom it has sent which and how much cryptocurrency. However, StarkWare generates STARK proof via an encryption technology that mathematically proves to have the knowledge of an answer without revealing the answer itself, effectively protecting the privacy of its users. As a result, no information whatsoever about the transactions inputted into Cairo programs will ever be revealed.

3.2. Improved Scalability for Ethereum (L1)

Expectations are high for ZKR as a tool that would enable us to make great strides in improving Ethereum’s scalability and serve a critical role in moving forward as a modular blockchain. ZKR is especially effective in improving the volume processed on L1 and cost savings. The main reason for this is because 1) transactions on ZKR can be processed quickly by a single node called “prover,” unlike L1 requiring the process of consensus among hundreds to thousands of nodes, and 2) only the key data that are required for state transition need to be posted on L1 (similar to how the Lightning Network works). In fact, the latter is also an advantage ZKR has over OR (Optimistic Rollup). While OR is bound to post all the data on L1 to allow challengers to generate fraud proofs, StarkNet can calculate and post most of its data off-chain since the transaction validity is guaranteed via STARK proofs. As a result, the practical estimation of the volume processed by a general-purpose smart contract ZKR would be 2,000 TPS (against Ethereum’s 13 TPS), and the gas fee per transaction would go down 10-to-50-fold to around USD 0.01-0.1. (Please refer to "Would Optimistic Rollup Remain as a Viable Candidate Even After ZK Rollup Is Fully Developed?" for further details and calculation bases.) When StarkEx operates in Validium data-availability mode, its processing volume can reach up to 9,000-10,000 TPS. Moreover, once StarkNet introduces Fractal Layering – to be discussed further later – its processing volume will potentially get tens and hundreds of times faster than before. 

 

Additional Insight – Taking Different Approaches to Solve the Scalability Issue: Solana With Hardware vs. StarkWare With Software

With the recent introduction of Aptos and Sui and the rise of Solana NFTs, the scalability discussion about whether to go with the monolithic or modular blockchain has become the hot topic of the town once again. However, I would like to point out that ZKR L2s and monolithic blockchains have a completely different approach to scalability to the point that there is no merit in comparing the two. They are basically apples and oranges. Still, let us take Solana and StarkNet as examples for our exploration. 

Solana: Solana basically seeks to scale up with hardware. Solana recognizes that there is no faster way to process transactions than with GPU or AVX (Advanced Vector Extensions) via Intel processors, and plans to fully utilize it. Of course, the hefty cost of the hardware may weigh them down. But the incredible bandwidth provided by the powerful hardware balances out the transaction fee, and the end-users are levied with only a small fee. Furthermore, the performance of the network will grow with improvements made to the hardware’s performance in accordance with Moore's Law. Ultimately, Solana considers it the most efficient to use semiconductor chips containing cutting-edge technological capabilities, even if there may be some decentralization risks.

StarkWare: On the other hand, StarkWare seeks to solve the scalability issue through software. StarkWare argues that it is more efficient to have a single powerful computer to process transactions and only post the key data that must be kept a record on the blockchain rather than having many different nodes go through the consensus process and post each transaction separately like any other L1s. Let us explore this further with an example.

  • Let's say that Jack and Jill are making an HFT (High Frequency Trading) with each other. On L1, the nodes would calculate all of the microtransactions made rapidly between the two of them, reach a consensus, and post them one by one. As explained earlier, OR can only compress the transaction data. It is required to post all the data itself on Ethereum as calldata so that challengers may generate fraud proofs. With StarkNet, a single node just needs to 1) process all the transactions occurring in between off-chain, 2) post on-chain only the final transaction details (the result value) required for the state transition, and 3) generate STARK proof to guarantee the validity of the transaction.

To sum up, StarkNet does not need to go through the consensus process among nodes and can process data off-chain, except for the key data required for state transition. It is a definite advantage StarkNet has over L1s or other solutions. Of course, this approach comes with a risk of centralization since it depends on one single computer to process transaction calculations and verify STARK proof. However, StarkWare claims that such risk is offset since verifying STARK proof is an easy task that does not require high-end computers. It is in line with the future where “block production is still centralized but block validation is […] decentralized,” as Vitalik Buterin envisions in his Endgame

 

4. Why StarkNet Is Gaining Traction

StarkWare is stealing the spotlight in the industry even in the midst of a herd of various projects developing different ZKR solutions such as Polygon, Scroll, and zkSync. In fact, it is claiming its position in the upper crust in terms of enterprise value as well, having been valued at USD 8 billion. What could be the reason behind such popularity?

4.1. Technological Prowess Proven With StarkEx

As the first to develop and commercialize the ZK-STARK solution, StarkWare is unrivaled in the field of ZKR. A glance at the incredible performance and stability of dYdX, ImmutableX, and rhino.fi – all using StarkEx – will be enough to demonstrate their technological capabilities. (Please refer to the figure below.)

dApps using StarkEx, StarkNet, ImmutableX, dYdX, rhino.fi

Based on its technological prowess as well as the experience and know-how of running StarkEx, StarkWare is now channeling its efforts toward developing its general-purpose ZKR solution, StarkNet. Only at its alpha version still, StarkNet has not gone under technical audit and does not even have all of its functions enabled. Even so, to our surprise, about 100 projects are already being developed on StarkNet. 

스타크넷 생태계, 스타크넷, starknet

4.2. Finding Its Own Independent Path With Cairo

One of the most distinctive features of StarkWare would be the fact that it uses its own development environment, called Cairo, in an effort to shy away from EVM, even though it is an L2 solution. It is actually quite an eccentric move since other major ZKRs frequently mentioned, such as Polygon, Scroll, and zkSync, are busy developing zkEVM, which mimics the EVM environment, to attract the already well-established Ethereum ecosystem. Considering the advantage that it can easily attract the overwhelming number of Ethereum developers in the Web3 ecosystem, it is a pretty valid strategy. 

Ethereum developers, Ethereum forecast
Source: Electric Capital

Even more peculiar is that StarkWare is sticking to its lonesome path where zkEVM is not its ultimate endgame. It is because StarkWare believes that 1) we should build languages and VMs optimized for ZKR rather than aim to support EVM if we are to achieve high scalability, and that 2) all dApps will run on L2 in about five years anyways, and the significance and influence of EVM will fade as time goes by.

Of course, StarkWare does take the EVM developer ecosystem into consideration to a certain degree, gearing up to provide a service called “Warp,” which transpiles Solidity codes into Cairo codes on StarkNet. However, StarkWare’s focus is on advancing Cairo. Recently, it even launched Cairo 1.0, optimized for STARK technology. Only time will tell if such a move by StarkWare is the winning one. However, I believe there is sufficient potential for Cairo to set itself up as the “gold standard” of Ethereum developers in the future, provided that StarkNet’s performance backs them up. 

4.3. Proving the Proofs Again With Recursive Proving

By now, our readers would be familiar with how StarkNet compresses numerous transactions into a single batch and generates a STARK proof to verify the validity of said batch. Could we take a step further and put the STARK proofs into a single STARK proof again, in the same manner? The StarkWare team claims that it is not only possible but has already been introduced to StarkNet. (Please refer to the figure below.) StarkWare calls it “Recursive Proving.”

재귀적 증명, zk 롤업, 스타크넷, starkware
Source: StarkWare

Such a recursive proving is possible because the time it takes to generate STARK proofs is linearly proportionate to computing the said transactions. And, if the time it takes to generate STARK proof is T, the time it takes to verify the STARK proof is log(T). StarkWare calls this phenomenon, where the time spent for verification is considerably shorter than generating STARK proof or computation, a “logarithmic compression.” In other words, rounding up the STARK proofs for a recursive proving is not done in vain since it takes a relatively shorter time. With the introduction of recursive proving, we can expect various benefits, such as improvements in scalability and cost; and facilitating L3, to be further discussed below.

4.4. Layer 3 and Fractal Layering

StarkWare announced that it would develop into a fractal layering structure where additional layers, such as Layer 3 and Layer 4, are built upon Layer 2, just as the Layer 2 StarkNet was built on Layer 1. It would be much like how the dreams are stacked on top of another dream in the movie “Inception.”

레이어3, 프랙털 레이어링
Source: A scene from the movie, “Inception”

Layer 3 Components

The structure and components of Layer 3 are the same as that of Layer 2. The main components of Layer 2 are as follows:

  • L1 contracts that monitor L2’s state root
  • Verifier contracts that verify the validity of state transition proofs
  • Bridge contracts for the L2 - L1 connection
  • L2 token contracts matched up with the L1 token contracts (such as ERC20 and ERC721)
Layer 2, Layer 3, StarkWare
Source: StarkWare

Layer 3 Ecosystem 

The following mainnets and dApps are planned to be built on Layer 3:

  • General-purpose StarkNet
  • App-specific StarkNet that can improve each dApp’s performance via designated storage structure or DA (data availability) compression
  • StarkEx (including those for dYdX, Immutable, rhino.fi, and Sorare)
  • Privacy StarkNet
Layer 1, Layer 2, Layer 3, Layer 4, L1, L2, L3, L4
Source: StarkWare

Potential Benefits of Layer 3

Then, what is the reason for introducing L3, and what are the benefits we can expect once introduced?

  • Improved Scalability: According to StarkWare, we can expect scalability improvements in multiple folds with recursive proving. For example, if L1 scalability is improved 100-fold by introducing L2, theoretically, we can anticipate a 10,000-fold scalability improvement by introducing L3.
  • Development Environment with More Freedom: DA (data availability) model can be customized, such as opting to use the Validium-based or freely designing the way on-chain data is compressed to fit specific dApps, and adding or removing additional functions and features.
  • Privacy: StarkNet mainnet to protect privacy can be separately published on the public StarkNet.
  • Testbed Secured: L3 provides an environment where new services can be tested freely prior to being published to the public.

 

5. Up Next: Building a Decentralized Network

StarkWare’s long-term vision and goal are to build a completely decentralized network. To this end, StarkNet’s roadmap is divided roughly into three stages. (StarkNet is currently in the Constellation phase.) It aims to attain decentralization of operators (STARK proof generators) by the end of 2022. The first step for this goal is introducing full nodes so that anyone can become StarkNet validators. For this, StarkWare is in cooperation with Erigon, Nethermind, and Equilibrium; and also is parallelly working on the public launch of the operator software.

However, it seems some time is needed until the actual rollout to StarkNet, even if the system development is completed. Before opening up the doors to the network for anyone to join in and become operators or validators, they will need to set up 1) a sophisticated incentive system and 2) countermeasures in regard to the introduction of the governance mechanism, including the leader voting system, and the various situations resulting from it. Considering that the mainnet is still at the alpha version, the practical forecast for the third phase, Universe, would be for next year at the earliest.

On the Road to StarkNet: A Permissionless STARK-Powered L2 ZK-Rollup | by  StarkWare | StarkWare | Medium
Source: StarkWare

6. Conclusion: Reviewing the Growth Potential of StarkNet

With its STARK proof technology developed after years of research, StarkWare successfully launched the StarkEx service, marking a new milestone for L2 solutions. Based on the experiences and know-how from providing StarkEx service to major projects, including dYdX, ImmutableX, and Sorare, StarkWare went on to develop a general-purpose STARK solution, StarkNet, last November.

Although StarkNet release on the mainnet is still in its alpha version, it is at the very center of the industry’s attention, with high anticipation from about 100 projects already on board. StarkWare, the developer of StarkNet, has been recognized to hold USD 8 billion enterprise value, which is higher than Polygon. When we seek to explore the reason why StarkWare is on the top of so many people’s shortlists as their favorite to dominate the L2 ecosystem, the search party always ends up with the conclusion that they have the sufficient technological prowess to meet their expectations. Lately, it has demonstrated its potential strength as the ZKR leader by introducing the recursive proving and fractal layering structure, and is gearing up to launch operator and validator software for network decentralization. In regard to this, Vitalik Buterin has stated that even if it may not be feasible or helpful in terms of scalability improvements to compress data on each layer, if each layer were assigned a different utility and purpose, the L3 structure would be meaningful.  

On a personal note, the most interesting and highly anticipated part of this whole situation is the fact that StarkWare is the only ZKR project seeking to escape away from the Ethereum development environment. While major ZKR solutions such as Polygon, Scroll, and zkSync are putting their neck on the line to get zkEVM, StarkWare is walking down a lone path by building its own development environment with STARK-specific programing language, Cairo. We can see that such a decision is based on their faith in 1) the potential scalability improvement that can be obtained by breaking away from EVM, and 2) that the importance of EVM will fade away as the Ethereum ecosystem forms around L2 in the future. In other words, StarkWare has made a strategic decision based on its long-to-mid-term vision, a direction with which I personally agree. It is difficult to refute that StarkWare is the most anticipated ZKR solution when you consider everything from its technological capabilities, the results it has shown so far, and its future strategies. With an L2 War forecasted as the next step after the successful Merge of Ethereum, it would be interesting to see if StarkNet will come out on top of this chaotic battlefield among L2s to claim the throne.

 

Other Related Research Articles

 

 

주의사항
본 글에 기재된 내용들은 작성자 본인의 의견을 정확하게 반영하고 있으며 외부의 부당한 압력이나 간섭 없이 작성되었음을 확인합니다. 작성된 내용은 작성자 본인의 견해이며, (주)크로스앵글의 공식 입장이나 의견을 대변하지 않습니다. 본 글은 정보 제공을 목적으로 배포되는 자료입니다. 본 글은 투자 자문이나 투자권유에 해당하지 않습니다. 별도로 명시되지 않은 경우, 투자 및 투자전략, 또는 기타 상품이나 서비스 사용에 대한 결정 및 책임은 사용자에게 있으며 투자 목적, 개인적 상황, 재정적 상황을 고려하여 투자 결정은 사용자 본인이 직접 해야 합니다. 보다 자세한 내용은 금융관련 전문가를 통해 확인하십시오. 과거 수익률이나 전망이 반드시 미래의 수익률을 보장하지 않습니다.
본 제작 자료 및 콘텐츠에 대한 저작권은 자사 또는 제휴 파트너에게 있으며, 저작권에 위배되는 편집이나 무단 복제 및 무단 전재, 재배포 시 사전 경고 없이 형사고발 조치됨을 알려드립니다.