Starknet Comprehensive Report

Intermediate5/29/2024, 12:40:32 AM
In the past two years, the development speed of ZK has far exceeded expectations. The two leading ZK Rollups, ZkSync, and Starknet, have made significant progress in performance and costs. This article explores Starknet's technical advantages in a straightforward manner and simplifies the explanation of the ZK proof process.

Forward the Original Title ‘Starknet 万字研报:蓄势待发,长期主义者的跬步千里’

Compared to other noisy narratives in the web3 world, the ZK track has long represented a lengthy, monotonous but profoundly significant foundational infrastructure. It’s akin to a difficult pilgrimage where insiders toil arduously while outsiders remain in the dark. However, it is gratifying that the development speed of ZK has far exceeded expectations in the past two years. The two leading ZK Rollups, ZkSync and Starknet, have made significant progress in performance and costs.

Following the Ethereum EIP-4844 upgrade, ZK Rollup is also strengthening its position in competition with OP Rollup. Even more exciting is the collaboration between former competitors StarkWare and Polygon Labs, which upgraded the STARK protocol—long representing the forefront of ZK prowess—and officially launched Circle STARK, bringing another leap in ZK proof capabilities.

If you have read last year’s article (“L2 Summer is Coming? Master StarkNet Technical Principles and Ecosystem in One Article“) and wish to delve deeper into the intriguing ZK proof process behind Starknet but are deterred by intimidating mathematical formulas and complex technical theories, then follow this article to explore some key issues about ZK. We will try to avoid the vexing math parts and, on this basis, discuss the technical advantages of Starknet, especially the recent major breakthroughs.

01 Starting with ZK first

ZK is both a label and an abbreviation for Zero Knowledge Proof Systems. As a prominent topic, ZK proofs are like a mysterious legend—they allow proving a fact without revealing any additional information. How can such an idealistic goal be achieved? For this, we need to draw an analogy familiar to any student.

Typically, if a student wants to prove their academic excellence, the simplest way is to present their transcript. Assuming the exam system is effective and fair, a transcript showing an overall grade of A can vouch for the student’s academic level without revealing any specific academic details.

The process of ZK proofs is quite similar. In simple terms, its core components are two parts: the Prover and the Verifier. The Prover is like the school’s exam system, following a fixed process to generate a transcript as proof of the student’s academic ability. This proof is then presented to the Verifier, which could be a parent or company, to validate the student’s competence based on the transcript.

Here we see that the most challenging part of the proof process is the Prover generating the proof. In a ZK proof, this process can be divided into two parts: arithmeticization and polynomial commitment.

1.1 Arithmeticization

  1. Arithmeticization is to convert complex proof problems into algebraic problems. Specifically, it is to convert the witness (Witness) we want to prove into a set of polynomial constraints (Polynomial Constrains). This is similar to how we convert students’ academic abilities through examinations into a set of scores.
  2. Witness: Witness is what we usually call the raw data of off-chain calculations, including transaction data, account status data, intermediate calculation results, etc. It is private data that we use to prove the validity of transactions but do not want to make it public.
  3. Polynomial Constrains: Polynomial constraints. What needs to be done in the ZK proof process is to transform complex problems into mathematical problems. The most critical part of the mathematical proof method is to find a polynomial and finally prove that you have indeed found it. Polynomial constraints refer to the conditions that the polynomial needs to satisfy.

1.2 Polynomial Commitment

Polynomial commitment, in specific mathematical proofs, involves proving that you have found a polynomial that satisfies all the constraints generated in the arithmeticization step. If the polynomial is valid, then the mathematical proof is successful, meaning the issue we want to prove is established. This process is similar to arriving at a weighted average score or transcript that guarantees all the student’s grades are A’s, thereby proving the student’s academic excellence.

You might question this analogy, as in real life, a transcript often fails to accurately reflect a person’s academic ability due to numerous flaws and uncontrollable factors in human exam systems. However, in the ZK world, with the help of unequivocal mathematics and transparent, open procedures, this ideal is being realized, just as smart contracts and blockchain ensure fairness and transparency.

02 SNARK vs STARK

SNARK and STARK are currently the two most commonly used ZK proof protocols, and they are respectively the underlying protocols used by ZkSync and Starknet. Due to their similar names and fields, they are often compared. However, before comparing them, let’s introduce two figures to better understand the ZK proof systems built by these two protocols from a historical perspective.

2.1 Groth and SNARK

Jens Groth is a professor in the UCL Computer Science Department (now an honorary professor) and currently serves as the Chief Scientist at Nexus, focusing on zkVM. Starting from 2009, he has been prolific, publishing numerous papers on zero-knowledge-related topics. In the ZK field, we often hear about papers like Groth09, Groth10, etc., which are named after him and the publication year.

Two of his most famous works are:

[Groth10] “Short Pairing-based Non-interactive Zero-Knowledge Arguments,” which proposed a complete non-interactive proof scheme and is considered a theoretical precursor to SNARK.

[Groth16] “On the Size of Pairing-based Non-interactive Arguments,” which, building on Groth10, streamlined proof sizes and improved verification efficiency, is still widely used today.

It is on the foundation of Groth’s research that SNARK has been developed and refined. SNARK, which stands for Succinct Non-interactive Argument of Knowledge, is a concise zero-knowledge proof system known for its strong usability, enabling rapid adoption of ZK in the cryptocurrency field.

2.2 Eli Ben-Sasson with STARK

It’s worth mentioning that the first protocol to apply SNARK to cryptocurrency, Zerocash, was co-founded by Eli Ben-Sasson, who later co-founded StarkWare and was one of the inventors of STARK. Moreover, in the early years, Eli Ben-Sasson actively promoted the implementation of the SNARK protocol and published papers in 2013 and 2014, proposing and optimizing the construction of SNARK to enhance its practicality and efficiency, helping SNARK gain widespread attention and application.

However, perhaps due to a deep understanding of the challenges faced by SNARK, in 2018, Eli Ben-Sasson and others published “[BBHR18] Scalable, transparent, and post-quantum secure computational integrity,” formally proposing the STARK proof system and providing a more comprehensive solution for ZK Rollup.

STARK, which stands for Scalable Transparent Argument of Knowledge, has advantages in large-scale proofs and ensures transparency throughout the proof process without relying on trusted third parties. It also provides security against quantum attacks.

(Note: It needs to be clarified that while epic stories of heroes are always captivating, no achievement is accomplished by a single individual alone. On the contrary, whether it’s SNARK or STARK, they are the result of the collective efforts of numerous scientists. Highlighting individual figures is simply to add vividness to this critical development history of ZK from one perspective. Even a genius like Groth relied on the research contributions of others such as Aniket Kate, Gregory Zaverucha, and Ian Goldberg to realize his papers, and the authors who proposed STARK are all highly skilled individuals whom we can delve into further in the future.)

2.3 SNARK vs STARK

So, what prompted Eli Ben-Sasson to make the tough decision to start anew? What challenges did SNARK face?

2.3.1 Transparency

Before answering the previous question, we might need to address another question: What is the most expensive thing in the field of cryptography? Satoshi Nakamoto’s answer is trust.

SNARK happens to stumble upon this landmine. When SNARK performs polynomial commitments, it adopts the KZG method, which requires a Trusted Setup to generate a Common Reference String (CRS) that is then used to generate keys for the proof and verification process.

Going back to our example of a transcript, the reason why parents or companies can judge a student’s academic excellence based on an A average is because we collectively agree on the ranking of academic abilities from high to low as A, B, C, D. Only under this standard does an A grade hold meaning.

