With @arbitrum Nitro going live last month and @zksync's zkEVM is expected next month, #Ethereum#L222s are getting better, faster, cheaper!
Which begs the question(s)...
How low can tx fees go?
And what are the actual points in a rollup tx that incur a cost?
thread time...
We'll discuss:
-What actually incurs a cost?
- What steps in a L2 tx cost the most?
- Does it vary for ORS vs ZKRs?
- What costs are fixed vs variable?
- Who's doing it best? @ryanberckmans
So what ARE we paying for? And what steps?
One portion is the transaction execution (L2 fees): executing and batching transactions together, as a Sequencer does, costs compute power and real resources.
@iam_preethi 2nd is settlement/state transitions: the cost associated with settlement (i.e., updating account balances across all nodes when Alice sends 1 ETH to Bob)
3rd is Data availability (DA): Ensures all relevant transactional data is available to anyone. Super impt!
DA is critical because it lets anyone verify the data for themselves.
Additionally, as long as all of the execution data is made available on the mainnet, the chain doesn’t require every node to execute every tx to validate txs and reach consensus. @CannnGurel
Because rollups can cryptographically guarantee (via a proof) that the transactions are valid, these transactions can now be executed by just a single node and posted to the L1 where it can be cross-checked by L1 nodes.
Additionally, the data within a batch is highly compressed prior to being submitted to the L1, further decreasing the resource burden.
This is how rollups help trustlessly scale a blockchain without requiring an increase in node resources. @azcoinnews
However, a rollup’s TPS is dependent on the data capacity of their L1 for throughput.
Once an L1 runs out of data capacity for the rollup, no additional txs can be processed.
The more DA on L1, the higher the (theoretical) throughput for rollups.
As @apolynya illustrates, L1 data fees (data availability costs) make up the majority of the current cost. However, EIP-4844 offers a solution and could bring this cost down by 10-50x!
First, gas cost to L1:
With Optimistic rollups, no computation is actually done, so it costs less than ZKRs.
ZKRs are more expensive (10-100x). When ZKRs submit a new batch, the validity proof must be verified, a computationally expensive process.
However, from a scalability perspective, ZKRs are more performant than ORs because they compress data more efficiently, meaning they have a smaller “batch size” when submitting to L1.
Second, Frequency:
ORs posts all tx data to the Ethereum L1 for every tx. This is the price they pay for the benefit of optimistically assuming txs are valid.
Image: tasks a single party can perform on an OR : either a computation of transaction data or a dispute
However, (some) ZKRs only post the state differences to L1.
ZKRs can do this because the state difference in combination with the validity proof is sufficient to validate the batch.
Because of this approach, ZKRs interact with L1 only ~20% as much as Optimism = Savings!
Therefore, on a gas cost/transaction basis, ORs are more expensive, thanks to the requirement of posting all the data to L1 for every transaction.
A lot of data and steps are needed in a frad proof scenario as @paradigm illustartes
SO, now, fixed vs. variable
What costs can't we avoid, and what can be improved?
Fixed costs are the rollup costs that must be paid, independent of how many txs are included in the batch.
Variable costs are the marginal costs that accumulate with each additional tx.
Fixed costs include:
State commitments
Validity proofs (ZKRs)
ZKRs have a larger fixed cost (10x) than ORs due to the validity proof.
What’s not fixed is the cost of the validity proof, which is determined by whether it uses a SNARK or STARK.
ETH SNARKS vs STARKS
SNARKs are cheaper, requiring ~500K – 1 million gas in the EVM, whereas STARKs cost ~1 million – 5 million gas depending on proof size.
Because ORs only require proofs in the event of a dispute, they aren’t subject to this cost.
Reducing the frequency of L1 interactions is one cost-saving method, but so, too, is batching more transactions into one block (the denominator in the image) to “socialize” the L1 calldata cost.
Maximizing the no. of txs in a block can cut tx fees by 70-90%!
As activity increases, the variable cost of tx data becomes the primary factor influencing rollup tx costs.
The rollup submits tx data to #ETH in the form of calldata, which costs 16 gas per byte.
However, the price per unit of gas varies based on the demand for block space.
This is because the marginal cost of adding additional txs to the batch is smaller than the average tx cost.
Note that the marginal cost consists solely of variable expenses, principally tx data, as fixed costs are shared across the entire batch and are paid regardless.
Rollups are the first type of blockchain that might incur positive network effects in terms of transaction costs (more tx, LESS cost per user??)
As it stands in Q3 2022—the early days of ZKR adoption—ZKRs have minimal activity when compared to their future ambitions.
Therefore, their ability to amortize the costs across many different users is limited.
Despite being extremely nascent, rollups are already significantly reducing fees for many Ethereum users.
- What is it?
- How is it different?
- What are the tradeoffs? ( bc remember EVERYTHING is a tradeoff)
- Should you care?
- and a little $ARBI airdop juice
Arbitrum is an optimistic rollup (OP) L2 built by @OffchainLabs.
The currently-live implementation is called Arbitrum One and is the most successful rollup to date (measured by TVL).
While both are Optimistic rollups, Arbitrum has some key differences from its counterpart, Optimism.
@optimismFND#OVM 2.0 is EVM-equivalent, running directly inside the #EVM, while Arbitrum One is only EMV-compatible.
At a high level, there are three entities involved in a rollup transaction:
- the user on the rollup
- the rollup operator
- #Ethereum L1.
The rollup operator that sits in between the user and mainnet has tremendous responsibility and also some power.
Within this framework, there are also three crucial actors in the collection, execution, and finalization of a ZKR block:
- sequencers
- provers
- validators (verifier)
Is the looming $XRP-SEC settlement the end of an epic battle or just the beginning?
With a decision possibly coming as soon as this year, #crypto needs to be prepared for any outcome.
Let's do a quick review and then look ahead..... 🧵
Gary Gensler, Chairman of the #SEC, has repeatedly been on the record that he believes most cryptocurrencies outside of #Bitcoin are securities.
In September, Gensler was quoted, “the nearly 10,000 tokens in the crypto market, I believe the vast majority are securities…
the investing public is buying or selling crypto security tokens because they’re expecting profits derived from the efforts of others in a common enterprise.”
While the SEC has levied successful lawsuits against several minor crypto projects from the 2017 #ICO days...
Ethereum just moved to #PoS but #Avalanche and its C-Chain have been PoS for ~2 years. So, what's the big deal?
How does $AVAX PoS work?
How does its consensus algo differ from what ETH just implemented?
And can #Avalanche truly have a million+ validators one day??
The Avalanche network doesn’t use just one consensus mechanism but rather a collection of consensus protocols.
What is the Primary Network?
A three-chain (X, P, and C) system that segregates the work done by the overall network.
This enables more efficient use of network resources & the ability to process more txs simultaneously.
Avalanche’s primary network consists of three governing blockchains with diff consensus algos: