1/ @VitalikButerin provided some theoretical estimates of what fixed and variable gas costs might be for rollups.

How do theoretical estimates compare to the actual costs?

I checked and got some surprising results 👇
2/ Rollups work by batching transaction data and periodically posting them back to L1.

Their L1 gas costs for this can be broken down into two buckets:
1. Fixed gas cost per batch
2. Variable gas cost per transaction
3/ First I looked at @optimismFND, and arrived at the following cost breakdown on the network today.

- 280k fixed gas per batch
- 3,300 gas per tx
4/ The fixed batch cost of 280k gas is significantly higher than Vitalik estimated in his article on rollups: vitalik.ca/general/2021/0…

He estimated only 40K of gas per batch for optimistic rollups.
5/ I got even higher batch costs when I looked at @arbitrum, which were around 375k gas per batch.

This is 10x the cost estimated by Vitalik.
6/ Significantly lower batch costs are cited as one of the pros of optimistic vs zk rollups. This data suggests it may not be as big an edge as initially thought.
7/ I also looked at @zksync to get a data point from a zk rollup. Here are the results I got for zkSync 1.0.

- 800k gas per batch
- 600 gas per tx
8/ The batch costs are in line with what Vitalik estimated (he estimated 500k of gas / batch)

However I was surprised by the variable cost of 600 gas / tx
9/ ZK rollups should be able to fit tx data into just a few bytes. @0xPolygonHermez notes that they will need only 14 bytes per transaction.

Since each byte of calldata costs 16 gas, this translates into 14x16 = 224 gas per tx.
10/ I'm curious as to why the zkSync numbers are higher at 600 gas per tx.

One possible explanation is that zkSync 1.0 isn't fully optimized, and zkSync 2.0 will have lower calldata costs.
11/ Here is a link to a Dune Analytics dashboard that I created which has these charts:
dune.com/sanjaypshah/op…
12/ Follow me @sanjaypshah for more threads on rollups and modular blockchains.

Retweet the first tweet (linked below) so this can make its way to the right people at @optimismFND, @arbitrum, and @zksync who can hopefully provide additional clarity.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Sanjay Shah ⚡️

Sanjay Shah ⚡️ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @sanjaypshah

Jul 7
1/ ELI5: The argument for why Solana will eventually become a rollup on Ethereum (or other base layer). 🧵 👇
2/ Let's first start with a basic fact. The market cap of any L1 token MUST go up for that network to be secure in the long term. The more it goes up, the more secure the network is.
3/ This is because the security of a PoS chain is directly tied to the market cap of its token.

Example: It's much more expensive to accumulate enough SOL to attack the network if its market cap is $1T than if its market cap is $1B.
Read 29 tweets
Jun 2
1/ Modular blockchains promise to finally bring scalability to crypto. They also enable many types of rollup configurations, which can be a bit confusing to understand.

Let's dive into understanding the different types of rollup configurations that are possible.👇
2/ There are three different types of rollups that are enabled in a modular blockchain stack:

1. Secured rollups
2. Sovereign rollups
3. Settlement rollups

This diagram lays out the different rollup types and which functions are performed on which layers. Image
3/ The chart above is a modified form of a diagram originally created by @CelestiaOrg. The original chart can be found here: shorturl.at/gtHIW

In addition to pure rollups, the modular stack also enables validiums (and volitions), which I'll cover in another thread later.
Read 19 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(