But what if the school’s grading system is compromised, and the ranking of academic abilities becomes C, A, B, D? Students who originally received a C grade might be mistakenly considered top performers and given priority. This leads to misjudgments.

From this, we can see how crucial the security of this collectively agreed-upon standard is. Yet, in the cryptographic world governed by the law of the jungle, this Trusted Setup becomes a huge vulnerability.

Knowing this, why does SNARK persist in using the KZG method? It’s because the proofs obtained using KZG are too small in size. Remember what the “S” in SNARK stands for? Succinct! The temptation of small proof sizes was too great, especially before the Ethereum Constantinople upgrade, where smaller proof sizes brought better practicality and efficiency to SNARK and were adopted by more projects for a long time. So, it’s all about trade-offs.

Now, regarding STARK, to tackle the Non-Trusted aspect, STARK adopts the FRI (Fast Reed-Solomon Interactive Oracle Proofs) method for polynomial commitments.

Specifically, the FRI method encodes polynomials using Reed-Solomon encoding, stores them in the form of a Merkle tree, and facilitates multi-round interactions between validators and provers through an Oracle to achieve verifiability and transparency (the “T” in STARK).

(Note: It’s worth noting that here the term “Oracle” doesn’t refer to the centralized or semi-centralized oracles commonly seen in the web3 world but is a decentralized virtual entity simulated locally by validators and provers based on protocol rules. It’s a form of interactive proof mechanism.)

To continue the analogy with the example of a transcript, we can view the polynomial commitment process in the STARK system as a grading system built on the blockchain, ensuring fairness and transparency of the entire system through blockchain technology.

Additionally, in STARK proofs, validators and provers can simulate the interaction process using a common Random Beacon and ultimately package it into a complete proof, achieving non-interactive proofs for better usability and asynchronicity.

2.3.2 Scalability

STARK’s advancements also lie in its universality and flexibility in handling large-scale complex computational problems, as well as its ability to decrease the average proof size as the proof scale increases, forming a network effect, as represented by the “S” in Scalable.

Unlike SNARK, which employs circuit computation methods represented by R1CS for arithmeticization and requires circuit redesign for different problems, STARK uses the AIR (Algebraic Intermediate Representation) method. This is a universal machine computation method that links different states through state transition equations, allowing almost any computational problem to be abstracted into a set of polynomial constraints.

Moreover, STARK’s use of the FRI method in generating polynomial proofs employs a recursive structure to gradually decrease the degree of polynomials. This results in proof size growth far slower than problem scale growth (logarithmic level), providing significant advantages in handling large-scale computations.

Returning to the example of grades and exams, if we liken the arithmeticization process to an exam, then SNARK and STARK respectively resemble traditional paper-based exams and computer-based exams.

In the short term or for a small school, traditional paper-based exams are cheaper and quicker, while computer-based exams require preparation in software and hardware, and seem costly and cumbersome.

However, for globally scaled exam institutions, a computer can conduct exams of different types and levels, eliminating the need for teachers to create questions for each exam, and saving significant manpower. In the long term, as the number of exams accumulates, the investment costs in software and hardware will be greatly diluted.

2.3.3 Resistance to Quantum Attacks

In addition to the achievements represented by “S” and “T”, STARK also achieves resistance against quantum attacks through the use of quantum-resistant hash functions (such as Rescue hash, generally considered post-quantum secure, while traditional SHA-256 hash functions are thought to potentially exhibit weaknesses in quantum computing), and security algebraic problems (complex algebraic problems that the prover needs to prove, currently believed to be difficult to solve even on quantum computers).

03nCircle STARK Doesn’t Stop There

As we’ve discussed, it’s evident that SNARK is an indispensable short-term solution due to its rapid feasibility. However, as time progresses and transaction volumes increase, along with the explosion of computational complexity, people are becoming increasingly aware that trust is actually the most expensive luxury in the field of cryptography. This realization underscores the superiority of STARK over time.

This point is gradually becoming apparent in the industry as well. The head applications using SNARKs, such as ZkSync’s Boojum version, have already begun exploring the gradual transition from SNARK to STARK. Additionally, Polygon, known for its agility, has also shifted towards STARK. This year’s upgraded proof system, Plonky3, is based on the latest joint research by Polygon Labs and StarkWare, known as Circle STARK.

Circle STARK represents a new generation of ZK proof protocols based on updated STARKs. It cleverly introduces circular curves and successfully integrates the small prime field M31 into the proof system, significantly improving proof efficiency.

In ZK proof systems, prime fields play a crucial role. It’s through operations on prime fields that proofs are made possible. The choice of prime field represents a balance between efficiency and security. Smaller prime fields require less computation and thus offer higher efficiency. On the other hand, larger prime fields typically signify higher levels of security, which is why both STARK and SNARK have historically used large prime fields.

The innovation of Circle STARK lies in its combination of circular curves and the use of the small prime field M31. This not only enhances proof efficiency but also ensures post-quantum security.

StarkWare has recently released and open-sourced the next-generation prover based on Circle STARK, called Stwo. It’s expected that Stwo’s proof efficiency will be 100 times that of the first-generation prover, Stone. Stwo will be fully compatible with the advanced Cario, and the current Starknet Prover (SHARP Prover) based on the Stone Prover will also transition to using Stwo. This means developers and users in the Starknet ecosystem will directly benefit from the performance boost brought by Stwo without any action required.

In addition to speeding up proof generation, Brendan Farmer, co-founder of Polygon, mentioned that the application of Circle STARK will ultimately significantly reduce costs and expand to more application proofs. Eli Ben-Sasson is also optimistic, stating that the launch of Circle STARK can be seen as a significant milestone, with the most efficient proof systems set to emerge in the near future, accompanied by continued breakthroughs and improvements.

04 Starknet Continues To Strengthen Its Efforts, Enhancing Performance

Through the above analysis, we can clearly see that the STARK proof system and its latest upgraded version, Circle STARK, are deserving frontrunners and the stars of tomorrow. As the flagship product of StarkWare, Starknet has a boundless future on the road of ZK Rollup.

However, perhaps due to the twists and turns of progress, Starknet has endured controversy for a long time. The reasons are none other than user experience and costs.

Fortunately, through the continuous efforts of StarkWare, these issues are gradually becoming history. Below, we will review some recent important upgrades of Starknet and further actions planned according to the roadmap.

4.1 V0.12

Starknet Alpha v0.12.0, codenamed Quantum Leap, went live on the mainnet in July 2023. The focus of this optimization was to improve network performance and enhance user experience.

Throughput and latency are generally considered as standards for measuring network performance. By optimizing the Rustification of the sorter and upgrading the Cario language, Starknet’s block execution time significantly decreased. Throughput surged from 30,000 CSPS (Cario steps per second) in version v0.11.0 to 220,000 CSPS, resulting in a significant performance improvement.

The longstanding issue of poor interactive experience has also been addressed. The average pending status, which used to last up to 20 minutes while waiting for mainnet confirmation, is now a thing of the past.

For users, transaction times have been reduced to around 10 seconds, even after Layer 2 confirmation, greatly enhancing the overall experience.

This milestone upgrade helped Starknet’s TVL (Total Value Locked) successfully surpass $100 million, with a weekly growth rate exceeding 43%.

4.2 V0.13

The v0.13.0 version, launched in January 2024, expanded block size, resulting in a significant 50% reduction in computation costs and a 25% reduction in data availability costs.

