[Research] The Ultimate Guide of Scroll and Zero-Knowledge Technology (ZK)
June 21st, 2024

Defining ZK

Before we start, let’s briefly look into the main glossaries around Zero-Knowledge Technology (ZK) and the relationships between ZKPs, ZK Rollups, zkEVM, and zkSNARK.

The technologies of ZKPs, ZK Rollups, zkEVM, and zkSNARK are interconnected, each building upon the foundational principles of zero-knowledge proofs to enhance blockchain scalability, security, and privacy.

  • ZKPs: Zero-Knowledge Proofs are the foundational cryptographic method that allows one party to prove the validity of a statement without revealing the underlying information. They form the basis for advanced privacy and security mechanisms in blockchain technology.

  • ZK Rollups: ZK Rollups utilize ZKPs to improve blockchain scalability. By bundling multiple transactions into a single batch and executing them off-chain, ZK Rollups only post a cryptographic proof (generated using ZKPs) back to the main blockchain. This reduces the data load on the blockchain, enabling higher throughput and lower transaction costs while maintaining security and decentralization.

  • zkEVM: The zkEVM (Zero-Knowledge Ethereum Virtual Machine) is an implementation that adapts the Ethereum Virtual Machine to work with zero-knowledge proofs. It leverages ZKPs to validate transactions and smart contract executions off-chain while ensuring that they can be verified on-chain. This compatibility with existing Ethereum infrastructure allows for scalable and secure execution of smart contracts in a ZK Rollup environment.

  • zkSNARK: zkSNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) is a specific type of zero-knowledge proof used within ZK Rollups and zkEVMs. zkSNARKs provide efficient and non-interactive verification of proofs, making them ideal for use in ZK Rollups to validate batches of transactions. They ensure that the proofs can be quickly verified on-chain without needing interaction between the prover and verifier, which is crucial for maintaining scalability and efficiency in blockchain networks.

We will delve deep into each one of them in this article.

What is Scroll

Scroll is a zkRollup designed to scale Ethereum while maintaining EVM-equivalence. Built on two primary components—zkEVM and a complete Layer 2 architecture—Scroll aims to prove the correctness of EVM execution in L2 and integrate it seamlessly with Ethereum.

Architecture and Workflow

Scroll's architecture consists of three main components and each plays a crucial role in the operation and security of the system:

  1. Scroll Noder5

  2. Roller Network

  3. Rollup and Bridge Contracts

Untitled
Untitled

Scroll Node

The Scroll Node is the primary interface for applications and users to interact with Scroll. It comprises three modules:

  1. Sequencer: This module accepts L2 transactions via a JSON-RPC interface, batches them, and generates new L2 blocks. It is based on the Go-Ethereum (Geth) implementation for compatibility and security.

  2. Coordinator: Once a block is generated, the Coordinator dispatches the execution trace to a randomly selected Roller for proof generation.

  3. Relayer: It monitors the rollup and bridge contracts on Ethereum and Scroll, tracking L2 block status and relaying deposit and withdrawal events between L1 and L2.

Roller Network

The Roller Network generates zkEVM validity proofs to confirm the correct execution of transactions. The process involves:

  1. Converting the execution trace to circuit witnesses.

  2. Generating proofs for each zkEVM circuit.

  3. Aggregating these proofs into a single block proof.

Rollers use hardware accelerators like GPUs, FPGAs, and ASICs to enhance efficiency and reduce costs.

Untitled
Untitled

