Headline: ZK-rollups?  IDKY?

What is a Rollup in cryptocurrency?

Anybody out there hate doing math homework in grade school?   I did.   I developed a terrible habit of keeping my homework paper “clean” by using a piece of scrap paper to do the actual calculations with the attendant strikethroughs and other marks.  The result was that each problem would be either wrong or right, and it took me a while to understand the importance of “partial credit.”  I just thought it made the evaluation process faster and cleaner.   In a similar manner, there is a thought that an Ethereum transaction might be more efficiently validated off chain and then added to the main.   This is referred to as a “rollup.”

It is done because it is more efficient.   First, gas fees are much lower as rollups are one of the scaling systems, like sidechains and state channels.  These speed-ups are likely to be used as complements to the Merge, and the combination is supposed to make Ethereum blockchain much more attractive. 

I remember rollups in my lunchbox.  Are there different flavors of these rollups?

Yes, there are several different varieties of rollups.  There are 2 very important flavors, Optimistic and Zero Knowledge.   In an optimistic rollup, the transactions are verified (think of a very first-draft verification), but most of the data on these transactions are stored at a different location.  This allows verifiers to verify a block of transactions quickly, and minimize gas fees.  Zero knowledge rollups use a nifty piece of cryptology called zero-knowledge proofs, and these allow the particular transaction data to be rather scant/    Because it runs on thin data, the gas fees will likely be much less.   Said another way, the “block” of transactions might be  a thousand transactions, are executed off the main Ethereum net.   When done, a summary of these transactions is posted to the mainnet of Ethereum.   While both are more efficient in gas fees, they are also less secure as they have less frequent audits and rely on external tools for reliability.  ZK rollups are much faster because optimistic rollups require a “cooling off period” (my words) which gives people sufficient time to challenge the new transaction block.  Because the ZK rollups rely upon off-chain computation and on-chain posting, they are considered “hybrid scaling solutions.”  ZK rollups are likely to rotate the operator role by using a proof-of-stake system.     Their stake also keeps them honest because if incorrect blocks are posted, they lose their stake.

OK, with a little less hand waving this time, what is a ZK rollup?

The information concerning accounts and balances comprises a Merkle tree.    A cryptographic hash of this tree’s root (a Merkle root) is stored on-chain.   Since the root of the function is stored on-chain, the information encoded is easily derived, but stored off-chain.   This makes calculation much faster and serves to minimize gas fees.  A batch root can also be saved to recognize a series of related transactions.  Now, when a verifier wants to add the block to the blockchain, there is a validity proof demanded, which is another mathematical function for the verifier to prove, this one not related to the transaction.  Once this commitment is made and the function solved, the block of transactions can be added to the mainnet.

What is a ZK-SNARK v. a ZN-STARK?

These functions share the purpose of verifying the correctness of off-chain calculation.  First, there were ZK-SNARKs,  and these used a Common Reference string to aid the cryptography behind a block of transactions.   Later, these same functions were improved as they used “trusted individuals” in groups, to derive the cryptographic functions.   ZK-STARKs were an improvement on these, as they use publicly available data to aid in the cryptography, and the “trusted individual” problems are avoided.  Further, they are more scalable and can get exponentially more difficult to derive very quickly.

All of this techno-speak is giving me gas…

How much users pay for transactions on ZK-rollups is dependent on the gas fee, just like on Ethereum Mainnet. However, gas fees work differently on L2 and are influenced by the following costs:

First, there is something called “State write.”   This has nothing to do with the Constitution.    It is simply a fee charged to submit a transaction to the blockchain.  ZK rollups serve to spread this “pain” among a series of transactions such that each participant pays less than they might have alone.

Second there is a fee for data publication.   This fee will grow larger  as the size of data kept on the mainnet expands.  (This is why optimistic rollups might be a more efficient option because so little data is stored on-chain.

Third, there are L2 operator fees, and you can think of these as fees to pay the miners on the mainnet.

Fourth, and finally, there are proof generation and verification fees.   Operators of the ZK-rollups must complete validity proofs, and this is the fee to encourage them.

It should be stressed that all of these aggregated fees are minimal and a dwarfed by the fees charged by real banks.

.Pros and cons of ZK-rollups

ProsCons
Validity proofs ensure correctness of off-chain transactions and prevent operators from executing invalid state transitions.The cost associated with computing and verifying validity proofs is substantial and can increase fees for rollup users.
Offers faster transaction finality as state updates are approved once validity proofs are verified on L1.Building EVM-compatible ZK-rollups is difficult due to complexity of zero-knowledge technology.
Relies on trustless cryptographic mechanisms for security, not the honesty of incentivized actors as with optimistic rollups.Producing validity proofs requires specialized hardware, which may encourage centralized control of the chain by a few parties.
Stores data needed to recover the off-chain state on L1, which guarantees security, censorship-resistance, and decentralization.Centralized operators (sequencers) can influence the ordering of transactions.
Users benefit from greater capital efficiency and can withdraw funds from L2 without delays.Hardware requirements may reduce the number of participants that can force the chain to make progress, increasing the risk of malicious operators freezing the rollup’s state and censoring users.
Doesn’t depend on liveness assumptions and users don’t have to validate the chain to protect their funds.Some proving systems (e.g., ZK-SNARK) require a trusted setup which, if mishandled, could potentially compromise a ZK-rollup’s security model.
Better data compression can help reduce the costs of publishing calldata on Ethereum and minimize rollup fees for users

The verdict

All of this geek speak, (and trust me, I saved you from the bulk of it) is fine and good to hear, but I don’t understand all of it.   Confession: I don’t either, entirely.    I guess what we can learn from it is that cryptocurrency is an evolving concept.   The coders continue to improve the code underlying the currencies, and make the processes more efficient and faster.  So, the question is then, how is this knowledge valuable to me?    Well, I think that we are tracking some of the larger building blocks behind cryptocurrencies being added now, and into the near future (figure 1-2 years.)  After these larger blocks are in, I would begin to feel a little better about investing, even if the huge jumps in value are over.  Perhaps it’s just like the doctors tell us: everything in moderation.

REFERENCES

What Are Rollups? ZK Rollups and Optimistic Rollups Explained (coindesk.com)

Zero-Knowledge rollups | ethereum.org

Layer-2 Scaling: zk-Rollups and Optimistic Rollups | Gemini

Can the Optimism blockchain win the battle of the rollups? (cointelegraph.com)

 Editor’s Note: Please note that the information contained herein is meant only for general education: This should not be construed as Tax Advice.   Personal attributes could make a material difference in the advice given, so, before taking action, please consult your tax advisor or CPA.

 

Leave a comment

Your email address will not be published. Required fields are marked *

Share via
Copy link
Powered by Social Snap