Version v0.13.1 deployed support for Ethereum EIP-4844 ahead of schedule. Consequently, Starknet enabled the blob feature within hours of the Cancun upgrade, becoming the first L2 solution to drastically reduce user fees.

In the coming months of this year, as per the roadmap, v0.13.2 is set to introduce transaction parallelization, allowing for simultaneous processing of more transactions, thereby enhancing network throughput and reducing latency.

V0.13.3 will integrate Cairo Native into the Starknet sorter, further boosting sorter performance. This integration will lead to further acceleration of network speeds.

4.3 V0.14 and Subsequent Upgrade Plans

According to the roadmap, the highly anticipated Volition is expected to go live in the v0.14.0 upgrade.

Currently, data availability storage (DA) on Ethereum consumes the majority of gas fees on the Starknet network. Therefore, reducing DA storage on Ethereum is crucial for lowering costs.

Volition will allow developers to choose to store some data on Starknet L2 and ultimately submit the state root of this data to Ethereum L1. This approach significantly reduces the DA storage costs on L1, further achieving the goal of reducing fees.

Version v0.14.0 also plans to adopt applicative recursion to batch process multiple blocks’ L1 footprints (the data and computational tasks needed to support Starknet operations on Ethereum). This approach aims to reduce cost overhead.

Currently, each Starknet block has a dedicated proof and incurs a fixed operational cost on Ethereum. As a result, the network often needs to accumulate enough transaction volume to share the block cost before packaging a block. This leads to uncertain block times and inefficient block cost utilization. With applicative recursion, validators can bundle proofs for several blocks together, reducing block times and sharing cost overhead.

Additionally, Starknet will explore more DA compression solutions to further reduce costs.

05 Ecological Construction

5.1 Current Situation

With the steady improvement in performance and the continuous reduction in fees, the ecosystem on Starknet has now tended to become more mature.

On the infrastructure front, wallet projects like Agent X and Braavos, serving as self-hosted smart wallets, not only ensure security but also adapt to Starknet’s native account abstraction, providing users with a good interactive experience as the gateway to the web3 world.

In terms of cross-chain bridges, both native StarkGate and projects like Orbiter Finance, MiniBridge, and rhino.fi, focusing on cross-chain bridges, have joined the ecosystem.

Leading projects like Starknet.id in the DID sector play the role of ENS on Ethereum, supporting users to mint NFTs as identities and passports on the Starknet chain.

In the traditional DeFi sector, Starknet has also seen the growth of leading projects like Nostra, Ekubo, zkLend, ZKX, Carmine Options, rapidly dominating key areas such as DEX, staking, lending, and smart contract functionalities. These DeFi projects are striving for innovation in their products. For example, ZKX adopts gamified interaction and DAO governance to create a unique autonomous perpetual contract exchange, while Ekubo introduces a singleton design to manage all liquidity pools in one contract, reducing trading friction costs for users. The one-click rebalancing feature of mySwap effectively reduces impermanent losses during significant market fluctuations, injecting more vitality into the ecosystem.

GameFi is a sector highly anticipated by Starknet, with leading projects like Loot ecosystem and strategic blockchain games like Realms, Dope Wars, and Influence. Topology, a physics-based knowledge game developed by the Starknet native team, stands as one of the four major kings of blockchain games on Starknet.

Additionally, SocialFi witnessed the emergence of xfam.tech, similar to the previously popular friend.tech, filling the gap in the social field.

Since the airdrop of $STRK earlier this year, activity on Starknet has noticeably increased. Moreover, projects within the ecosystem, such as zkLend, Ekubo, and ZKX, have successively released native tokens $ZEND, $EKUBO, and $ZKX.

The ecosystem leader Nostra Finance has also launched the first native USD stablecoin $UNO on Starknet, as well as $NSTSTRK obtained from staking $STRK.

Multi-level token distributions undoubtedly serve as a shot in the arm for the Starknet ecosystem, and as of the first half of this year, the overall performance of the Starknet ecosystem has been impressive.

However, in the current moment of fierce competition between Layer 1 and Layer 2 solutions, ensuring continued vitality requires dual innovation in both products and technology to create truly popular applications. Behind this, besides the official team, continuous efforts from the developer community are also crucial. This is one of the reasons why the Starknet team has always been developer-friendly, even providing unprecedented developer rewards in airdrops.

5.2 Challenges and Choices

As mentioned earlier, STARK was born for secure large-scale complex proofs from the start, and Starknet, following in the same vein, shares this ethos.

To achieve this grand yet pure goal, many efforts have been inevitable, and the Cairo language is one of them. (Note: The Cairo language is a programming language designed by StarkWare specifically for the STARK proof system. It efficiently generates proofs, optimizes off-chain computation, and effectively addresses the limitations of Solidity in executing proofs.)

Unlike other Layer 2 solutions that use Solidity for smart contract development, developers on Starknet must use the native Cairo language for development, which directly increases the learning curve and entry barrier for developers.

On the other hand, since the Cairo VM is not compatible with the EVM, many mature projects on Ethereum cannot be directly migrated to Starknet. This has resulted in Starknet, although being an Ethereum Layer 2 solution, struggling to enjoy the benefits of a large ecosystem.

Currently, over 90% of dApps on Starknet are native to the chain, and the cost of project development is considerable.

In the face of this dilemma, Starknet’s choice can be found in Eli Ben-Sasson’s article “@think-integrity/stubborn%2C-or-steadfast">To Stand Still or to Persevere“ at the beginning of the year.

The article quotes the fable of “riding a tiger is hard to get off,” indicating that sacrificing security to pursue short-term performance is like riding a galloping tiger, fraught with peril. As true believers in technology, they would never disguise second-rate technology as first-rate and sell it.

What Starknet aims to do is genuine proof that can withstand overwhelming data and the dark forest. And adherence to proof is adherence to security.

To adhere, Starknet has rich developer incentive measures. In addition to community activities such as hackathons, it recently launched the Seed Grand Program, offering selected teams up to $25,000 USDC in non-dilutive funding rewards to support their ecosystem development on Starknet.

Specifically for the gaming sector, the Foundation’s Propulsion Pilot Program will select up to 20 games for funding rewards based on their gas consumption on the Starknet mainnet, with each game eligible for up to $1 million in rewards.

Furthermore, Nethermind, the Ethereum client development team in deep strategic cooperation with Starknet, has also announced the Starknet Grand Program, offering a total of $1 million in funding rewards. Each project can receive up to $250,000 in funding and technical support from the Nethermind team.

Starknet is also making efforts to break through the barriers between itself and Ethereum from two aspects. On one hand, the Warp project developed by Nethermind aims to translate Solidity code into Cairo code to achieve compatibility at the high-level language level. On the other hand, the Kakarot zkEVM solution developed by members of the StarkWare team simulates the EVM environment in Cairo, attempting to create a provable EVM. The project is still under development.

5.3 Future

Under StarkWare’s efforts, the Cairo developer community is currently growing steadily. With the thriving developer community, the ecosystem will hatch more excellent products and tools, further attracting more talented developers to join the Cairo community, forming a positive cycle.

In addition to expecting excellent products to emerge in traditional fields such as DeFi, combining Starknet’s gradually realized performance improvements and computational integrity advantages, some potential trend sectors are emerging on Starknet that may represent the future.

5.3.1 Full On-Chain Games

The concept of Fully On-Chain Games (FOCG), also known as Infinite Games, gained popularity in the early days of blockchain, capturing the anticipation of gamers.

