header-langage
简体中文
繁體中文
English
Tiếng Việt
한국어
日本語
ภาษาไทย
Türkçe
Scan to Download the APP

L2 Summer is coming? Master the technical principles and ecology of StarkNet in one article

2023-03-27 18:02
Read this article in 46 Minutes
总结 AI summary
View the summary 收起
Original title: "L2 Summer is coming? Master the technical principles and ecology of StarkNet in one article"
Original source:

"Biteye" community


1. Prelude to Layer2 Summer  


Arbitrum's DeFi ecosystem has taken shape, and its decision to issue airdrops has made it the leader in the Layer2 ecosystem. From the release of the airdrop rules to the opening of claims, Arbitrum One's TVL has accounted for 66.61% of the entire layer2 ecosystem, and the number of active users has skyrocketed by 400,000 in two weeks.


图片

(Data source: https://l2beat.com/scaling/tvl)  


图片

(Data source: https://dune.com/Henrystats/arbitrum-metrics)


Of the four former layer2 kings: Optimism, Arbitrum, zkSync, and StarkNet, only the latter two have not announced airdrops. Optimism and Arbitrum have successively practiced the strategy of ecological accumulation + airdrop to grab users, and the results have been reflected in the market share of the Layer2 ecosystem. As the Layer2 ecosystem matures, and EIP-4844 will significantly reduce Rollup fees, grabbing users will become the core factor for Layer2 to win. Under the current market structure, there is not much time left for zkSync and StarkNet to seize the market. Competition between projects and the wealth effect brought by users' fomo have made Layer2 Summer imminent.


(Note: EIP-4844 is an improvement proposal for the Ethereum network, which is expected to reduce Rollup costs by 10-100 times. It will introduce a new type of transaction to Ethereum that can carry short-lived data called blobs. The data availability previously stored in the form of Calldata can be changed to be stored by blobs, and the storage cost of blobs is much cheaper than calldata. In terms of user experience, the most intuitive perception of users is that L2 fees have been greatly reduced, which will provide an important foundation for the outbreak of the L2 ecosystem.)


As the project with the highest valuation among the four major Layer2 kings (parent company StarWare is valued at 8 billion US dollars), the gold content of the StarkNet ecological project is needless to say, as can be seen from the recent trading activity.


StarkNet has announced on November 16, 2022 that it has deployed its native token $STRK on the Ethereum mainnet for voting, staking and payment of fees, and the token allocation is still to be determined. The following will introduce StarkNet and its key projects in the ecosystem. If you are more interested in ecological projects, you can read the third part directly.



(Data source: https://l2beat.com/scaling/activity)



2. Introduction to StarkWare


2.1 Project Overview


StarkWare, the parent company of StarkNet, was founded in 2018 and is headquartered in Israel. Its two main products are StarkEx, an expansion engine built on the Ethereum mainnet, and StarkNet, a general-purpose ZK-Rollup. The StarWare technical team has more than ten years of research and engineering experience in the ZKP field. In 2018, they took the lead in proposing the use of SATRK validity proof to solve the Ethereum scalability problem and unlock large-scale scalability.


StarkEx: A second-layer scalability engine designed for applications. StarkEx provides dedicated Rollup technology services for each application. It has been officially launched on the Ethereum mainnet since 2020 and is relatively mature. Currently, projects developed based on StarkEX include Sorare, immutableX, dYdX, ApeX and other well-known projects.


StarkNet: A general-purpose Rollup that can deploy any smart contract without custom development for specific applications. StarkNet was launched on the Ethereum mainnet in November 2021. Currently, there are more than 50 projects on the mainnet and more than 100 projects on the testnet.


StarkWare has raised a total of US$273 million in seven rounds of financing. It completed a US$6 million seed round of financing in January 2018, and received a US$12 million grant from the Ethereum Foundation in July of the same year. In March 2021, it completed a US$75 million Series B financing led by Paradigm, and in November of the same year, it completed a US$50 million Series C financing. Investors included Paradigm, Alameda Research, Three Arrows Capital, etc. On May 25, 2022, StarkWare completed a US$100 million Series D financing with a valuation of US$8 billion, led by Greenoaks Capital, Coatue, Tiger Global and other participants.


2.2 Technical Architecture


Similar to other zk-rollup solutions based on validity proof, StarkNet and StarkEx also use the form of "off-chain calculation-generation of zk proof-on-chain verification" to achieve the expansion of Ethereum.


However, it achieves high transaction processing speed and low cost through the original zk-STARK zero-knowledge proof algorithm, zk-friendly programming language Cairo, SHARP shared validator, and diversified data availability.


2.2.1 Validity proof based on STARK


zk-STARK was proposed by Eli Ben Sasson, the founder of StarkWare, in a 2018 paper. It is the abbreviation of Zero-Knowledge Scalable Transparent Argument of Knowledge and has excellent characteristics such as scalability and transparency.


Transparency: ZK-STARK can work without a trusted setup of a common reference string (CRS). Instead, publicly verifiable randomness is used to establish the interaction between provers and verifiers, which reduces the user's trust assumptions and improves the security of STARK-based protocols.


Scalability: STARK has the logarithmic compression feature of verification, which can achieve faster verification speed. That is, when the time required to prove a proposition is T, the time required to verify the proof is only log(T). This feature allows STARK to achieve low cost and reduce the delay of large combinatorial propositions through recursion, and achieve scalability.


图片

 (Image source: https://medium.com/coinmonks/zk-starks-create-verifiable-trust-even-against-quantum-computers-dd9c6a2bb13d)  


The advantages of STARK are also accompanied by a series of trade-offs:


The proof size of STARK is larger than that of SNARK. Therefore, when the Layer2 transaction volume is low and it is difficult to amortize the proof cost, there will be a large confirmation delay. Currently, the final confirmation time of StarkNet transactions is about 8 hours. The reason is that StarkNet currently has a low transaction volume, and it is necessary to collect enough transactions to amortize the cost of a validity proof. At the same time, zk-STARK needs to cooperate with Cairo to generate validity proofs for transactions, which has a certain learning threshold for developers.  


2.2.2 Cairo Programming Language


Cairo is a Turing-complete programming language released by the StarkWare team in 2020, allowing developers who do not know STARK to use Cairo to implement verifiable calculations with STARK. In most existing proof systems, for each business logic, that is, each calculation, a set of polynomial constraints representing a specific calculation needs to be generated. The difficulty lies in how to unify the execution results of diverse smart contracts into verifiable polynomial equations.


Programs written in Cairo can directly convert the calculation results into provable polynomial equations through the STARK prover, thereby achieving good compatibility between smart contracts and zero-knowledge proofs. Cairo is a programming language born for STARK. The combination of the two can maximize the potential of STARK, but its separation from the EVM ecosystem has always been a problem that needs to be solved. EVM compatibility is a high ground that various zk expansion solutions are competing for, and the StarkWare team is also working hard for this.


At the end of October 2022, StarkNet announced that it had developed ZK-EVM using Cairo. At the same time, the Ethereum client Nethermind is working on developing Warp, a compiler from Solidity to Cairo, to achieve StarkWare compatibility with EVM. The team claims that Wrap currently supports rewriting Uniswap V3 into Cairo code. As StarkNet is truly put into production, the actual effect of the compatibility of different solutions will be tested.


2.2.3 SHARP Shared Prover


SHARP is a shared prover (SHARed Prover), which is the Prover used by StarkEx and Starknet to generate zero-knowledge proofs. SHARP can generate validity proofs for both StarkEx and Starknet, so different StarkEx applications and transactions on Starknet can be aggregated and proved in a single STARK proof, so as to fill the capacity of STARK proofs faster, thereby increasing transaction processing speed and reducing latency.


Recursive proofs are the next generation of cutting-edge technology, not only suitable for some hard-coded logic, but also for general computing. When combined with STARK, SHARP can make transactions within the entire StarkWare ecosystem well implement recursive properties, bringing extreme scalability.


2.2.4 Diversified data availability


The general logic of validity proof is "off-chain calculation-generate zk proof-on-chain verification", that is, the user sends a transaction on Layer2->Sequencer collects and sorts and executes it. After the calculation is completed, the transaction will be submitted to Prover->Prover to generate a validity proof, and then submitted to the Verifier contract on the main network->Verifier contract to verify the validity of the proof. If the verification passes, the status is confirmed by the main network.


Data availability: In Rollup mode, after the proof generated by Prover is verified, the new status becomes valid, and the specific information of the status (such as the account balance) will be written into the main network. Users can initiate new transfers based on the status information confirmed by the main network without trust, because the main network has the latest user balance, that is, the data availability is on the chain.


In fact, most of the gas costs consumed by the main network are used for the storage of data availability rather than verification proofs, that is, the main network will incur a lot of costs for data availability. Therefore, StarkNet proposed a solution to transfer data availability to off-chain storage, Validium, and only save the hash value of the verified state on the chain.


In this solution, data availability is stored by the Data Availability Committee (DAC), which is composed of a quorum of independent members, responsible for supervising the correct update of the state and retaining a copy of the processed data. When a user wants to withdraw Layer2 funds in a new state, a DAC signature is required to provide specific ledger information. Validium can significantly reduce the cost of Rollup, but at the same time it sacrifices decentralization and is suitable for data availability for non-important transactions.


Based on the two basic modes of Rollup and Validium, StarkWare also provides a Volition mode, allowing users to choose the storage method of data availability between Validium and Rollup modes at the transaction level. Users can choose to save each single transaction in Validium or Rollup mode. In summary, the three data availability (DA) modes provided by StarkWare allow dApps and users to choose according to the importance of data. The team said that all three methods are currently available in production. But no matter which DA mode is used, the validity of all transactions will be guaranteed by the STARK validity proof.


Rollup: The ledger is published directly on the blockchain


Validium: The Data Availability Association (DAC) ensures the security of the ledger, and only the hash value is saved on the chain


Volition: The application allows users to choose the DA mode of each transaction, Rollup or Validium when initiating each transaction


2.3 Workflow


2.3.1 StarkNet Workflow


1. The user initiates a transaction and sends the transaction to Squencer for verification, sorting and execution, and packaging batches. Currently, there is only one Sequencer in the StarkNet system, which is officially controlled by StarkWare, but the StarkWare team plans to decentralize the Squencer in the future; the Squencer executes transactions through Cairo OS and plays the role of EVM.


2. Squencer submits the trace of the executed transaction to Prover, and Prover generates a validity proof for the computational integrity. The execution trace is the core of generating zkp, and recording the execution trace is a zk-friendly feature of the Cairo language; here Prover also generates validity proofs for StarkEx, and can aggregate transactions from different StarkEx applications and StarkNet for sharing.


3. Squencer and Prover send the validity proof and global state changes to the full node for recording. The full node is built on a P2P network and is responsible for recording the transaction history of the entire Layer2 network and Layer2-related transactions on the Ethereum mainnet.


4. Prover submits the validity proof to the Verifier on the mainnet. Verifier is a smart contract deployed on the Ethereum mainnet, responsible for receiving and verifying the validity proof provided by Prover.


5. Verifier sends the verified results to the StarkNet Core contract on the mainnet for recording and preservation. The StarkNet Core contract is deployed on the Ethereum mainnet and is used to receive Layer2 global state change information, including state hash and data availability; the result verified by the Verifier is a string of state hashes, which is written into a new Layer1 transaction by the Verifier and passed to the Core contract for preservation.


6. After receiving the verification result (state hash), the StarkNet Core contract receives and saves the data availability in the form of "Call data" from Layer2. The data will be synchronized to the full node of Layer2 for decoding to ensure that the full node can record and reconstruct the historical transactions of Layer2; in the Validium solution, the StarkNet Core contract does not save data availability, only the state hash.  


图片

 (Image source: https://david-barreto.com/starknets-architecture-review/#more-4602)  


2.3.2 StarkEx Workflow


1. The user initiates an interaction within the application, which is executed and generates transactions. These transactions are sent directly to the StarkEx server by the application. The StarkEx server is a Cairo program customized by StarkEx for a certain application


2. The StarkEx server packages transactions in batches, sends them to the SHARP Prover, and generates a validity proof


3. The Prover sends the generated validity proof to the Verifier on the chain for verification


4. When the verification is passed, the Verifier sends the status hash to the StarkEx contract; the StarkEx server will send the updated entire status to the StarkEx contract on the mainnet. During the whole process, the interaction between the user and the application is carried out off-chain, and the process of the application sending transactions to the StarkEx server is carried out on-chain.  


图片

 (Image source: https://docs.starkware.co/starkex/overview.html)  


2.4 StarkNet Value Analysis


StarkNet is a general-purpose Layer2 launched by StarkWare. It adopts a validity proof scheme to obtain the security of the mainnet and belongs to the zk-rollup in the track. "Which will dominate the future, zk-rollup or op-rollup?" is a commonplace topic. The mainstream view is that op-rollup will dominate in the short term because of its low technical implementation difficulty and good EVM compatibility. In the long term, with the further explosion of the Ethereum ecosystem, the interactive solution of op-rollup will be limited, and zk-rollup will dominate with the non-interactive and simple validity proof.


In the subdivided track of zk-rollup, StarkNet did not charge ahead in the hot zkEVM direction, but opened up a new path through STARK+Cairo, committed to bringing the validity proof technology to its extreme and giving birth to the StarkNet native ecosystem.


At present, the entire Web3 has not yet achieved mass adoption, and the StarkNet ecosystem is only in its infancy. The scarcity of transactions makes it difficult for StarkNet to accumulate enough transactions to spread the cost of validity proof, resulting in a long transaction confirmation time for StarkNet, which cannot play the ultimate scalability.


However, as the penetration rate of Web3 gradually increases, StarkNet will take on a large number of users and transactions with its unique technical advantages, bringing diversity to the Ethereum ecosystem while allowing more users to enjoy a good Web3 experience.  


3. Inventory of StarkNet Ecological Key Projects  


StarkNet official display: There are more than 100 projects deployed and launched based on StarkNet, of which 53 have been launched on the mainnet, covering wallets, DID, cross-chain bridges, DID, DeFi, NFT, Game and other project types. The following will introduce the key projects in the key types. For more projects, you can learn about them through the StarkNet ecosystem list.


3.1 Wallet


3.1.1 Argent X


Argent X is a StarkNet wallet launched by Argent. It is also the first wallet to support StarkNet. It uses the native account abstraction features of StarkNet to implement multi-signature and no mnemonic features, and uses StarkNet's excellent performance to achieve lower transaction fees and faster confirmation time for transactions.


Argent X users can use Argent through ios and Google plug-ins. Its built-in DeFi functions such as exchange, staking, and lending allow users to complete one-stop DeFi operations in the wallet.


Argent also provides functions such as biometric verification and guardian mechanism to allow users to experience web2. Argent X's contract security has been certified by three auditing companies: Trail of Bits, Solidified and G0 Group.


Argent received $40 million in Series B funding in April 2022, led by Fabric Ventures and Metaplanet.  


图片


3.1.2 Bravvos


Bravvos is also a self-hosted account abstract wallet running on StarkNet. Bravvos is committed to providing a seamless Web2.0 user experience and can be used on iOS, Android and multiple browsers, while eliminating mnemonics so that users can recover their accounts.


Bravvos also plans to provide DeFi services such as staking and lending. Braavos also supports account segmentation, separating long-term (high amount) savings from daily (low amount) consumption by supporting withdrawal limits and withdrawal delays, and allowing users to view the details of each transaction to achieve refined management of on-chain funds.


Bravvos announced in October 2022 that it had completed a $10 million financing round, led by Pantera Capital.  


图片


3.2 Cross-chain bridge


3.2.1 StarkGate


StarkGate is the official cross-chain bridge of Ethereum Starknet developed by StarkWare, helping users to realize cross-chain transactions of ETH and ERC-20 tokens between Ethereum and StarkNet.


The bridge between StarkGate and Ethereum communicates through StarkNet's message passing mechanism and realizes low-cost interaction based on STARK's computational compression capabilities.  


图片


3.2.2 Orbiter Finance


Orbiter Finance is a decentralized cross-Rollup bridge that enables users to cross-chain assets between ETH mainnet, StarkNet, zkSync, Loopring, Arbitrum, Optimism, Polygon, ZKSpace, Immutable X, dYdX, Metis, BNB Chain and Boba.


Orbiter Bridge provides users with excellent experience such as low handling fees and fast speed through its unique market maker model, but it currently only supports transfers of four currencies: ETH, USDC, USDT, and DAI.


Orbiter completed its first round of financing in November 2022, with participation from Tiger Global, Matrixport, A&T Capital, StarkWare, Cobo, imToken, Mask Network, and Zonff Partners. The amount of financing was not disclosed. In addition, Vitalik also donated 16 ETH to it.  


图片


3.3 DID


3.3.1 StarkNet ID


StarkNet.id is StarkNet's domain name service (.stark), allowing users to mint StarkNet-based decentralized identities for free. Users can also attach any data to the Starknet identity, including identity tags such as social media accounts from Web2 to ENS domain names from Web3. The team plans to launch a supporting StarkNet identity dashboard and more features to make it easier for users to manage and build a more comprehensive decentralized identity system.


According to the data, the total amount of StarkNet.id minted is 148.05K, the number of holders is 85.28K, the floor price is around 0.015eth, and the total transaction volume is 1.16eth (2023.3.26).  


图片


3.3.2 WIW Protocol


WIW is an on-chain identity protocol that focuses on privacy protection. It can generate corresponding tags based on the user's on-chain behavior to help users build an identity system, mainly covering three application scenarios:


Personal brand building: WIW can help users showcase their on-chain achievements, build on-chain resumes, and enable users to obtain potential airdrops and credit lending opportunities by building their on-chain credit


Social activities: WIW's accurate analysis of user identity enables users to find and join matching communities and meet people with similar interests


Provide tools for builders: WIW's tags enable builders to analyze users without affecting user privacy, and can also carry out marketing activities accurately


图片


3.4 DeFi


3.4.1 10KSwap


10KSwap is the first open source AMM protocol deployed on StarkNet, aiming to use the performance of rollup for the performance of AMM protocols, bringing lower fees, less friction and better liquidity to the L2 world.


Currently, 10KSwap supports swaps between five tokens: ETH, USDC, DAI, WBTC, and USDT. Similar to traditional swaps, users can also provide liquidity to 10Kswap to earn market-making income.


Currently, the liquidity of 10Kswap is about 1.2 million USD, and the daily trading volume is about 828,600 USD (2023.3.26), which is still in its early stages.  


图片


3.4.2 Nostra


Nostra is a decentralized lending protocol based on StarkNet. It is the first protocol on StarkNet that supports flash loans and also provides StarkNet's first native stablecoin $UNO.


Nostra aims to build the liquidity layer of StarkNet, which consists of three products: Nostra Money Market, UNO, and Nostra Swap:


Nostra Money Market: It is the core product of the liquidity layer, providing users with coinage and lending services similar to MakerDAO (minting $UNO); Nostra also provides features such as collateral risk isolation and smart liquidation to further enhance the user's lending experience and obtain better asset security; the money market also provides income for Nostra Swap and UNO minters, helping the entire liquidity system to complete the logical closed loop


Nostra Swap: It is a stablecoin trading platform in the Nostra system, similar to Curve, used to support the peg and growth of UNO. Users can provide LP on Nostra Swap to obtain transaction fees and interest on the money market, and can also realize the exchange of $UNO and other stablecoins


UNO: It is the first Starknet native stablecoin, which can be minted by users with overcollateralization or exchanged in Nostra Swap; $UNO will be used in a variety of supporting scenarios, including DeFi, games, NFTs, real-world payments, etc.


图片


3.4.3 ZKX


ZKX is the first perpetual futures trading platform on StarkNet with self-custody and community governance. The protocol aims to provide further scalability through a decentralized node network and upgraded trading experience, and provide perpetual swaps and derivatives to any user on StarkNet and Ethereum.


ZKX has introduced a series of measures to encourage users to trade, including trading and staking to earn USDC, increasing trading volume to unlock ZKX advanced features, etc.


ZKX announced in July 2022 that it had completed a $4.5 million seed round of financing, with investors including StarkWare, Alameda Research, Huobi, Amber Group and Crypto.com.  


图片


3.5 NFT


3.5.1 Aspect

Aspect is the first NFT trading platform in the StarkNet ecosystem. It was launched in August 2022. Users can mint, upload, and buy and sell NFTs on the platform. Currently, its trading volume is still small and in its early stages.  


图片



3.5.2 Mint Square


Mint Square is another NFT creation and trading platform based on StarNet, dedicated to providing users with a cheaper and faster confirmation NFT trading experience. It is also deployed on zkSync Era. Currently, its trading volume is slightly higher than Aspect, but it is also relatively early.  


图片


3.6 Game


3.6.1 cartridge.gg


StarkNet is a blockchain game integration platform similar to the Steam game store in Web2. On the one hand, Cartridge can help users screen blockchain games and interact with friends. On the other hand, as a blockchain game infrastructure, Cartridge can also combine DID, wallets, etc. to provide players with a richer on-chain experience.  


图片


3.6.2 Briq


Briq is a 3D block-based NFT-type chain game built on StarkNet, allowing anyone to build a separate virtual world storage chain. Users can use Briqs to build ERC-1155 standard NFTs and build chain games.


Currently, the total number of Briq NFTs minted is 119.11K, the number of holders is 98.43K, the floor price is about 0.12eth, and the total transaction volume is 98.57eth (2023.3.26).


图片


3.6.3 Influence


Influence is an immersive space strategy sandbox MMO with a project token of $SWAY. Players own exclusive asteroids and conduct mining, construction, trade, research, combat, etc. by manipulating crew members of different professions. At present, Influence has conducted three rounds of reward testing and is under active development. The release date has not yet been finalized.


Currently, the total transaction volume of Influence Asteroids assets is 1384eth, and the floor price is 0.0349eth (2023.3.26)  

Developed by the game studio Bibliotheca DAO, it is a large-scale multiplayer, on-chain composable strategy game ecosystem with a token of $LORDS. The gameplay is similar to Web2's military sandbox games, such as EVE and Rate of Land. Players need to build a sustainable economic system to produce resources, and also protect and compete for resources by building military forces.


The LootRealms game world consists of 8,000 Realms. The total transaction volume of Realms is 6,532 eth, and the floor price is 0.4799 eth (2023.3.26).


图片


Summary


StarkNet has taken a unique path in the Layer2 solution with its strong technical advantages and capital support. It fully stimulates the potential of validity proof through STARK+Cairo, and can handle a large number of transactions more easily than other solutions.


StarkNet has temporarily given up good EVM compatibility, but this also means that StarkNet can get rid of the constraints of the EVM framework, gain a more flexible development experience, and attract diverse developers.


In the long run, it has more potential to undertake the explosion of ecology, and will also bring diversified characteristics to the Ethereum ecology. At present, the ecology of StarkNet has taken shape, but it is still in its early stages, which is also a good opportunity for users to enter the market.  


Original link



Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

This platform has fully integrated the Farcaster protocol. If you have a Farcaster account, you canLogin to comment
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit