StarkWare explained: Layer 2 solution provider of dYdX and iMMUTABLE

Overview of StarkWare

StarkWare mainly solves the scalability and privacy of the blockchain. StarkWare has developed a complete solution that uses STARK technology to form Volition through zk-Rollups and Validium modes to generate and verify the proof of computational integrity. StarkWare’s cryptography proof can achieve zero-knowledge, simplicity, transparency and post-quantum security. The main products developed by StarkWare are: StarkNet, StarkEx, Cairo.

Features

  • Scalability
  • Privacy
  • User experience

Milestones

2018: STARK white paper released, Ethereum Foundation Grant

iMMUTABLE with StarkWare

iMMUTABLE is the first Layer 2 NFT trading platform. Tik Tok cooperated with iMMUTABLE in September and released a series of NFTs.

Why StarkWare application so fast?

StarkWare’s Prover has various mathematical optimizations and some optimization algorithms proposed by StarkWare. At the same time, the Cairo language used for development has specialized mathematical optimizations. In addition, before the interactive data is sent to Prover, the StarkEx engine will be used to coordinate the data to be proven and batch processing. The entire operation process has been optimized for full coverage. The specific details will be discussed in detail later.

How decentralized is StarkWare application?

The consensus on StarkWare’s StarkNet is zk-STARK. zk-Rollups is not necessarily decentralized and not definitely has no access restrictions. However, the zk-STARK used by StarkWare has no access restrictions, just like Ethereum and other public chains. In some endpoints of the application made by StarkWare, there will be some centralized servers to provide services. But this is necessary and cannot be removed in the development of a complete application. Just like uniswap must have a centralized domain name and front-end page. So StarkWare’s dYdX, StarkNet, etc. are still decentralized.

zkSync vs StarkWare

At present, StarkWare is ahead of zkSync in terms of performance and current operating conditions. The biggest difference between zkSync and StarkWare is the design philosophy. The zkSync project is open source, and the team says it doesn’t matter if it’s replaced, as long as it can boost the development of the community and Ethereum. StarkWare is a toB centralized company. The STARK prover can only be used by StarkWare at present, and the language of Cairo is actually not so beneficial to the Ethereum ecosystem (a developers-friendly approach should be the same as zkSync or Optimistic to do EVM compatibility).

zk-Rollups and STARK proof

  • The technology used by StarkWare includes zk-Rollups and zk-STARK. The two are not the same thing. STARK is zk-STARK, which is a kind of zero-knowledge proof.
  • StarkWare tends to call its solution Validity Rollups, because zk-Rollups is not necessarily used in the solution. Validity Rollups includes Validium and zk-Rollups. The difference between the two is whether user data is on the chain.
  • https://immutablex.medium.com/eli5-nft-scaling-solutions-b1de4ad82461

zk-Rollups vs other L2 solutions

  • According to the strict definition, the vocabulary zk-Rollups used in many StarkWare documents does not necessarily adopt zero-knowledge proof. The correct description is Validity Proofs (including zk-Rollups and Validium, because StarkWare provides two modes). In order to avoid terminology changes to affect understanding. This article describes the related expressions as zk-Rollups in accordance with StarkWare’s documents.
  • https://twitter.com/EliBenSasson/status/1453260406357729288
  • Side-chain (Polygon or xDai)
  • State channel
  • Plasma
  • zk-Rollups

STARK vs other ZK

StarkNet

Overview

StarkNet is a decentralized L2 zk-Rollups that can be entered without permission and is resistant to censorship. It supports general computing on Ethereum. It is based on Turing’s complete Cairo language. Developers can build applications to implement App business logic and deploy on StarkNet; users can send transactions to StarkNet in the same way as normal Ethereum transactions for execution. StarkNet nodes and participants will be economically motivated to ensure the efficient and fair operation of the network.

Network Ecology

  • Programming language Cairo: Cairo is a Turing complete high-level programming language and framework that can be used to generate STARK proofs. Developers can use Cairo to define any business logic and send transactions to Shared Prover Service to verify the logic off-chain and verify on the chain. Cairo is suitable for production project development on the mainnet and is available for developers to use.
  • Off-chain verification service (Shared Prover Service): Before the transaction is put on the chain, the transaction will be sent to SHARP for verification, to determine the integrity of the application execution, and to calculate the gas cost for the shared proof verification.
  • Open source prover ethSTARK: ethSTARK provides zero-knowledge and post-quantum security signatures. ethSTARK processed 300,000 transactions in a proof on the mainnet, and the TPS reached 3000. The Rollup gas efficiency also broke the world record and reached 315 gas/tx, which is way much cheaper than performing transactions on Ethereum L1. This technology is the cornerstone of StarkNet’s decentralized proof layer.
  • Third-party projects: At present, the main third-party library is StarkNet.js. The role of StarkNet.js is similar to Web3.js, which is used when obtaining contract content on the front-end. The Ethereum client team is working on the full node implementation of StarkNet. At the same time, the current StarkNet network audit software includes CryptoExperts and LEAN proof.

