The advent of zero-knowledge proof based Ethereum rollups represents a significant advance in blockchain scalability and efficiency.
Over the past week, their ability to handle a spike in transaction volumes was tested by the fad-like phenomenon of inscriptions hitting several EVM-based networks in succession.
One aspect unique to zk rollups, such as zkSync, StarkNet, and Polygon’s zkEVM, is their ability to amortize the cost of generating proofs of validity for many transactions. Therefore, unlike many blockchains, they actually become cheaper to use as they grow in size.
read more: Zero-knowledge packages get cheaper as they get bigger
Inscriptions refer to various forms of data, usually token metadata or NFTs, that are written to blockchains in a way that can be more cost-effective than smart contracts because they require less gas.
Recently, there has been an increase in the use of inscriptions on various networks – not only Ethereum layer-2s but also Avalanche and Solana – mainly for speculative trading of low-value assets. This trend has led to network congestion and operational disruptions, leaving protocol developers busy finding ways to mitigate its impact.
In some cases these disruptions were serious. For example, Avalanche’s EVM-enabled C-chain saw transaction costs increase tenfold as inscriptions briefly accounted for more than 30% of all gas consumed.
Percentage of gas attributable to inscriptions, Avalanche in red. Source: Hildobby | Dune analysis
ZK magic
To understand why proof costs for zk rollups decrease as transaction volumes increase, it is critical to delve into how zero-knowledge proofs work and the architecture of these rollups.
Zk rollups use cryptographic methods, such as ZK-STARKs (Zero-Knowledge Scalable Transparent Argument of Knowledge), to validate off-chain transactions before sending them in batches to the Ethereum mainnet.
This batching reduces the number of transactions that need to be processed in the chain, significantly reducing gas costs. As the number of transactions in a batch increases, the cost per transaction decreases, demonstrating economies of scale.
ZkSync Era, currently the largest aggregation by total value locked (TVL), on December 4 upgraded its original SNARK-based prover to one based on STARK proofs, called Boojum. It can theoretically process 2,000 transactions per second (TPS) – although in practice less than a tenth of that is seen. For reference, the Ethereum mainnet averages around 15 TPS.
The optimistic roll-up Arbitrum, which delivered a mainnet launch in 2021, has by far the most TVL at $2.4 billion.
Both networks were hit with a boom in sign-ups within days of each other – accounting for around 60% of all last week’s transactions on the pair.
The phenomenon provided a real-world experiment in scaling Ethereum.
So what happened?
Both suffered from downtime, but transaction fees on Arbitrum soared while zkSync’s fell.
Comparison of transaction costs between zkSync and optimistic rollups. Source: growepie.xyz
The cost of using zkSync has been on a clear downward trend since the Boojum upgrade was completed earlier this month. The network currently has the lowest transaction fees of all layer 2 networks, competing with the fees users pay for optimistic rollups.
But the response to strong demand underlines the effectiveness of zero-knowledge rollups in scaling Ethereum’s throughput.
By compressing data and processing transactions in batches, many more transactions can fit into a single proof to be verified on the Ethereum mainnet.
4/ The minimum bytes per tx we observed was ~10 bytes during the inscription craze. @zksync was packing 5000-7000 transactions into a single L1 tx.
Look at the demand: anything over 5000 transactions in an L1 tx sees INSANELY amortized bytes per tx. pic.twitter.com/pa0FcnlDpv
— taetaehoho (@0xtaehoho) December 19, 2023
A researcher at venture firm 1kx, known as 0xtaetaehoho, noted on
Lesson learned
However, the traffic did cause issues for zkSync’s RPC services and block explorer, prompting Matter Labs to post an extensive lessons learned thread.
“This weekend served as a major stress test and a major milestone on the path to bringing Ethereum to the next billion people,” the developers said.
“For almost 14 hours, the network handled ~150 TPS – with a peak of 187 TPS – with an average [transaction] cost of ~$0.12.”
Other Ethereum scaling solutions, such as Polygon’s POS chain, were also able to handle the additional traffic well, even at much higher volumes.
According to Polygon founder Sandeep Nailwal, the network recorded 18 million transactions per day, while gas fees reached a maximum of the MATIC equivalent of $0.10, which he called “the result of months of efforts in EVM parallelization (BlockSTM) and multiple other hard forks that resulted in reduced reorgs and improved performance.”
Polygon’s zkEVM has not yet seen a significant increase in inscription-related traffic, but technical lead Jordi Baylina told Blockworks that the reduction in proof costs in recent months means this is “not the limiting factor for transactions”.
“If you the [proof] costs related to data availability for example, or even the cumulative fee for recording the transaction, are much, much lower,” he said.
Marco Cora, head of business development at Matter Labs, sees a future of “a bit of chaos and disintegration, a lot of experimentation, but one in which the best technical solutions will emerge.
“Everyone is doing a fantastic job – all our ‘competitors’ are actually super commendable,” Cora told Blockworks. “In the end, we’ll all figure out what’s best, and that’s where we’ll all come together.”
One thing Cora says there is no doubt about is that zero-knowledge technology is the future.
“Pretty much everyone seems to agree… Optimism has said it very explicitly, and Arbitrum has said it implicitly, I think, now that they’re looking at it,” he said.