(Source: https://scroll.io/blog/architecture)

Rollup and Bridge Contracts

These smart contracts connect Scroll to Ethereum's base layer, ensuring data availability and enabling asset transfers between L1 and L2. The Rollup contract stores state roots and block data, leveraging Ethereum's security. The Bridge contracts facilitate message passing and trustless ERC-20 asset bridging.

Workflow of Scroll's ZK Rollup

Scroll's workflow involves generating, committing, and finalizing L2 blocks through a multi-step process:

  1. Block Generation: The Sequencer creates a sequence of blocks, generates execution traces, and submits transaction data to the Rollup contract for data availability.

  2. Proof Generation: The Coordinator assigns a Roller to generate a validity proof for each block. Proofs are generated in parallel to expedite the process.

  3. Aggregation and Finalization: Block proofs are aggregated into a single proof, which the Coordinator submits to the Rollup contract. This finalizes the blocks by verifying the aggregate proof against the state roots and transaction data.

L2 blocks progress through three stages before finalization:

  1. Precommitted: Blocks are proposed by the Sequencer and sent to Rollers but are not yet canonical.

  2. Committed: Transaction data is posted on Ethereum, ensuring block data availability.

  3. Finalized: Validity proofs are verified on-chain, making blocks canonical parts of the Scroll L2 chain.

Untitled
Untitled

How Scroll Empowers zkEVM

Scroll stands out due to its high compatibility with Ethereum, enhancing its functionality with ZK technology to provide increased security and privacy protection. This compatibility is a cornerstone of Scroll's approach, enabling a seamless integration into the existing Ethereum ecosystem while offering advanced features.

About three years ago, the idea of creating a zkEVM equivalent to the EVM seemed almost unattainable. Despite the challenges and the perception that it was a crazy idea, the team persisted. Today, the successful launch of the zkEVM marks a significant milestone, proving that the once-distant goal is now a reality.

The introduction of Scroll's zkEVM is a pivotal event in the Ethereum ecosystem. It provides a highly compatible, efficient, and long-term Layer 2 scaling solution. The EVM equivalence ensures that it can be seamlessly integrated into the existing Ethereum infrastructure, simplifying development and adoption processes for developers and users alike.

Scroll’s team envisions the zkEVM as a sustainable, long-term solution. In contrast, Optimistic Rollup is seen as a more temporary or short-term technological fix. Toghrul predicts a gradual shift from Optimistic Rollup to zk Rollup over time, as the latter offers more advantages in terms of security and efficiency.

Long-term Vision

Scroll’s team envisions the zkEVM as a sustainable, long-term solution. In contrast, Optimistic Rollup is seen as a more temporary or short-term technological fix. Toghrul predicts a gradual shift from Optimistic Rollup to ZK Rollup over time, as the latter offers more advantages in terms of security and efficiency.

Developer and User-Friendliness

A notable feature of Scroll is its developer and user-friendly approach. The EVM equivalence allows Scroll to leverage Ethereum's extensive resources, including documentation, tutorials, and open-source code. This facilitates faster and more efficient development and innovation, without requiring developers to start from scratch or learn new programming languages or paradigms.

Seamless Transition and High Compatibility

Scroll’s zkEVM offers developers an easy-to-migrate platform due to its high compatibility with Ethereum. The reuse of significant portions of Ethereum’s code and tools ensures application and infrastructure compatibility. This makes transitioning from Ethereum to Scroll a smooth, simple, and secure process for developers.

Launch and Community Feedback

The launch of Scroll mainnet marks a new beginning, providing substantial feedback and improvement opportunities. Sandy noted the team's significant effort in reaching this milestone. The Scroll team looks forward to receiving feedback from the community and developers to iterate and enhance the zkEVM.

Why Scroll Chooses ZK?

ZK Rollup vs Optimistic Rollup

Advantages of ZK Rollup

  • Faster Transaction Confirmation: ZK Rollup uses zero-knowledge proofs to verify transactions. Once the proof is calculated and verified, transactions are immediately confirmed, eliminating the need to wait for potential fraud proofs, significantly speeding up transaction processing.

  • Quicker Finality: ZK Rollup can achieve finality in minutes without relying on challenge windows to verify transaction validity, benefiting applications and users needing quick transaction confirmations.

  • Lower Fees: Due to the efficiency of ZK Rollup, transaction fees may be lower, benefiting market makers and end-users.

  • Faster Cross-Chain Interaction: ZK Rollup allows faster cross-chain messaging and interactions, especially from L2 to L1.

Limitations of Optimistic Rollup

  • Challenge Window: Optimistic Rollup requires a challenge window to allow others to prove transactions are invalid, usually taking several days.

  • Exit Delay: ZK Rollup allows faster exits, typically within 30 minutes, whereas Optimistic Rollup may take a week.

User Experience

  • ZK Rollup: Most users may not notice the difference between ZK Rollup and Optimistic Rollup unless they try to exit from L2 to L1. However, as the scale and throughput of Layer 2 increases, the advantages of ZK Rollup will become more apparent.

  • Optimistic Rollup: Despite offering L2 scaling, the challenge window and slower exit times may affect user experience.

Potential and Applications of ZK Rollup

  • Efficiency and Performance: ZK proofs enable faster and more efficient transaction verification and processing, improving overall network efficiency and performance without revealing any sensitive information.

  • Privacy: ZK proofs offer enhanced privacy protection, allowing users to prove ownership of information or meeting certain conditions without disclosing the actual information, crucial for safeguarding user privacy and data security.

  • Scalability: ZK proofs are key to blockchain scalability, significantly increasing throughput and scale while maintaining security and decentralization through technologies like ZK Rollups.

  • Interoperability: ZK proofs facilitate interoperability between different blockchains and layers, securely and efficiently transferring and verifying data across chains and layers, enhancing the interconnectedness of the crypto ecosystem.

  • Security: ZK proofs provide a mechanism to verify data correctness without disclosing details, protecting privacy, and enhancing system security, reducing the risk of fraud and attacks.

Specific Use Cases

  • Supply Chains: ZKPs enhance supply chain transparency by verifying product authenticity without revealing sensitive information. Manufacturers can prove the legitimacy of their products using cryptographic techniques, ensuring trust and efficiency. For example, a clothing manufacturer can verify the origin of organic cotton using ZKPs without disclosing farm locations or processing methods. This approach fosters confidence in product integrity, improves verification efficiency, and maintains confidentiality.

  • Decentralized Identity: ZKPs can verify an individual's identity without disclosing personal information, granting users control over their data. Instead of providing details like names or passport numbers, users can prove they meet criteria, such as citizenship, using decentralized identity protocols. This method enhances privacy, reduces identity theft risks, and lessens organizational data security burdens.

  • Privacy-Preserving Transactions: ZKPs enable blockchain transactions to be validated without revealing transaction details, maintaining user privacy. By posting validity proofs instead of transaction data, ZKPs obscure addresses and amounts from the public ledger. This privacy is vital in oppressive regimes and for protecting financial details, preventing fraud, and allowing discreet charitable donations.

  • Secure and Scalable L2 Rollups: ZK Rollups improve blockchain scalability by offloading computation and state storage. They batch transactions and publish a zero-knowledge proof on the L1 blockchain, reducing congestion and costs. zkRollups offer faster finality than other L2 solutions, enabling immediate withdrawals and enhancing capital efficiency.

  • Voting Systems: ZKPs can secure voting processes, allowing individuals to vote without revealing their identity or choices. Traditional systems require identity verification and trust in administrators, but ZKP-based protocols enable voters to prove eligibility and verify their votes independently. This enhances election integrity and privacy.

  • Internet of Things (IoT): In IoT, ZKPs secure devices and protect user privacy by verifying software updates, ensuring authorized access, and enabling secure communication. By reducing data transmission and processing, ZKPs lower energy demands and improve device efficiency, making IoT implementations more robust and sustainable.

Deeper Look: How ZK Benefits Payment Applications

ZKPs allow parties to verify the authenticity of a statement without disclosing sensitive information, making them a powerful tool for financial services, particularly in addressing Know Your Customer (KYC) and Anti-Money Laundering (AML) compliance challenges.

Enhancing Security and Privacy

Traditional KYC and AML methods require sharing personal data, which is vulnerable to security threats. ZKPs, however, use mathematical proofs to validate identities and credentials without revealing specific details. This enables financial institutions to verify customer identities securely, reducing risks associated with data breaches and identity theft.

On-Chain vs. Off-Chain Implementation

A key decision in implementing ZKPs in payment systems is whether to use on-chain or off-chain solutions:

  • On-Chain ZKPs: Recording proofs on the blockchain ensures transparency and immutability, as all network participants can verify transactions. While this adds a layer of security, it can also lead to scalability issues and higher transaction fees due to increased blockchain load.

  • Off-Chain ZKPs: Conducting transactions off-chain enhances scalability and transaction speed by reducing the load on the main blockchain. This approach can lower transaction fees and improve efficiency, making it an attractive option for cost optimization.

Some payment systems use hybrid approaches, combining on-chain and off-chain solutions to balance transparency, privacy, speed, and cost. These models allow for flexibility and adaptability, tailoring systems to specific use cases and requirements.

Tradeoffs

On-chain transactions often incur higher fees due to computational and storage requirements, while off-chain solutions offer cost savings. Privacy is a critical concern, and off-chain ZKPs provide enhanced confidentiality by keeping transaction details off the public blockchain. However, regulatory compliance and traceability must also be considered, as off-chain transactions may raise concerns in some jurisdictions.

Scroll’s DeFi Heavy Ecosystem

WechatIMG435.png
WechatIMG435.png

According to L2Beat, Scroll is the 12th largest Layer 2 solution in Ethereum's scaling ecosystem, with a total value locked (TVL) exceeding $500 million. The platform's growth has been primarily driven by its burgeoning DeFi sector, which now encompasses approximately 50 applications. Overall, Scroll supports over 300 applications across various sectors, including infrastructure, community, gaming, NFT, privacy, social, tooling, and wallets.

Untitled
Untitled

(Source: https://defillama.com/chain/Scroll)

Highlights of Scroll’s Native DeFi Applications

Zada Finance

Zada Finance is a cross-Rollup Order Book DEX built on Scroll, leveraging Scroll's infrastructure for composability, low costs, and high speed. In 2023, Zada Finance transitioned from an AMM DEX to the first cross-rollup order book DEX on Scroll. It uses Scroll’s zkEVM technology to support advanced EVM equivalence, facilitating the integration of mature DeFi services on Ethereum. By employing zkRollup to aggregate transactions and compress data, Zada Finance significantly reduces gas fees and is exploring a Layer3 solution to further minimize costs. Additionally, it integrates Ethereum's security through zkRollup, ensuring a balance of security, efficiency, and decentralization.

Pencils Protocol

Pencils Protocol, a native comprehensive platform in the Scroll ecosystem, features basic LaunchPad functionalities and has implemented ZK-based KYC on the Scroll infrastructure, compatible with various IDO models such as English auction, Dutch auction, and BLP models. By undergoing multiple brand upgrades, Pencils Protocol is expanding beyond its initial LaunchPad platform to include Stake, Vault, and Shop sections, aiming to further develop into a multi-functional super Dapp.

Tranchess

Tranchess is a yield-enhancing asset tracker protocol offering varied risk-return solutions, inspired by the concept of tranche funds to cater to users' diverse risk appetites. First conceived in early 2020 and rapidly developed, Tranchess provides different risk/return matrices from a single main fund that tracks specific underlying assets like BTC, ETH, BNB, or a basket of crypto assets.

SynSwap

Launched in April 2022, SyncSwap is a DEX known for its minimalist UI, smooth user experience, and fast transaction speeds. SyncSwap aims to be a one-stop DeFi platform offering secure, cheap, and fast trading, leveraging the security of the Ethereum network. Its core product, the Multi-Pool DEX protocol, features multiple AMM algorithms, customizable fee structures, gas refunds, and smart routing to enhance user experience and efficiency.

Cog Finance

Cog Finance is an isolated lending platform on Scroll. Each pool in Cog Finance is exposed to only one type of collateral and one oracle, allowing users to manage their risk independently. This isolation ensures that issues in other pools do not affect the safety of a user's pool. As a lending platform, Cog Finance enables users to lend their assets, choose acceptable collateral, and earn yield with variable interest rates. It is also permissionless, allowing users to deploy pools for any asset without waiting for protocol maintainers, pending price feed deployments.

Rollie Finance

Rollie Finance is the first native perpetual DEX offering one of the most secure and cost-effective transaction experiences with the fastest finality among zkEVM Ethereum Layer 2 solutions. Leveraging Scroll's low gas fees, capital efficiency, transparency, and security, Rollie Finance provides a user-centric interface. It features a one-swipe AI trading system that integrates trading algorithms, AI analysis, and real-time on-chain data, simplifying the trading process for users.

Scroll’s Future

With the mainnet live, developers can start deploying their dApps, and users can bridge funds from Ethereum to Scroll through a public bridging UI. Scroll aims to simplify the dApp deployment process with a "copy, paste, and deploy" initiative, reducing friction and barriers for developers.

Scroll’s high compatibility with Ethereum makes it easy for developers to migrate existing dApps. Due to unique features and advantages, some applications might run exclusively on Scroll. As more applications are deployed, attracted by ZK Rollup’s benefits such as faster transaction confirmation and lower fees, Scroll plans to continue innovating and improving their platform to meet developer and user needs, focusing on enhancing performance, security, and usability.

Security is a priority, with Scroll exploring multi-signature and other measures to enhance platform security. They are also working on ensuring smart contract security and using multiple verifiers to enhance bridging security.

Unveiling Keystore: Integrating with Account Abstraction

At Safecon Berlin in May 2024, Scroll unveiled its latest product Keystore, a new on-chain wallet manager designed to simplify the management of smart wallets across various chains and rollups, addressing the issue of chain fragmentation.

Keystore Overview

Keystore acts as a unified wallet manager for smart wallets, enabling users to manage their signing keys and verification logic in one place. This feature enhances the on-chain experience by resolving the fragmentation problem where updates need to be made across multiple chains when keys are rotated or spending rules are changed.

Account Abstraction

Keystore leverages the concept of Account Abstraction (AA), which separates the signing key from the assets held in the account. This allows for advanced functionalities like transaction batching, custom spending rules, and social recovery, improving both security and user experience. A significant security benefit of AA is the ability to rotate keys without moving assets to a new wallet.

Cross-Chain Compatibility

Keystore supports not only EVM-compatible addresses but also non-EVM addresses, such as those from Solana or Cosmos, making it versatile for managing wallets across different blockchain ecosystems. During the demo at Safecon Berlin, Scroll showcased how a Safe on Scroll can keep its signers in sync with a corresponding Safe on Ethereum, utilizing Ethereum’s signing policy instead of having separate signers.

Hybrid Approach

The Keystore employs a hybrid approach, securely storing key data on Layer 1 while allowing updates from the user’s chosen Layer 2 to remain cost-effective. This approach facilitates easy reading by other chains and addresses scalability concerns.

Future Potential

Keystore represents a significant step towards addressing chain fragmentation and has the potential to support a wide range of cross-chain use cases beyond key management. The infrastructure developed for Keystore enables easy messaging between chains, which could unlock numerous cross-chain applications.

Scroll's Keystore is poised to enhance the functionality and user experience of smart wallets by providing a unified, secure, and efficient way to manage keys and verification logic across multiple chains. This innovation is expected to drive further developments in the blockchain ecosystem, making cross-chain interactions more seamless and efficient.

Reference

Disclaimer: This post is for general informational purposes only and does not constitute investment advice, recommendations, or a solicitation to buy or sell any securities. It should not be used as the basis for making any investment decision and should not be relied upon for accounting, legal, tax advice, or investment recommendations. You are encouraged to consult your own advisers regarding legal, business, tax, or other related matters concerning any investment decisions. Certain information included here may have been obtained from third-party sources, including portfolio companies of funds managed by Aquarius. The opinions expressed in this post are those of the authors and do not necessarily reflect the views of Aquarius or its affiliates. These opinions are subject to change without notice and may not be updated.

Subscribe to Aquarius
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.
More from Aquarius

Skeleton

Skeleton

Skeleton