Ethereum has a problem. For some use cases, like gaming, the Ethereum network is simply too slow and too expensive.
As we covered in some previous newsletters, Ethereum is the world computer, and every action on it costs some amount of fees- ie, every action is a transaction.
For trading and finance applications, users don’t necessarily mind the high fees as much- one can afford to pay $10 to buy $2000 worth of crypto. However, this is prohibitively expensive for gaming.
Moreover, the Ethereum network, as it stands today, can only process fewer than 30 transactions per second (TPS). For comparison, the VISA payments infrastructure can process over 1500 TPS.
VISA is 50 times faster than Ethereum, and that is a problem that needs to be solved if Ethereum is to succeed in its vision of becoming the world's computer for the most important applications of the future. So how do we scale Ethereum?
Let’s call the basic Ethereum network Layer 1 (L1). Ethereum also has a Layer 2 (L2), which allows Ethereum to be scalable. Since Ethereum L1 can only process 30 TPS, what we can do is process the vast majority of transactions off the Ethereum L1. Once a lot of transactions are processed outside the main network, we can compress those transactions into a single transaction on the Ethereum network.
In other words, Ethereum L2 is used to handle the vast majority of transactions. The L2 solutions can handle a lot more TPS, something like 2000 to 4000. The transactions are all processed in L2, and then a 'summary' is stored in Ethereum, where the summarized transaction is confirmed and forever available on the blockchain.
As we can see, with L2 solutions, Ethereum can easily exceed VISA’s throughput. Key point: the transactions are processed in L2, but the proof of transaction is stored in L1.
Thanks to the existence of numerous L2 solutions, Ethereum is still going to take over the world. Phew!
OK, but how do these L2 solutions work? How do they “compress” transactions?
Some L2 applications that allow Ethereum to be scalable are also known as Rollups. They’re called rollups because transactions are rolled together (combined), and then stored on the Ethereum blockchain.
There are 2 main ways to implement these rollups, and we’re going to take a closer look at them.
Optimistic Rollups: Ah, optimism. It’s a great quality to have in a person, but can we use the power of optimism to scale Ethereum? Surprisingly, yes.
Optimistic rollups are solutions that assume a transaction is valid by default. Anybody can submit any transaction, even a fraudulent one, and it’s assumed to be valid. Verification is run in case a dispute arises.
Optimistic rollups use ‘Fraud Proof’ to verify transactions. So, even though you can submit a fraudulent transaction that takes 2 ETH from me and deposits it into your account, I can later submit a proof-of-fraud: a mathematical argument that proves that you cheated.
Once the network realizes fraud took place, the fraudulent transaction is reversed, and the 2 ETH tokens will be deposited back into my account.
There’s another kind of rollup, which uses powerful cryptographic proofs to compress thousands of transactions into one.
ZK Rollups: The ZK stands for Zero Knowledge. These rollups use fancy math techniques to batch transactions. It’s called Zero Knowledge because this can be used to prove the validity of a batch of transactions without knowing what the exact details of the transactions were.
That is, the Ethereum L1 network doesn’t store the actual individual transactions, but the hash of the batch of transactions. No matter how large the batch, the Ethereum L1 network will be able to verify the transactions based on the submitted hash alone.
Here’s a handy comparison chart between ZK rollups and Optimistic Rollups, taken from Vitalik Buterin’s website. If you’re a software nerd, you should read the entire post. Vitalik is a god.
There are other kinds of L2 applications as well: State Channels, Plasma, and Validium, but we’ll cover them some other time.
For now, you can rest knowing that L2 solutions make Ethereum quite scalable today. And this doesn’t even include the changes being introduced by ETH2.
——
L2 solutions also exist for Bitcoin: Lightning Network . This is what allows Bitcoin to be used as a day-to-day payments tool in El Salvador.
Meta: This blog post has been restored from my previous blog, and it does not include all edits I made in the final version of the previously published post. Errors are mine. DYOR.