Comprehensive interpretation of Starkware: underlying design, Cairo language, team and economic model
IOBC Capital
2022-10-31 11:30
本文约7433字,阅读全文需要约30分钟
Starkware will still be one of the top contenders on the Rollup track.

At present, the development trend of Ethereum is more and more inclined to modular blockchain.

Under the framework of the modular blockchain, the transaction calculation and execution on Ethereum is no longer operated by the main network, and this part of the work is transferred to Layer 2 under the chain. This solution reduces the burden on the main network and greatly Extended performance of Ethereum.

first level title

Rollup

Among layer 2 expansion solutions, Rollup is considered the most promising.

Rollup completes the verification and calculation of transactions under the Ethereum chain, and packs and compresses them and sends them back to the main network together with the new state root (State root) after the transaction update, thereby reducing the space occupied by the main network.

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

There are two implementation schemes in Rollup, namely Optimistic Rollup and zk-Rollup. in:

  1. Optimistic Rollup usesFraud proof, first assume that all transactions uploaded to the main chain are legal, and set a challenge period to allow verifiers to propose proofs to challenge problematic transactions. Once fraudulent behavior is confirmed, the fraudsters will be punished and the challengers will be rewarded .

  2. Zk-Rollup usesValidity proof, all transactions are verified and packaged under the chain, and when the verified transaction is submitted to the main chain, a zero-knowledge proof is attached to prove the validity of the transaction. In the words of StarkWare CEO Uri: "It provides trustless computing integrity (computational integrity), it is such a capability - even if no one supervises, you can be sure that the calculation is performed correctly." Very similar to the early bit coin concept.

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

There are three main roles in Rollup:

  • Sequencer:It is mainly responsible for collecting transactions from users, sorting them and passing the new Merkle root to Layer1's rollup smart contract, similar to a miner.

  • Prover:Responsible for calculating and verifying all transactions, and generating a zk-proof to prove the validity of the transaction.

  • Verifier:Usually deployed on Layer 1, it is responsible for completing part of the calculation to verify the validity of the proof submitted by the Prover to ensure that it provides all the information needed to calculate the integrity.

Optimistic Rollup is compatible with EVM. The technical solution is mature and implemented early. For developers, the migration cost is low, which means that the projects Arbitrum and Optimism currently have the highest market share among rollups. Because zk-Rollups are not compatible with EVM, the technical difficulty is relatively high, and the development progress is slow. At present, the application is not as extensive as the rollup of the OP system that can be oriented to smart contracts.

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

Even so, zk-Rollup still has many advantages over Optimistic Rollup, such as:

  1. Scalability is better.This is because zk-Rollups needs to upload less data to the mainnet than Optimistic Rollups. Because the transaction information released by zk-rollups to the chain has been verified and attached with a certificate, others only need to verify the certificate without verifying the transaction, so the data related to the verification transaction does not need to be uploaded, but because Optimistic Rollups need to accept The challenge of fraud proof, so it is necessary to put these data on the chain. In practical applications, the ability of zk-Rollup to improve performance is about ten times that of Optimistic Rollups.

  2. Transaction finalization time is short.The transactions published by zk-Rollups to the chain have been verified and attached with proofs. The verification is relatively simple, and the verification time usually takes about ten minutes. However, due to the risk of fraud, the transactions submitted by Optimistic Rollups need to accept the challenge of fraud proofs. The time window of this challenge is about 1 week, so functions such as instant withdrawal cannot be realized.

  3. More security.The transactions uploaded by zk-Rollups have been verified and attached with proofs, and the possibility of doing evil is small. Compared with Optimistic Rollups, which may upload transactions containing fraudulent content, zk-Rollups have higher data reliability and security.

first level title

zk-SNARKs and zk-STARKs

The two leading projects of the zk system are zksync and Starkware. Among them, zksync uses zk-SNARK technology, while Starkware uses zk-STARK technology.