It entails storing the rules and data of games entirely on the blockchain, executing all operations and interactions based on smart contracts. This setup enables players to truly own in-game assets, ensures transparent and verifiable rules, and provides an open economic system, thereby fostering a more free and fair gaming experience.

However, due to early limitations such as throughput, costs, and interaction modes on the blockchain, Fully On-Chain Games remained a lofty vision for a long time without achieving mass adoption.

Nevertheless, with the continuous optimization across various aspects of Starknet, we can see significant potential for it to become fertile ground for nurturing Fully On-Chain Games.

5.3.1.1 Native Account Abstraction

Account Abstraction (AA) is a crucial step in improving interaction and assisting Web2 users in transitioning to Web3.

In simple terms, it involves shifting from traditional Ethereum Externally Owned Accounts (EOAs), commonly used by individuals, to Smart Contract Accounts (CAs). Due to the programmability of smart contract accounts, operations can be simplified and user experience optimized while ensuring security.

Starknet’s design incorporates native account abstraction from the outset, with each account being a smart contract account, thus reducing the complexity of implementing AA in the system.

Native wallet dApps like Agent X and Braavos support account abstraction, providing users with a Web2-like experience.

In gaming scenarios, the role of account abstraction becomes even more apparent. For instance, the session key feature initiated by prominent gaming teams on Starknet, such as Briq, Loot Realms, and Topology, is now utilized by Loot Survivor. This feature enables session wallets, eliminating the need for users to sign every “attack” action, thereby significantly enhancing the user experience.

5.3.1.2 Cairo Ecology Gradually Improves

With Starknet’s ongoing optimization and performance enhancements, a large number of gaming communities have joined hands to build the Cairo ecosystem together. With the launch of a series of infrastructure, the gaming framework of the ecosystem has now been established.

Dojo is an on-chain game engine based on Cairo, created in February 2023 and currently operated and maintained collectively by the community. A game engine serves as the foundation for building games, providing game developers with a development framework consisting of contracts, tools, and code libraries. This eliminates the need for them to build the basic systems of the game from scratch, making the development of on-chain games easier.

(Note: The two most popular game engines for Web2 games are Unity and Unreal Engine, which games like “Hearthstone” and “Street Fighter” are built on. The development of Web3 game engines is still in its early stages. The two existing encrypted game engines are MUD, built on EVM, and Dojo, based on Cairo. Dojo is the first provable encrypted game engine.)

Cartridge is a game launcher that, on one hand, provides developers with tools and code libraries based on Dojo for creating and deploying games, including on-chain game logic, scalable architecture, seamless user access, modular development, and monetization solutions. On the other hand, it simplifies the interaction process for players, making it easy for them to discover and enter their favorite games.

5.3.1.3 Layer 3

Starknet, as a universal Layer2 solution using Zk Rollup, not only boasts outstanding security performance, high throughput, and significantly reduced cost, but also offers customized development of Layer3 Appchains to meet specific needs.

Game developers can customize and optimize the on-chain execution environment and consensus mechanism according to their requirements, creating a high-performance, low-latency, and cost-effective game-specific chain. This opens up more possibilities for fully on-chain games.

Realms and Cartridge have collaborated to develop “Realms World L3”, which is expected to be officially launched in Q3 of this year. It will run the entire Realms ecosystem on top of Starknet, offering faster speeds and lower costs to further enhance user experience.

Additionally, Dope Wars has announced its collaboration with Cartridge to release a Layer3 solution and use $PAPER as a Gas token.

5.3.1.4 Summary

While Starknet’s performance in Gamefi may not be particularly remarkable in the eyes of the public, focusing on fully on-chain games reveals Starknet’s ecosystem friendliness, clear mission for all-chain gaming, and its own technological advantages, which are all highly attractive to developers and players alike.

Currently, we can see a high level of enthusiasm among game developers on Starknet for building the Cairo ecosystem. Collaborative efforts by top projects have facilitated the establishment of key infrastructure such as Dojo.

If one day fully on-chain games can be fully realized, allowing more and more gaming enthusiasts to enter the Web3 gaming world and truly gain ownership of their gaming assets, there is reason to believe that all of this will happen on Starknet.

5.3.2 ZKML

With the simultaneous explosion of AI and blockchain technologies, AI+Blockchain is increasingly seen as the future direction of development, with Zero Knowledge Machine Learning (ZKML) being one solution.

Traditional ML models are often like black boxes, owned by centralized institutions. Ordinary users, aside from trusting the endorsement of large institutions, cannot verify what models they are using or whether they are trained with reliable data. This is one of the main reasons why centralized large models are criticized.

Simply putting models on-chain in a decentralized manner for training and execution is not feasible due to high gas costs and the inability to guarantee the reliability of models and training data in a non-trusted on-chain environment.

In such a scenario, ZKML becomes necessary. Think off-chain, act on-chain. By training and running models off-chain and using ZK technology to generate proofs submitted to the chain, ZKML perfectly addresses the two dilemmas mentioned earlier—cost and reliability.

Moreover, due to the privacy features inherent in ZK, ZKML also has broad prospects in sensitive areas such as finance and healthcare.

Building ZKML on Starknet using Cairo has inherent advantages. Cairo, as a language developed for proving, has excellent computational integrity and is highly abstracted in proofs. Developers can directly call proof components without having to deal with proof issues themselves, greatly simplifying the development process.

Furthermore, benefiting from STARK’s scalability advantages, it has significant network effects in handling large-scale computational data, efficiently and cost-effectively supporting the massive data needed for machine learning. Therefore, ZKML based on Giza Tech on Starknet is rapidly developing.

Giza is a ZKML middleware platform on Starknet that provides the Orion development framework, allowing developers to use familiar frameworks (such as PyTorch, TensorFlow) for model training and easy deployment on Starknet.

Additionally, Giza has introduced an agent framework called Agents that combines ZKML with multi-chain behaviors. Developers can create on-chain AI agents based on ZKML, interact with smart contracts, and make decisions based on predefined rules.

Currently, Giza has been applied to multiple projects. For example, in social networks, it collaborates with Circles Network for social graph analysis to detect fake users. In DeFi, it collaborates with Yearn Finance to provide intelligent investment strategies and risk management solutions based on ZKML.

The latest inclusion in the Starknet Seed Grand Program, ML Village, is using Giza to introduce ZKML into blockchain gaming for decision-making, demonstrating its broad application prospects.

06 Conclusion

According to recent announcements from the Starknet official team, it is expected that by 2024, gas fees will be reduced to far below $0.01, while achieving hundreds of transactions per second (TPS), making it the Layer2 with the highest TPS.

This goal may not seem ambitious for Starknet, as StarkWare’s vision for Starknet extends beyond just being a Layer 2 solution. In terms of product and market choices, Starknet is more similar to Solana, abandoning both the advantages and constraints of the EVM to build from scratch.

However, unlike Solana, which has flaws in decentralization, Starknet ingeniously inherits the extreme decentralization of Ethereum while ensuring scalability and security through the combination of Ethereum Layer 2 and ZK. It turns the impossible triangle into a possibility.

This seemingly perfect result, as we mentioned earlier, is a practice of adhering to long-termism, a journey of sacrificing the near for the far. We look forward to seeing Starknet unleash more vitality in the future.

Disclaimer:

  1. This article is reprinted from [Mirror]. Forward the Original Title‘Starknet 万字研报:蓄势待发,长期主义者的跬步千里’. All copyrights belong to the original author [Biteye 核心贡献者 Anci]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.

Starknet Comprehensive Report

