5 min read
The Power of zk-STARKs: How StarkWare is Redefining Blockchain Transactions
Starkware is a technology company that develops cryptographic proof systems known as Zk-STARKs. These systems aim to be more scalable and transparent than existing proof systems while ensuring data integrity through lightweight hash functions. Starkware offers two main products: StarkNet and StarkEx. StarkNet is a decentralized, permissionless layer-two blockchain solution for the Ethereum mainnet. It reduces the load on the mainnet, improving its scalability and efficiency while retaining the security features of Ethereum. StarkEx, on the other hand, is a layer-two scaling solution for DeFi trading applications that provides flexibility and customization through three data availability modes. It is programmed using the Cairo language and leverages SHARP technology for reduced gas fees.
Zk-STARKs, a technology developed by Starkware, are cryptographic proof systems designed to be more scalable and transparent than other existing proof systems. They leverage lightweight hash functions to ensure the computational integrity of data without requiring the need to trust a third party.
Starkware, like zkSync and optimistic rollup, groups transactions into batches and verifies their validity using cryptographic proof. The company is focusing on developing two primary products: StarkNet and StarkEx.
What is StarkNet?
StarkNet is a layer-two blockchain solution developed by Starkware that operates on Ethereum. Starknet is a decentralized, permissionless network that leverages the security and composability of Ethereum while allowing for scalability through zk-rollups.
StarkNet processes transactions and aggregates the transaction data into batches like other layer-two solutions. These batches are then transmitted to the Ethereum mainnet, and the validity of the transactions is verified using STARK (Scalable Transparent ARguments of Knowledge) proofs.
Thanks to its compatibility with the Ethereum Virtual Machine (EVM), StarkNet can benefit from its robust security features of Ethereum while also providing faster and more efficient transaction processing. Furthermore, by executing transactions off the main Ethereum network, StarkNet reduces the load on the mainnet, thereby improving its scalability.
What is Starkex?
StarkEx is a layer-two scaling solution developed by Starkware specifically designed for DeFi trading applications such as DeversiFi, and Immutable X.
Unlike StarkNet, a decentralized, permissionless layer-two blockchain, StarkEx is a permission solution that is tailored to be used by specific protocols.
StarkEx offers a choice of three data availability modes: zkRollup, Validium, and Volition. In the zkRollup mode, DApps can roll up their data on-chain, while in the Validium mode, the data is processed off-chain. Finally, the Volition mode offers a hybrid of the two, giving DApps the flexibility to choose the mode that best suits their needs.
For example, dYdX relies on the zkRollup mode to provide fast and cheap transactions for its traders, while DeversiFi, Immutable X, and Sorare utilize the Validium mode.
The programming language used by Starkware products, Cairo, enables the development of these flexible and highly customizable layer-two solutions. In addition, StarkEx leverages Shared Prover (SHARP) technology, which allows sharing gas costs between transactions within a batch. This results in significantly reduced gas fees on the Starkware network.
ZKsync vs Starknet
zkSync and StarkNet are layer-two scaling solutions for the Ethereum blockchain that utilize the technology of ZK-rollups. zkSync V1 was first introduced to the Ethereum Mainnet by MatterLabs in June 2020 and is based on SNARK-proof technology, and this was later followed by the release of zkSync V2. The first EVM-compatible ZK-rollup launched on the Ethereum Testnet in February 2022.
On the other hand, StarkNet is a STARK-proof roll-up protocol launched on the Ethereum Testnet in November 2021 by StarkWare Ltd. The protocol in its Alpha version 0.4.0 was released in the same month on the Ethereum Mainnet. The main difference between the two protocols lies in their use of different ZK-proof systems, with zkSync using SNARKs and StarkNet using STARKs.
Both zkSync and StarkNet aim to provide a scalable solution to the Ethereum blockchain by using ZK-rollups to bundle multiple transactions into a single, efficient transaction. This significantly reduces the data stored on the Ethereum blockchain, making it possible to handle more significant transactions without sacrificing security or decentralization.
SNARKS vs. STARKS
One key difference between zkSync and StarkNet is their type of proofing protocol, SNARKs, and STARKs. SNARKs (Succinct Non-Interactive Argument of Knowledge) and STARKs (Scalable Transparent ARguments of Knowledge) have different properties that make them suitable for other use cases.
SNARKs require a trusted setup phase where a small group of developers must be authorized not to manipulate code or divulge vulnerability information. This setup only needs to be done once and is not a significant security risk but undermines the system's decentralization. On the other hand, STARKs use publicly verifiable randomness to create verifiable trustless systems, removing the need for a trusted setup. STARKs are also quantum-resistant, whereas a quantum computer attack can cryptographically crack SNARKs.
Regarding transaction handling, zkSync prioritizes speed and scalability by aggregating many transactions into a single proof, leading to faster transaction times and lower costs. However, this aggregation also reduces transparency, making it harder to see each transaction within the proof. StarkNet, on the other hand, uses STARKs to maintain a high degree of transparency, allowing for the complete history of all transactions to be audited, which is helpful for decentralized exchanges and financial applications. Unfortunately, this transparency comes at the cost of reduced scalability, as individual transactions must be verified separately, leading to slower transaction times and higher costs.
Regarding security, zkSync uses a light client approach, relying on a trusted relay to verify transactions, reducing the cost and complexity of running a full node. However, this approach also increases the risk of a malicious relay compromising the system. StarkNet, on the other hand, uses STARKs to maintain total security with no reliance on a trusted relay, reducing the risk of a malicious relay compromising the system but increasing the cost and complexity of running a full node.
As ZK-rollup protocols, zkSync and StarkNet have different approaches regarding compatibility with the Ethereum Virtual Machine (EVM) and its associated programming languages.
zkSync V2 is claimed to be 99% compatible with the Solidity and Vyper programming languages used on the Ethereum network. However, to be used with zkSync V2, Solidity and Vyper code must first be compiled to Yul, an intermediate language, and then down to zkEVM bytecode through LLVM. zkSync also supports Zinc, a ZKP-optimized Rust-like language that compiles directly to bytecode using LLVM. However, Zinc needs to be Turing complete, and its development has been halted since September 2021 to focus on improving Solidity compatibility.
StarkNet, on the other hand, still needs to be compatible with the EVM and its associated programming languages. To deploy smart contracts on StarkNet, developers must learn Cairo, a programming language built explicitly for STARK provable programs by StarkWare. Alternatively, developers can convert their Solidity code to Cairo using Warp, a transpiler developed by NetherindEth. However, several Solidity features still need to be supported by the transpiler and are far from matching the EVM compatibility of zkSync V2.
zkSync and StarkNet are layer-two scaling solutions for the Ethereum blockchain that use ZK-rollups to bundle transactions and increase scalability. The main difference between the two protocols is the type of ZK proof they use, with zkSync using SNARKs and StarkNet using STARKs. SNARKs prioritize speed and scalability, but reduce transparency, while STARKs maintain transparency at the cost of reduced scalability. Both protocols offer different trade-offs between security, transparency, scalability, and complexity, making them suitable for other use cases.
Join the Flagship community and secure your financial future with the guidance of our Captain Crunch.
Disclaimer: Nothing on this site should be construed as a financial investment recommendation. It’s important to understand that investing is a high-risk activity. Investments expose money to potential loss.