zk-SNARK is an acronym for Succinct Non-Interactive Proof, and zk-STARK is an acronym for Scalable Transparent Proof of Knowledge. zk-SNARK was born early, the technology is relatively mature, and it has been widely used. The early privacy coin project zcash used zk-SNARK technology. zk-STARK is considered to be an improved version of zk-SNARK, which is a faster and more convenient implementation, aiming to optimize zk-SNARK and make up for some of its shortcomings.

As can be seen from the name, zk-STARK has the advantages of scalability and transparency compared to zk-SNARK, and zk-STARK also has higher security. The specific reasons are:

  1. scalability.With zk-STARK technology, the run time of the prover is at most quasilinear in computation size and the polynomial logarithm in verification time. In zk-SNARK, the prover may face a complex and expensive proof process, and correspondingly longer verification time.

  2. transparency.zk-STARK does not require trusted initialization settings, unlike zk-SNARK which requires public reference strings for trusted settings, but uses random public verification, so there is no need to worry about parameters being destroyed and modified;

  3. safety.Since zk-STARK relies on the hash function for symmetric encryption, the anti-collision feature of the hash function brings the ability to resist quantum attacks.

first level title

Starkware

secondary title

working principle

The workflow of Starkware series products is shown in the figure below:

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

Let's take StarkEx as an example. The workflow of StarkNet is roughly similar.

  1. The user first performs operations in the application, usually the client of the application or the front end of the webpage, and the application sends transactions to the StarkEx service after performing these actions;

  2. The StarkEx service packs and executes these transactions and sends the package toSHARP (Shared prover, shared proof service), the execution of this process is completed by a program written in the Cairo language. It is worth mentioning that StarkWare uses Cairo, a Turing-complete language, to convert the calculation results of all smart contracts into provable polynomial equations. This makes smart contracts compatible with proof of validity;

  3. SHARP is a Stark-based proof system, which generates a proof that can prove the validity of this batch of transactions;

  4. SHARP sends the Stark proof to the deployment inVerifier on Layer 1, verified by Verifier;

  5. StarkEx Service will send an on-chain status update transaction toStarkNet smart contracts deployed on Layer 1product

product

Starkware currently has two products, namely:


  • StarkExProvide the application withCustomized ToB service, applications running on StarkEx can customize their business logic. StarkEx serves applications such as Defi and games, which can speed up transactions and reduce transaction costs. It can also achieve data availability through ZK-Rollup or Validium.

  • StarkNet Is aDecentralized, censorship-resistant, general purpose layer 2 network without permission, any user and developer can deploy smart contracts written in the Cario language on it.

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

These two products correspond to two different business models, the former provides customized services for applications and sells them, while the latter provides general-purpose services without permission and then charges transaction fees on the network or extracts MEV as a node under the principle of transaction fee priority.

StarkWare co-founder Eli Sabasson once made a metaphor,Comparing StarkEx and StarkNet to computers and clouds, respectively, buying StarkEx is like having your own customized computer, and each customer has their own expansion computer. What StarkNet provides is a network and a general service that everyone can pay for and use.

The working process of StarkNet is shown in the figure below. The biggest difference between it and StarkEx is inStarkEx Service is replaced by Sequencer in StarkNetTo undertake the work of verifying the validity of the transaction, packaging the transaction, and calling the Cairo program for execution, and the work of generating the proof undertaken by SHARP is in charge of Prover in StarkNet. Currently, both Sequencer and Prover are designated by the StarkWare official team, which raises the question of centralization.

secondary title

Roadmap

StarkNet once published a roadmap on their blog, and stated that they will gradually achieve decentralization.

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

In the vision, the process of team building StarkNet includes four stages, namely:

  • Step 0--Infrastructure

  • Step 1--Planets: single operator, single app rollup

  • Step 2--Constellations: single operator, rollup of multiple apps

  • Step 3--Universe: Decentralized operator, rollup of multiple apps

In Step 1, only one application runs on a StarkNet instance (one rollup), and developers focus on how to implement their own business logic on the expanded network of StarkNet.