Intermediate5/29/2024, 12:40:32 AM
In the past two years, the development speed of ZK has far exceeded expectations. The two leading ZK Rollups, ZkSync, and Starknet, have made significant progress in performance and costs. This article explores Starknet's technical advantages in a straightforward manner and simplifies the explanation of the ZK proof process.

Forward the Original Title ‘Starknet 万字研报:蓄势待发,长期主义者的跬步千里’

Compared to other noisy narratives in the web3 world, the ZK track has long represented a lengthy, monotonous but profoundly significant foundational infrastructure. It’s akin to a difficult pilgrimage where insiders toil arduously while outsiders remain in the dark. However, it is gratifying that the development speed of ZK has far exceeded expectations in the past two years. The two leading ZK Rollups, ZkSync and Starknet, have made significant progress in performance and costs.

Following the Ethereum EIP-4844 upgrade, ZK Rollup is also strengthening its position in competition with OP Rollup. Even more exciting is the collaboration between former competitors StarkWare and Polygon Labs, which upgraded the STARK protocol—long representing the forefront of ZK prowess—and officially launched Circle STARK, bringing another leap in ZK proof capabilities.

If you have read last year’s article (“L2 Summer is Coming? Master StarkNet Technical Principles and Ecosystem in One Article“) and wish to delve deeper into the intriguing ZK proof process behind Starknet but are deterred by intimidating mathematical formulas and complex technical theories, then follow this article to explore some key issues about ZK. We will try to avoid the vexing math parts and, on this basis, discuss the technical advantages of Starknet, especially the recent major breakthroughs.

01 Starting with ZK first

ZK is both a label and an abbreviation for Zero Knowledge Proof Systems. As a prominent topic, ZK proofs are like a mysterious legend—they allow proving a fact without revealing any additional information. How can such an idealistic goal be achieved? For this, we need to draw an analogy familiar to any student.

Typically, if a student wants to prove their academic excellence, the simplest way is to present their transcript. Assuming the exam system is effective and fair, a transcript showing an overall grade of A can vouch for the student’s academic level without revealing any specific academic details.

The process of ZK proofs is quite similar. In simple terms, its core components are two parts: the Prover and the Verifier. The Prover is like the school’s exam system, following a fixed process to generate a transcript as proof of the student’s academic ability. This proof is then presented to the Verifier, which could be a parent or company, to validate the student’s competence based on the transcript.

Here we see that the most challenging part of the proof process is the Prover generating the proof. In a ZK proof, this process can be divided into two parts: arithmeticization and polynomial commitment.

1.1 Arithmeticization

  1. Arithmeticization is to convert complex proof problems into algebraic problems. Specifically, it is to convert the witness (Witness) we want to prove into a set of polynomial constraints (Polynomial Constrains). This is similar to how we convert students’ academic abilities through examinations into a set of scores.
  2. Witness: Witness is what we usually call the raw data of off-chain calculations, including transaction data, account status data, intermediate calculation results, etc. It is private data that we use to prove the validity of transactions but do not want to make it public.
  3. Polynomial Constrains: Polynomial constraints. What needs to be done in the ZK proof process is to transform complex problems into mathematical problems. The most critical part of the mathematical proof method is to find a polynomial and finally prove that you have indeed found it. Polynomial constraints refer to the conditions that the polynomial needs to satisfy.

1.2 Polynomial Commitment

Polynomial commitment, in specific mathematical proofs, involves proving that you have found a polynomial that satisfies all the constraints generated in the arithmeticization step. If the polynomial is valid, then the mathematical proof is successful, meaning the issue we want to prove is established. This process is similar to arriving at a weighted average score or transcript that guarantees all the student’s grades are A’s, thereby proving the student’s academic excellence.

You might question this analogy, as in real life, a transcript often fails to accurately reflect a person’s academic ability due to numerous flaws and uncontrollable factors in human exam systems. However, in the ZK world, with the help of unequivocal mathematics and transparent, open procedures, this ideal is being realized, just as smart contracts and blockchain ensure fairness and transparency.

02 SNARK vs STARK

SNARK and STARK are currently the two most commonly used ZK proof protocols, and they are respectively the underlying protocols used by ZkSync and Starknet. Due to their similar names and fields, they are often compared. However, before comparing them, let’s introduce two figures to better understand the ZK proof systems built by these two protocols from a historical perspective.

2.1 Groth and SNARK

Jens Groth is a professor in the UCL Computer Science Department (now an honorary professor) and currently serves as the Chief Scientist at Nexus, focusing on zkVM. Starting from 2009, he has been prolific, publishing numerous papers on zero-knowledge-related topics. In the ZK field, we often hear about papers like Groth09, Groth10, etc., which are named after him and the publication year.

Two of his most famous works are:

[Groth10] “Short Pairing-based Non-interactive Zero-Knowledge Arguments,” which proposed a complete non-interactive proof scheme and is considered a theoretical precursor to SNARK.

[Groth16] “On the Size of Pairing-based Non-interactive Arguments,” which, building on Groth10, streamlined proof sizes and improved verification efficiency, is still widely used today.

It is on the foundation of Groth’s research that SNARK has been developed and refined. SNARK, which stands for Succinct Non-interactive Argument of Knowledge, is a concise zero-knowledge proof system known for its strong usability, enabling rapid adoption of ZK in the cryptocurrency field.

2.2 Eli Ben-Sasson with STARK

It’s worth mentioning that the first protocol to apply SNARK to cryptocurrency, Zerocash, was co-founded by Eli Ben-Sasson, who later co-founded StarkWare and was one of the inventors of STARK. Moreover, in the early years, Eli Ben-Sasson actively promoted the implementation of the SNARK protocol and published papers in 2013 and 2014, proposing and optimizing the construction of SNARK to enhance its practicality and efficiency, helping SNARK gain widespread attention and application.

However, perhaps due to a deep understanding of the challenges faced by SNARK, in 2018, Eli Ben-Sasson and others published “[BBHR18] Scalable, transparent, and post-quantum secure computational integrity,” formally proposing the STARK proof system and providing a more comprehensive solution for ZK Rollup.

STARK, which stands for Scalable Transparent Argument of Knowledge, has advantages in large-scale proofs and ensures transparency throughout the proof process without relying on trusted third parties. It also provides security against quantum attacks.

(Note: It needs to be clarified that while epic stories of heroes are always captivating, no achievement is accomplished by a single individual alone. On the contrary, whether it’s SNARK or STARK, they are the result of the collective efforts of numerous scientists. Highlighting individual figures is simply to add vividness to this critical development history of ZK from one perspective. Even a genius like Groth relied on the research contributions of others such as Aniket Kate, Gregory Zaverucha, and Ian Goldberg to realize his papers, and the authors who proposed STARK are all highly skilled individuals whom we can delve into further in the future.)

2.3 SNARK vs STARK

So, what prompted Eli Ben-Sasson to make the tough decision to start anew? What challenges did SNARK face?

2.3.1 Transparency

Before answering the previous question, we might need to address another question: What is the most expensive thing in the field of cryptography? Satoshi Nakamoto’s answer is trust.

SNARK happens to stumble upon this landmine. When SNARK performs polynomial commitments, it adopts the KZG method, which requires a Trusted Setup to generate a Common Reference String (CRS) that is then used to generate keys for the proof and verification process.

Going back to our example of a transcript, the reason why parents or companies can judge a student’s academic excellence based on an A average is because we collectively agree on the ranking of academic abilities from high to low as A, B, C, D. Only under this standard does an A grade hold meaning.

