A General-Purpose zk-Rollup
On the 10th of October, with an enigmatic message, Scroll announced the launch of its mainnet. I was not fully aware of it - aside from airdrop farming thread.
So I decided to dive into it!
Understanding Scroll
Scroll a scaling solution for Ethereum: a Layer 2 (L2) general-purpose zero knowledge (zk) rollup. Sounds like a lot of fancy words, let’s break them down.
As an L2 rollup on top of Ethereum, Scroll natively imports ETH security.
Beyond security, Scroll seamlessly integrates into the rich Ethereum ecosystem: the tooling, dApps, smart contracts, and the vast user base.
This approach allows these resources to be effortlessly transferred and used interchangeably, ensuring unparalleled EVM compatibility.
“for Users and Devs, Scroll is pretty much Ethereum”.
Until Scroll, there was no general-purpose zk rollup primarily due to the complexities in generating zk proofs for Ethereum Virtual Machine (EVM) computations.
In simpler terms, being a general-purpose rollup means having functional equivalence to an EVM.
Yet, successfully running an EVM environment on a zk rollup has been an elusive goal, until now. This is attributed to the intricacies of converting EVM transactions into logical circuits interpretable by zk proofs.
Despite these challenges, the quest for a general-purpose zk rollup continues.
Being EVM compatible is a big deal, as it drastically simplifies the efforts required by developers to transition to a new chain.
For instance, transitioning to a non-EVM chain means:
Having to migrate and rewrite existing contracts to the new rollup
Not being supported by existing EVM tooling (e.g. libraries, wallets, marketplaces, etc.)
Not being able to support applications from the Ethereum ecosystem
Many have taken on the task of a general-purpose zk EVM, with different levels of compatibility with regard to EVM:
Starknet and zkSync (language-level): these are currently specialized solutions that operate with their own custom virtual machines (Cairo VM). They run a custom VM and have created a compiler, the “Warp Transpiler”, which translates Solidity code into Cairo VM bytecode.
What they did was create a new VM and add Ethereum tooling support as an additional layer on top. This still fulfills the goal of making solidity contracts exportable to StarkNet and thus “EVM compatible”.
Although not a direct EVM execution, it retains compatibility, letting Solidity developers write code for their rollup.
When using these solutions:
You are not executing inside the EVM
You don’t have compatibility with other Ethereum interfaces
Solidity devs can write code that can be used on your rollup
A good compromise.
2. Polygon zk-EVM (bytecode level): runs a custom VM but has mapped all of the EVM opcodes into opcodes that are valid for their VM (“opcode-level equivalency”). Polygon’s approach is building a zkEVM that has “opcode-level equivalency. Compared to scroll, Polygon has an alternate runtime (the “zkExecutor”) which runs custom “zkASM’’ opcodes rather than EVM opcodes directly. This is done to optimize the EVM interpretation (as proving the EVM directly would have too many constraints).
Here’s a diagram of how the process looks behind the hood:
While this configuration is more performant than Scroll, it adds substantial custom code (to create zkASM), introduces possible requirements to modify code or tooling for compatibility, and could increasingly differ from Ethereum over time (e.g. gas pricing might be different, code base might increasingly differ)
3. Scroll (bytecode level): converts EVM execution directly into verifiable circuits, with benefits in terms of tooling support and compatibility.
Currently, Scroll does not support all of the EVM opcodes - but they are planning to eventually do so with time.
Most of what precedes has been sourced from a great explanation of the topic by Immutable.
How does Scroll Work (tech stack)?
Scroll is a zk rollup and has a smart contract on Eth L1, which is a zkEVm proof verifier able to verify whether the Scroll protocol is secure.
How do transactions work on Scroll?
Scroll is able to batch blocks, and write the block data on Ethereum.
Once the validity proof is generated at a later block, it is written on Ethereum.
As a result, blocks on Scroll can have three states:
Pre-committed: a block has been proposed by the sequencer and included in Scroll
Committed: the transaction data of the block has been posted on Ethereum (in the rollup contract of Scroll)
Finalized: the correct execution has been confirmed by a validity proof posted on-chain on Ethereum.
Transaction Workflow
Transactions coming in from a sequencer are bundled in a block (1)
Data and call data are committed to the rollup contract on L1 and the block is committed (D1)
Proof Generation: the information gets passed to the coordination (a “trace” of the work that’s been done” and then gets passed to a prover, which generates a zk proof
Proof generation can take several blocks and can be executed in parallel and passed off to different Provers
Aggregate proof generation: the proofs are generated and aggregated in batches, which will then be committed on-chain and verified (Verify)
Blocks are finalized
Transactions > Processed by nodes running a Geth fork > execution trace > fed into zkEVM circuit > produces proofs > fed into the aggregation showing that proofs are valid > generates aggregation proof > sent to L1 contract
Why Scroll?
Developer-Centric: offers bytecode equivalence to an EVM (compatibility with existing contracts and tooling)
Efficiency: create more secure blockspace for Ethereum, reducing gas fees
Speed: improved block time (3 sec. vs Ethereum 12 sec.)
Alignment: Alignment with Ethereum vision (Scroll team has also been contributing code to Ethereum privacy and scaling process)
Warming Up
Since its launch Scroll has accumulated a TVL of over $1.5m.
Over 1383 users have already bridged ETH on Scroll.
Over 975 ETH has been bridged to Scroll Mainnet, for a total of $1.5m.
Food for Thought
zk rollups are considered to be a superior design to their optimistic rollup counterparties, especially with regard to privacy — and lack of withdrawal delays due to the absence of fraud proofs.
As a general-purpose zk-rollup with bytecode compatibility Scroll promises the benefits of zk proofs on L2 without compromising the tooling and network effect of an EVM.
Full EVM compatibility is the holy grail of L2s and that’s the value proposition of Scroll: Ethereum on steroids. The bytecode compatibility of Scroll combines all the benefits of zk proofs with maximum compatibility with Ethereum.
In particular, Scroll does not focus on the “privacy” aspect of zk proofs, but focuses on the “synch” aspect of zk proofs, which allows the protocol to take a “bunch of computations and smash it down into a tiny proof”.
What’s also notable about Scroll is their commitment to decentralization. Although the initial phase will have a centralized sequencer, plans to decentralize it are in the pipeline.
Also, all of the zk proofs will eventually made by a decentralized network of “provers”.