The next step will support running multiple applications on the same StarkNet instance, and these applications will be able to share the same global Layer 2 state. This will enable interoperability between different applications, as well as lower gas costs due to improved economies of scale. At this stage, StarkNet will be a fully functional framework for running multiple applications with arbitrary business logic on top of Ethereum, each instance run by a single operator. From a user's point of view, StarkNet is similar to Ethereum, but with better scalability.

secondary title

Cairo language

Cairo (CPU Algebraic Intermediate Representation, CPU Algebraic Intermediary Code) is a Turing-complete programming language used by Starkware to generate STARK proofs for general calculations.Application developers can use Cairo to define any business logic and complete off-chain proof and on-chain verification,No need to manually generate complex circuits or AIR (Algebraic Intermediate Code).

With the Cario programming language, fast and secure coded proofs of any computational proposition are possible. An application written in Cario can prove its corresponding execution logic, and a Cario application can also integrate multiple Cario applications to form SHARP.

SHARP (Shared Proofer) can aggregate transactions from several independent Cario applications and use them in the same STARK proof.With STARK proofs, the time required to come up with a proof scales roughly linearly with the time required to execute the statement. The time required to verify a proof is logarithmic to the time to produce it.

Since the verification time is much smaller than the proof time, recursive verification can be achieved:A Cairo program can verify the correctness of multiple transactions, and a Cairo program can also be written to verify multiple Stark proofs. Such recursive verification can greatly reduce the verification time since only logarithmic time is required to implement the verification.

The Starkware team presents Cairo'sGeneric Proof Service (GPS), developers can use this service to build their own applications in the Cairo language. They can send their own Cairo code containing business logic to GPS to prove it and verify them on-chain.

secondary title

team and financing

Starkware's team is from Israel, and its main members are computer science and cryptography developers with backgrounds from Hebrew University and Technion-Israel Institute of Technology. It can be said that it is the strongest team in the field of zero-knowledge proof.

As can be seen from Starkware's official website, the team currently has 77 members, plus 7 subject consultants and 5 other consultants. Key members include:

  • Eli Ben-Sasson: Co-Founder & Chief Scientist, PhD in Theoretical Computer Science from Hebrew University, has long been engaged in research on computational integrity, cryptography, and zero-knowledge proofs. Professor of Computer Science at the Technion-Israel Institute of Technology. Founding scientist of Zcash, inventor of zkSNARK and zkSTARK.

  • Uri Kolodny: Co-Founder & CEO, Bachelor of Computer Science from Hebrew University, is a serial entrepreneur with rich business experience and good at cooperation.

  • Alessandro Chiesa: Co-Founder & Chief Scientist, Professor of Computer Science at UC Berkeley. The founding scientist of Zcash, the co-inventor of zk-SNARKs, and the core developer of libsnark, a leading open source library for concise zero-knowledge proofs.

  • Michael Riabzev: Co-Founder & Chief Architect. Doctor of Israel Institute of Technology, worked in Intel and IBM.

  • Oren Katz: Vice President of Engineering. Graduated from Hebrew University majoring in computer science, MBA from Tel Aviv University, senior engineer with 20 years of experience.

In terms of financing, StarkWare disclosed a total of seven rounds of financing, involving 45 investments.Disclosed financing of $273 million, in 2022,D round of financing valuation of 7.9 billion US dollarseconomic model

economic model

Starkware released their token economic model in a blog post in mid-July of this year. It was originally planned to issue its tokens in September, but it later released a message to postpone the issuance time. As of the time of publishing this article, there is still no official announcement of the issuance of tokens.