But what if the school’s grading system is compromised, and the ranking of academic abilities becomes C, A, B, D? Students who originally received a C grade might be mistakenly considered top performers and given priority. This leads to misjudgments.

From this, we can see how crucial the security of this collectively agreed-upon standard is. Yet, in the cryptographic world governed by the law of the jungle, this Trusted Setup becomes a huge vulnerability.

Knowing this, why does SNARK persist in using the KZG method? It’s because the proofs obtained using KZG are too small in size. Remember what the “S” in SNARK stands for? Succinct! The temptation of small proof sizes was too great, especially before the Ethereum Constantinople upgrade, where smaller proof sizes brought better practicality and efficiency to SNARK and were adopted by more projects for a long time. So, it’s all about trade-offs.

Now, regarding STARK, to tackle the Non-Trusted aspect, STARK adopts the FRI (Fast Reed-Solomon Interactive Oracle Proofs) method for polynomial commitments.

Specifically, the FRI method encodes polynomials using Reed-Solomon encoding, stores them in the form of a Merkle tree, and facilitates multi-round interactions between validators and provers through an Oracle to achieve verifiability and transparency (the “T” in STARK).

(Note: It’s worth noting that here the term “Oracle” doesn’t refer to the centralized or semi-centralized oracles commonly seen in the web3 world but is a decentralized virtual entity simulated locally by validators and provers based on protocol rules. It’s a form of interactive proof mechanism.)

To continue the analogy with the example of a transcript, we can view the polynomial commitment process in the STARK system as a grading system built on the blockchain, ensuring fairness and transparency of the entire system through blockchain technology.

Additionally, in STARK proofs, validators and provers can simulate the interaction process using a common Random Beacon and ultimately package it into a complete proof, achieving non-interactive proofs for better usability and asynchronicity.

2.3.2 Scalability

STARK’s advancements also lie in its universality and flexibility in handling large-scale complex computational problems, as well as its ability to decrease the average proof size as the proof scale increases, forming a network effect, as represented by the “S” in Scalable.

Unlike SNARK, which employs circuit computation methods represented by R1CS for arithmeticization and requires circuit redesign for different problems, STARK uses the AIR (Algebraic Intermediate Representation) method. This is a universal machine computation method that links different states through state transition equations, allowing almost any computational problem to be abstracted into a set of polynomial constraints.

Moreover, STARK’s use of the FRI method in generating polynomial proofs employs a recursive structure to gradually decrease the degree of polynomials. This results in proof size growth far slower than problem scale growth (logarithmic level), providing significant advantages in handling large-scale computations.

Returning to the example of grades and exams, if we liken the arithmeticization process to an exam, then SNARK and STARK respectively resemble traditional paper-based exams and computer-based exams.

In the short term or for a small school, traditional paper-based exams are cheaper and quicker, while computer-based exams require preparation in software and hardware, and seem costly and cumbersome.

However, for globally scaled exam institutions, a computer can conduct exams of different types and levels, eliminating the need for teachers to create questions for each exam, and saving significant manpower. In the long term, as the number of exams accumulates, the investment costs in software and hardware will be greatly diluted.

2.3.3 Resistance to Quantum Attacks

In addition to the achievements represented by “S” and “T”, STARK also achieves resistance against quantum attacks through the use of quantum-resistant hash functions (such as Rescue hash, generally considered post-quantum secure, while traditional SHA-256 hash functions are thought to potentially exhibit weaknesses in quantum computing), and security algebraic problems (complex algebraic problems that the prover needs to prove, currently believed to be difficult to solve even on quantum computers).

03nCircle STARK Doesn’t Stop There

As we’ve discussed, it’s evident that SNARK is an indispensable short-term solution due to its rapid feasibility. However, as time progresses and transaction volumes increase, along with the explosion of computational complexity, people are becoming increasingly aware that trust is actually the most expensive luxury in the field of cryptography. This realization underscores the superiority of STARK over time.

This point is gradually becoming apparent in the industry as well. The head applications using SNARKs, such as ZkSync’s Boojum version, have already begun exploring the gradual transition from SNARK to STARK. Additionally, Polygon, known for its agility, has also shifted towards STARK. This year’s upgraded proof system, Plonky3, is based on the latest joint research by Polygon Labs and StarkWare, known as Circle STARK.

Circle STARK represents a new generation of ZK proof protocols based on updated STARKs. It cleverly introduces circular curves and successfully integrates the small prime field M31 into the proof system, significantly improving proof efficiency.

In ZK proof systems, prime fields play a crucial role. It’s through operations on prime fields that proofs are made possible. The choice of prime field represents a balance between efficiency and security. Smaller prime fields require less computation and thus offer higher efficiency. On the other hand, larger prime fields typically signify higher levels of security, which is why both STARK and SNARK have historically used large prime fields.

The innovation of Circle STARK lies in its combination of circular curves and the use of the small prime field M31. This not only enhances proof efficiency but also ensures post-quantum security.

StarkWare has recently released and open-sourced the next-generation prover based on Circle STARK, called Stwo. It’s expected that Stwo’s proof efficiency will be 100 times that of the first-generation prover, Stone. Stwo will be fully compatible with the advanced Cario, and the current Starknet Prover (SHARP Prover) based on the Stone Prover will also transition to using Stwo. This means developers and users in the Starknet ecosystem will directly benefit from the performance boost brought by Stwo without any action required.

In addition to speeding up proof generation, Brendan Farmer, co-founder of Polygon, mentioned that the application of Circle STARK will ultimately significantly reduce costs and expand to more application proofs. Eli Ben-Sasson is also optimistic, stating that the launch of Circle STARK can be seen as a significant milestone, with the most efficient proof systems set to emerge in the near future, accompanied by continued breakthroughs and improvements.

04 Starknet Continues To Strengthen Its Efforts, Enhancing Performance

Through the above analysis, we can clearly see that the STARK proof system and its latest upgraded version, Circle STARK, are deserving frontrunners and the stars of tomorrow. As the flagship product of StarkWare, Starknet has a boundless future on the road of ZK Rollup.

However, perhaps due to the twists and turns of progress, Starknet has endured controversy for a long time. The reasons are none other than user experience and costs.

Fortunately, through the continuous efforts of StarkWare, these issues are gradually becoming history. Below, we will review some recent important upgrades of Starknet and further actions planned according to the roadmap.

4.1 V0.12

Starknet Alpha v0.12.0, codenamed Quantum Leap, went live on the mainnet in July 2023. The focus of this optimization was to improve network performance and enhance user experience.

Throughput and latency are generally considered as standards for measuring network performance. By optimizing the Rustification of the sorter and upgrading the Cario language, Starknet’s block execution time significantly decreased. Throughput surged from 30,000 CSPS (Cario steps per second) in version v0.11.0 to 220,000 CSPS, resulting in a significant performance improvement.

The longstanding issue of poor interactive experience has also been addressed. The average pending status, which used to last up to 20 minutes while waiting for mainnet confirmation, is now a thing of the past.

For users, transaction times have been reduced to around 10 seconds, even after Layer 2 confirmation, greatly enhancing the overall experience.

This milestone upgrade helped Starknet’s TVL (Total Value Locked) successfully surpass $100 million, with a weekly growth rate exceeding 43%.

4.2 V0.13

The v0.13.0 version, launched in January 2024, expanded block size, resulting in a significant 50% reduction in computation costs and a 25% reduction in data availability costs.