Use Cases

  1. DeversiFi: Transaction TPS 9k, payment TPS 18k.
  2. iMMUTABLE: NFT minting gas 0.2 cents, daily L2 transaction> weekly L1 transaction.
  3. dYdX: Each transaction fee is reduced by 50 times.

StarkEx

Overview

  • StarkEx is similar to a low-level engine that composes components to support applications that use STARK.

Features

  • Scalability and computational integrity Applications can rely on StarkEx and the underlying STARK infrastructure to expand, while StarkEx ensures computational integrity. Through SHARP (Shared Proof) technology, gas costs are amortized equally in all StarkEx-based applications.
  • Diversified deployment modes StarkEx can deploy zk-Rollups mode (publishing data on the chain) or Validium mode (validating data availability through the side chain). There is also an upcoming mode: Volition, which allows users to choose the data availability mode for themselves.
  • Wallet integration StarkWare provides local support through Ledger, Authereum and WalletConnect. StarkWare also provides MetaMask integration through Web3-compatible key generation (for many other existing wallets).

Architecture and business logic

  • The application in the leftmost yellow box — — operate the entire application
  • StarkEx service in the light blue box — — batch processing and coordination
  • SHARP — — Shared prover (specially customized by StarkWare for application)
  • StarkEx contract (Verifier contract) — — status updates, deposits and withdrawals
  1. Processing the request The StarkWare application in the light blue box processes customer requests, converts these transactions into provable statements, and sends these to the SHARP in the dark blue box. All requests are sent and processed through the first step in the figure API and the batch statement sending in the second step (a batch can compile multiple requests).
  2. SHARP proof The dark blue SHARP box constructs proof.
  3. Register the proofs SHARP transmits the proof to the on-chain verifier smart contract in the third step in the pink box.
  4. Registrated status transited In the fourth step, the StarkWare application performs application state transition on the Starkswap smart contract. In the fifth step, to ensure the validity of the conversion (SHARP verification), Starkswap’s smart contract confirms that the conversion statement has been registered in the Verifier smart contract.

Function and encryption algorithm

https://docs.starkware.co/starkex-v3/crypto/stark-curve

  • Off-chain status:
  • Flow Description:
  • specific concepts for StarkEx:
  • Encryption Algorithm:

Cairo

Overview

Cairo is the first production-level platform to generate STARK proofs. It is Turing complete and very efficient. To deploy high-performance and low-gas-cost Layer 2 application components on StarkNet, you need to use Cairo to write applications. Cairo language is not a specialized contract language, but it can and is mainly used to write contract-like content.

Features

  • Computational completeness
  • AIR (algebraic intermediate representation)
  • Language design
  • Tool chain

Language ecosystem

At present, the ecosystem of the Cairo language can be said to be very comprehensive but young. It has everything in terms of tool chains. According to the number of GitHub stars of these tools, it can be judged that it has not received much attention, but the developers of the repo are constantly updating, basically in one or two weeks there will be new updates. In the future, the Cairo language will be more open-source. After more developers are comfortable with Cairo language, writing Cairo code on the StarkEx engine is likely to be handed over from StarkWare to open source developers, which will help grow StarkWare applications. Decentralization of StarkWare will make a lot of sense.

Conclusion

As a Layer 2 solution provider, StarkWare has made popular products such as dYdX and iMMUTABLE. Among various solutions, StarkWare’s zk-STARK technology supports the largest number of transactions on Layer 2. From prover’s mathematical optimization, The mathematical optimization of the Cairo language, to the proof coordination of the StarkEx engine, StarkNet, as a decentralized zk-STARK network, provides extremely high performance and optimizes the complete operation process. StarkWare uses cutting-edge technology and complete technical supports, reaching the huge transaction volume of Layer 2 applications. What’s more, StarkWare will definitely embrace open source in the future, achieve complete decentralization, and help the construction of Ethereum 2.0.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
BitKeep

BitKeep

BitKeep is your decentralized wallet. Providing a one-stop destination for DApps, the BitKeep Aggregate Exchange, Multichain support, Wealth Management and News