StarkNet tokens will mainly have 3 usage scenarios, namely payment of StarkNet network fees, pledge to participate in network consensus, and community governance voting.

  • transaction fee:Currently, fees in StarkNet are paid in ETH. But going forward, the project expects fees to be paid only in native StarkNet tokens. To support a good user experience, an automated and decentralized on-chain mechanism will allow users to pay fees in ETH.

  • Pledge:Certain services that are critical to the liveness and security of StarkNet may require StarkNet tokens to be staked. These services may include ordering, interim L2 consensus until L1 finality is reached, STARK proof services, and data availability provisioning. These services are expected to be decentralized by 2023.

  • Governance:Proposals to improve StarkNet will require a minimum token holding threshold. All changes to the protocol that are critical to the liveness, security, and maintenance of StarkNet will require a vote, either directly or via delegation. For example, all major updates to the StarkNet operating system require approval from token holders.

The initial supply of StarkNet tokens is 10 billion, 17% is allocated to StarkWare investors, 32.9% is allocated to core contributors, and 50.1% is allocated to the foundation. At the same time, the token has an additional issuance mechanism, and part of the newly minted tokens and transaction fees will be awarded to core infrastructure developers and smart contract developers.

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

The specific purposes of the 51% allocated to the foundation are:

  • 9% - Ecological developers, users and communities. Including some users who have interacted with StarkEx before June 1st.

  • 9% - Community Rebates - Rebates of StarkNet tokens to partially cover the cost of joining StarkNet from Ethereum.

  • 12% - Funding for researchers and workers to develop, test, deploy and maintain the StarkNet protocol.

  • 10% - Strategic Reserve to fund ecosystem activities consistent with the Foundation's mission.

  • 2% — Donate to outstanding institutions and organizations in related fields, such as universities, NGOs, etc., determined by StarkNet token holders and foundations.

  • 8.1% Unallocated - To further support the StarkNet community in a manner determined by the community.

Considering the customary distribution of the decentralized ecosystem and the long-term interests of the community, 49.9% of the investors and core contributors will have a 4-year lock-up period, and a 1-year Cliff (cliff period) and linear approach will be adopted Release tokens.

secondary title

Operational data

StarkEx, a toB product, has already accumulated some users due to its early launch and the relatively mature Scale as a service model, such asdYdX (now exodus), Immutable X, rhino.fi, celer and Sorare.According to the data displayed on the official website, the cumulative transaction amount on StarkEx has reached 732 billion U.S. dollars, and the current TVL is 461 million U.S. dollars.

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

Another product, StarkNet, according to the data on the www.starknet-ecosystem.com website, currently has more than 100 applications in the ecosystem, of which Defi (45), NFT (24) and infrastructure (18 ).

Detailed explanation of Starkware: underlying design, Cairo language, team and economic model

Among the more well-known projects,AAVE and MakerAll will be deployed on StarkNet. Two days ago (October 29), it was officially announced that the first phase of cross-chain cooperation between Aave and StarkWare has been completed. This stage is Aave v2’s aToken cross-chain on Ethereum to StarkNet’s smart contract infrastructure, allowing network users to obtain cross-chain aToken on StarkNet. As early as June, Maker has launched the transfer of DAI between the main network and StarkNet.

It is worth mentioning that dYdX, which previously occupied the main TVL in StarkEx, left in June and chose an independent blockchain based on the Cosmos SDK to launch the v4 version of the product. This incident affected investors' confidence in layer 2 and Starkware to a certain extent.

It can also be seen from this exodus incident that applications that really have users and influence have more voice and initiative in choosing the underlying infrastructure. They do not depend on a single underlying chain and can actively choose other The underlying public chain, and even build an application chain that meets your own needs.

epilogue

epilogue

Starkware, which has a strong technical team, is currently gradually developing products according to their plan: On October 26, they officially announced that they have written and completed ZK-EVM using the STARK proof programming language Cairo.

At the same time, they are also facing some challenges. For example, zk-STARK currently has relatively high technical difficulty, slow development speed, and few developers, which has brought many difficulties to the development and retention of ecological applications. The departure of dYdX took away most of the TVL in the project, exposing the dilemma that the underlying infrastructure has insufficient binding capabilities for upper-level high-quality applications, and also let people see that high-quality applications have a strong voice in selecting the underlying chain.

Original link

Original link

IOBC Capital
作者文库