Version v0.13.1 deployed support for Ethereum EIP-4844 ahead of schedule. Consequently, Starknet enabled the blob feature within hours of the Cancun upgrade, becoming the first L2 solution to drastically reduce user fees.

In the coming months of this year, as per the roadmap, v0.13.2 is set to introduce transaction parallelization, allowing for simultaneous processing of more transactions, thereby enhancing network throughput and reducing latency.

V0.13.3 will integrate Cairo Native into the Starknet sorter, further boosting sorter performance. This integration will lead to further acceleration of network speeds.

4.3 V0.14 and Subsequent Upgrade Plans

According to the roadmap, the highly anticipated Volition is expected to go live in the v0.14.0 upgrade.

Currently, data availability storage (DA) on Ethereum consumes the majority of gas fees on the Starknet network. Therefore, reducing DA storage on Ethereum is crucial for lowering costs.

Volition will allow developers to choose to store some data on Starknet L2 and ultimately submit the state root of this data to Ethereum L1. This approach significantly reduces the DA storage costs on L1, further achieving the goal of reducing fees.

Version v0.14.0 also plans to adopt applicative recursion to batch process multiple blocks’ L1 footprints (the data and computational tasks needed to support Starknet operations on Ethereum). This approach aims to reduce cost overhead.

Currently, each Starknet block has a dedicated proof and incurs a fixed operational cost on Ethereum. As a result, the network often needs to accumulate enough transaction volume to share the block cost before packaging a block. This leads to uncertain block times and inefficient block cost utilization. With applicative recursion, validators can bundle proofs for several blocks together, reducing block times and sharing cost overhead.

Additionally, Starknet will explore more DA compression solutions to further reduce costs.

05 Ecological Construction

5.1 Current Situation

With the steady improvement in performance and the continuous reduction in fees, the ecosystem on Starknet has now tended to become more mature.

On the infrastructure front, wallet projects like Agent X and Braavos, serving as self-hosted smart wallets, not only ensure security but also adapt to Starknet’s native account abstraction, providing users with a good interactive experience as the gateway to the web3 world.

In terms of cross-chain bridges, both native StarkGate and projects like Orbiter Finance, MiniBridge, and rhino.fi, focusing on cross-chain bridges, have joined the ecosystem.

Leading projects like Starknet.id in the DID sector play the role of ENS on Ethereum, supporting users to mint NFTs as identities and passports on the Starknet chain.

In the traditional DeFi sector, Starknet has also seen the growth of leading projects like Nostra, Ekubo, zkLend, ZKX, Carmine Options, rapidly dominating key areas such as DEX, staking, lending, and smart contract functionalities. These DeFi projects are striving for innovation in their products. For example, ZKX adopts gamified interaction and DAO governance to create a unique autonomous perpetual contract exchange, while Ekubo introduces a singleton design to manage all liquidity pools in one contract, reducing trading friction costs for users. The one-click rebalancing feature of mySwap effectively reduces impermanent losses during significant market fluctuations, injecting more vitality into the ecosystem.

GameFi is a sector highly anticipated by Starknet, with leading projects like Loot ecosystem and strategic blockchain games like Realms, Dope Wars, and Influence. Topology, a physics-based knowledge game developed by the Starknet native team, stands as one of the four major kings of blockchain games on Starknet.

Additionally, SocialFi witnessed the emergence of xfam.tech, similar to the previously popular friend.tech, filling the gap in the social field.

Since the airdrop of $STRK earlier this year, activity on Starknet has noticeably increased. Moreover, projects within the ecosystem, such as zkLend, Ekubo, and ZKX, have successively released native tokens $ZEND, $EKUBO, and $ZKX.

The ecosystem leader Nostra Finance has also launched the first native USD stablecoin $UNO on Starknet, as well as $NSTSTRK obtained from staking $STRK.

Multi-level token distributions undoubtedly serve as a shot in the arm for the Starknet ecosystem, and as of the first half of this year, the overall performance of the Starknet ecosystem has been impressive.

However, in the current moment of fierce competition between Layer 1 and Layer 2 solutions, ensuring continued vitality requires dual innovation in both products and technology to create truly popular applications. Behind this, besides the official team, continuous efforts from the developer community are also crucial. This is one of the reasons why the Starknet team has always been developer-friendly, even providing unprecedented developer rewards in airdrops.

5.2 Challenges and Choices

As mentioned earlier, STARK was born for secure large-scale complex proofs from the start, and Starknet, following in the same vein, shares this ethos.

To achieve this grand yet pure goal, many efforts have been inevitable, and the Cairo language is one of them. (Note: The Cairo language is a programming language designed by StarkWare specifically for the STARK proof system. It efficiently generates proofs, optimizes off-chain computation, and effectively addresses the limitations of Solidity in executing proofs.)

Unlike other Layer 2 solutions that use Solidity for smart contract development, developers on Starknet must use the native Cairo language for development, which directly increases the learning curve and entry barrier for developers.

On the other hand, since the Cairo VM is not compatible with the EVM, many mature projects on Ethereum cannot be directly migrated to Starknet. This has resulted in Starknet, although being an Ethereum Layer 2 solution, struggling to enjoy the benefits of a large ecosystem.

Currently, over 90% of dApps on Starknet are native to the chain, and the cost of project development is considerable.

In the face of this dilemma, Starknet’s choice can be found in Eli Ben-Sasson’s article “@think-integrity/stubborn%2C-or-steadfast">To Stand Still or to Persevere“ at the beginning of the year.

The article quotes the fable of “riding a tiger is hard to get off,” indicating that sacrificing security to pursue short-term performance is like riding a galloping tiger, fraught with peril. As true believers in technology, they would never disguise second-rate technology as first-rate and sell it.

What Starknet aims to do is genuine proof that can withstand overwhelming data and the dark forest. And adherence to proof is adherence to security.

To adhere, Starknet has rich developer incentive measures. In addition to community activities such as hackathons, it recently launched the Seed Grand Program, offering selected teams up to $25,000 USDC in non-dilutive funding rewards to support their ecosystem development on Starknet.

Specifically for the gaming sector, the Foundation’s Propulsion Pilot Program will select up to 20 games for funding rewards based on their gas consumption on the Starknet mainnet, with each game eligible for up to $1 million in rewards.

Furthermore, Nethermind, the Ethereum client development team in deep strategic cooperation with Starknet, has also announced the Starknet Grand Program, offering a total of $1 million in funding rewards. Each project can receive up to $250,000 in funding and technical support from the Nethermind team.

Starknet is also making efforts to break through the barriers between itself and Ethereum from two aspects. On one hand, the Warp project developed by Nethermind aims to translate Solidity code into Cairo code to achieve compatibility at the high-level language level. On the other hand, the Kakarot zkEVM solution developed by members of the StarkWare team simulates the EVM environment in Cairo, attempting to create a provable EVM. The project is still under development.

5.3 Future

Under StarkWare’s efforts, the Cairo developer community is currently growing steadily. With the thriving developer community, the ecosystem will hatch more excellent products and tools, further attracting more talented developers to join the Cairo community, forming a positive cycle.

In addition to expecting excellent products to emerge in traditional fields such as DeFi, combining Starknet’s gradually realized performance improvements and computational integrity advantages, some potential trend sectors are emerging on Starknet that may represent the future.

5.3.1 Full On-Chain Games

The concept of Fully On-Chain Games (FOCG), also known as Infinite Games, gained popularity in the early days of blockchain, capturing the anticipation of gamers.

It entails storing the rules and data of games entirely on the blockchain, executing all operations and interactions based on smart contracts. This setup enables players to truly own in-game assets, ensures transparent and verifiable rules, and provides an open economic system, thereby fostering a more free and fair gaming experience.

However, due to early limitations such as throughput, costs, and interaction modes on the blockchain, Fully On-Chain Games remained a lofty vision for a long time without achieving mass adoption.

Nevertheless, with the continuous optimization across various aspects of Starknet, we can see significant potential for it to become fertile ground for nurturing Fully On-Chain Games.

5.3.1.1 Native Account Abstraction

Account Abstraction (AA) is a crucial step in improving interaction and assisting Web2 users in transitioning to Web3.

In simple terms, it involves shifting from traditional Ethereum Externally Owned Accounts (EOAs), commonly used by individuals, to Smart Contract Accounts (CAs). Due to the programmability of smart contract accounts, operations can be simplified and user experience optimized while ensuring security.

Starknet’s design incorporates native account abstraction from the outset, with each account being a smart contract account, thus reducing the complexity of implementing AA in the system.

Native wallet dApps like Agent X and Braavos support account abstraction, providing users with a Web2-like experience.

In gaming scenarios, the role of account abstraction becomes even more apparent. For instance, the session key feature initiated by prominent gaming teams on Starknet, such as Briq, Loot Realms, and Topology, is now utilized by Loot Survivor. This feature enables session wallets, eliminating the need for users to sign every “attack” action, thereby significantly enhancing the user experience.

5.3.1.2 Cairo Ecology Gradually Improves

With Starknet’s ongoing optimization and performance enhancements, a large number of gaming communities have joined hands to build the Cairo ecosystem together. With the launch of a series of infrastructure, the gaming framework of the ecosystem has now been established.

Dojo is an on-chain game engine based on Cairo, created in February 2023 and currently operated and maintained collectively by the community. A game engine serves as the foundation for building games, providing game developers with a development framework consisting of contracts, tools, and code libraries. This eliminates the need for them to build the basic systems of the game from scratch, making the development of on-chain games easier.

(Note: The two most popular game engines for Web2 games are Unity and Unreal Engine, which games like “Hearthstone” and “Street Fighter” are built on. The development of Web3 game engines is still in its early stages. The two existing encrypted game engines are MUD, built on EVM, and Dojo, based on Cairo. Dojo is the first provable encrypted game engine.)

Cartridge is a game launcher that, on one hand, provides developers with tools and code libraries based on Dojo for creating and deploying games, including on-chain game logic, scalable architecture, seamless user access, modular development, and monetization solutions. On the other hand, it simplifies the interaction process for players, making it easy for them to discover and enter their favorite games.

5.3.1.3 Layer 3

Starknet, as a universal Layer2 solution using Zk Rollup, not only boasts outstanding security performance, high throughput, and significantly reduced cost, but also offers customized development of Layer3 Appchains to meet specific needs.

Game developers can customize and optimize the on-chain execution environment and consensus mechanism according to their requirements, creating a high-performance, low-latency, and cost-effective game-specific chain. This opens up more possibilities for fully on-chain games.

Realms and Cartridge have collaborated to develop “Realms World L3”, which is expected to be officially launched in Q3 of this year. It will run the entire Realms ecosystem on top of Starknet, offering faster speeds and lower costs to further enhance user experience.

Additionally, Dope Wars has announced its collaboration with Cartridge to release a Layer3 solution and use $PAPER as a Gas token.

5.3.1.4 Summary

While Starknet’s performance in Gamefi may not be particularly remarkable in the eyes of the public, focusing on fully on-chain games reveals Starknet’s ecosystem friendliness, clear mission for all-chain gaming, and its own technological advantages, which are all highly attractive to developers and players alike.

Currently, we can see a high level of enthusiasm among game developers on Starknet for building the Cairo ecosystem. Collaborative efforts by top projects have facilitated the establishment of key infrastructure such as Dojo.

If one day fully on-chain games can be fully realized, allowing more and more gaming enthusiasts to enter the Web3 gaming world and truly gain ownership of their gaming assets, there is reason to believe that all of this will happen on Starknet.

5.3.2 ZKML

With the simultaneous explosion of AI and blockchain technologies, AI+Blockchain is increasingly seen as the future direction of development, with Zero Knowledge Machine Learning (ZKML) being one solution.

Traditional ML models are often like black boxes, owned by centralized institutions. Ordinary users, aside from trusting the endorsement of large institutions, cannot verify what models they are using or whether they are trained with reliable data. This is one of the main reasons why centralized large models are criticized.

Simply putting models on-chain in a decentralized manner for training and execution is not feasible due to high gas costs and the inability to guarantee the reliability of models and training data in a non-trusted on-chain environment.

In such a scenario, ZKML becomes necessary. Think off-chain, act on-chain. By training and running models off-chain and using ZK technology to generate proofs submitted to the chain, ZKML perfectly addresses the two dilemmas mentioned earlier—cost and reliability.

Moreover, due to the privacy features inherent in ZK, ZKML also has broad prospects in sensitive areas such as finance and healthcare.

Building ZKML on Starknet using Cairo has inherent advantages. Cairo, as a language developed for proving, has excellent computational integrity and is highly abstracted in proofs. Developers can directly call proof components without having to deal with proof issues themselves, greatly simplifying the development process.

Furthermore, benefiting from STARK’s scalability advantages, it has significant network effects in handling large-scale computational data, efficiently and cost-effectively supporting the massive data needed for machine learning. Therefore, ZKML based on Giza Tech on Starknet is rapidly developing.

Giza is a ZKML middleware platform on Starknet that provides the Orion development framework, allowing developers to use familiar frameworks (such as PyTorch, TensorFlow) for model training and easy deployment on Starknet.

Additionally, Giza has introduced an agent framework called Agents that combines ZKML with multi-chain behaviors. Developers can create on-chain AI agents based on ZKML, interact with smart contracts, and make decisions based on predefined rules.

Currently, Giza has been applied to multiple projects. For example, in social networks, it collaborates with Circles Network for social graph analysis to detect fake users. In DeFi, it collaborates with Yearn Finance to provide intelligent investment strategies and risk management solutions based on ZKML.

The latest inclusion in the Starknet Seed Grand Program, ML Village, is using Giza to introduce ZKML into blockchain gaming for decision-making, demonstrating its broad application prospects.

06 Conclusion

According to recent announcements from the Starknet official team, it is expected that by 2024, gas fees will be reduced to far below $0.01, while achieving hundreds of transactions per second (TPS), making it the Layer2 with the highest TPS.

This goal may not seem ambitious for Starknet, as StarkWare’s vision for Starknet extends beyond just being a Layer 2 solution. In terms of product and market choices, Starknet is more similar to Solana, abandoning both the advantages and constraints of the EVM to build from scratch.

However, unlike Solana, which has flaws in decentralization, Starknet ingeniously inherits the extreme decentralization of Ethereum while ensuring scalability and security through the combination of Ethereum Layer 2 and ZK. It turns the impossible triangle into a possibility.

This seemingly perfect result, as we mentioned earlier, is a practice of adhering to long-termism, a journey of sacrificing the near for the far. We look forward to seeing Starknet unleash more vitality in the future.

Disclaimer:

  1. This article is reprinted from [Mirror]. Forward the Original Title‘Starknet 万字研报:蓄势待发,长期主义者的跬步千里’. All copyrights belong to the original author [Biteye 核心贡献者 Anci]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
Start Now
Sign up and get a
$100
Voucher!