Smart contract technology which powered DeFi and NFT has become a threat to the incumbent intermediary companies. Ethereum, the first blockchain to introduce the concept, is now the institution’s darling for cryptocurrency investment. However, Ethereum has a serious sustainability issue. Loads of effort and money pour in to scale Ethereum from migrating to ETH 2.0 (PoS and Sharding) to layer 2 solutions (Optimistic rollups and ZK rollups). Is it feasible for Ethereum to have 100,000 transactions per second?
A brief history of Ethereum
Ethereum is a decentralized, open-source blockchain with smart contract functionality. In 2013, 5 years after Bitcoin released its whitepaper, 21 years Russian-Canadian programmer, Vitalik Buterin created Ethereum. If Bitcoin revolutionized the idea of peer-to-peer transfer, Ethereum took it a notch and made those transactions programmable. After its whitepaper & yellow paper were released, Ethereum raised 3,700 BTC (or approximately $2.3million at that time) in 2014 and went live in 2015.
What is smart contract?
A smart contract is a program in which computing instructions are executed on top of the blockchain. Smart contract technology eliminates the need for intermediaries. Many big technology companies currently act as intermediary parties, such as social media, ride-hailing, marketplace, and financial services. Thanks to smart contracts, now, two strangers can transact without the need to know or even trust each other. The code will be both the judge and executioner.
Ethereum has become the space to experiment with smart contract technology. There is a new emerging industry within finance which is called Decentralized Finance or DeFI in short. The smart contract nature of trustless execution has been empowering DeFi. Another cool application is Non-Fungible Tokens (NFTs). Both DeFi and NFTs enables stranger and unbankable people to have access to the financial system and its derivatives, such as exchanging cryptocurrency, lending, and borrowing. Whereas, NFT can create digital assets and identities. One of the most popular functions of NFT is play-to-earn and digital identity (avatar).
Everyone from Wallstreet to Silicon Valley pouring money and effort into space. Currently, Ethereum has more than 3,000 decentralized Applications (dApps). The network has been overwhelmed by the heavy daily user volume, which has resulted in transaction delays and expensive gas fees.
Currently, Ethereum is not ready for mass adoption. Blockchain technology has a unique problem called blockchain trilemma. A popular belief is that blockchain can only support two aspects out of three essential aspects: decentralization, scalability, and security. Basically, if a blockchain wants to be scalable, it requires a high spec machine that is able to process a lot of transactions. Therefore, reducing the decentralization as not many people are able to purchase those. Whereas, if a blockchain wants to be secure, it must have a lot of nodes which also increases decentralization but lowers the scalability.
Over the years, a lot of blockchain projects are trying to find the equilibrium to maximize those three aspects. Currently, Bitcoin and Ethereum are secure and decentralized networks but weak on scalability. To put into perspective, Bitcoin has 7 TPS (Transaction Per Second), while Ethereum currently has around 30 TPS. It is highly unsustainable because as the system gets crowded, the gas fee becomes more expensive and the transaction process becomes slower.
Therefore, we can see loads of potentially Turing-complete projects, resembling Ethereum, like Solana and Avalanche trying to solve the scalability issue. Ethereum through its smart contract can disturb many intermediary companies, but it is far from sustainable and ready for mass adoption. However, it does not mean Ethereum is dead. Instead, they are in the most exciting processes towards ETH 2.0 which can process up to 100,000 TPS. What is the mechanism and is it feasible?
Currently, Ethereum is in an evolution process to Ethereum 2.0. Serenity is a multi-phase update for Ethereum. There will be two major changes in Ethereum: transition from Proof of Work (PoW) to Proof of Stake (PoS) consensus mechanism and implementation of sharding. With these two upgrades, Ethereum is expected to be faster and more efficient. In December 2020, Ethereum already launched its long-waited phase 0 which introduced the PoS beacon chain. In early 2022, Ethereum is expected to go to phase 2 which will merge the beacon chain into the existing Ethereum chain.
Transition to PoS
The consensus mechanism is the heart of decentralization. In decentralization blockchain, there is no central authority to determine every decision for the blockchain. Participants need to system on how all participants get a consensus and make decisions. There are many types of consensus mechanisms. Two of them are PoW and PoS. Currently, Ethereum 1.0 uses PoW. Meaning the participants must proof works (using participants’ computing power to verify & add transactions to the public ledger) in order to earn Ethereum as rewards. However, PoW has several problems:
- Energy Consumption: Solving these hard mathematical problems requires a large amount of electricity.
- Centralization: PoW creates an unfair system because those who have powerful and expensive hardware devices will have a greater chance of winning the mining rewards.
- 51% Attack: A group of people who hold more than 51% of the system’s computing power can alter the blocks for their gains.
Therefore, Ethereum 2.0 will change to PoS. If the PoW rewards the miners for solving computational problems, the stackers of PoS earn the transaction fees when creating the next block based on how much they have ‘staked’. The stackers are people who stake particular coins of blockchain. Therefore, it takes less energy consumption. The stackers incentive to keep the network secure by doing things correctly. PoS punishes nodes that do not follow the consensus mechanism. If stackers attempt to hack the network or process malicious transactions, the stackers will lose their entire stake.
Ethereum 1.0 is a single consecutive chain of blocks that stores every transactional data from genesis until current of the network. Sharding is data partitioning that breaks transactions into smaller data. The big data could be split and distributed within different nodes. Thus, the network’s validators will have decreased workload because each validator only stores and manages one shard of the network instead of the whole blockchain. The shards will simultaneously process the transaction in parallel. Thus, creating parallel processing, reducing the latency of linear processing when using only a single blockchain.
In phase 1, Ethereum will break down the single Ethereum blockchain into a 64 shard chain. Validators who already deposit contracts in phase 0 will be randomly assigned to manage particular shards chains on the Ethereum network. Later, each shard will have different tasks and responsibilities.
To understand layer 1 and layer 2, let’s make them into analogies. If we imagine blockchain (Ethereum, Bitcoin, Solana) as a city, where we can build banks (DeFi apps), gaming stations, galleries (NFT), and etc. Layer 1 would be the road in the city that connects to every store (in this case would be its native coin ETH, BTC, SOL). Ethereum 2.0 is trying to make layer 1 scalable meaning the road is bigger and smooth. Layer 2 would be the city inner toll. Layer 2 is for network optimization and scalability. There are many ways to create layer 2: rollups, channels, and plasma. However, the most popular and which we will discuss is rollups.
Rollups is the type of scaling solution that executes transactions outside layer 1 but posts transaction data on layer 1. Thus, it still derives security from the Ethereum consensus. Because the computation is off the main Ethereum chain, we can process more transactions. Then, a bunch of transactions will be compressed and rolled up into the main Ethereum as a single transaction. Hence, the name: a rollup.
There are two types of rollups: Optimistic rollups and ZK rollups. The main difference between the two of them is the mechanism and proof that the transactions are valid and not posted by bad actors trying to benefit themselves. Optimistic rollups use fraud-proof, while ZK rollups use validity proofs. Of course, both of them have different strengths and weaknesses which we will discuss one by one.
Optimistic rollups post data to layer 1 and assume it is correct. Therefore, the name is optimistic rollups. If the data is valid there is nothing else to be done. In the case of an invalid transaction, the system has to be able to identify it, correct the transaction, and penalize the party who submitted the transaction. Optimistic rollups implement a dispute resolution system which able to verify fraud-proof, detect fraudulent transactions and punish the bad party.
Usually, the party which will submit batches of transactions to layer 1 has to provide a bond in form of ETH. At the same time, other network participants can submit a fraud-proof if they spot an incorrect transaction, of course with a bond. After a fraud-proof is submitted, the system enters a dispute resolution mode. The suspicious transaction will be executed again in the main Ethereum network. If the execution proves invalid. Then, the party who submitted will be punished by having their bond slashed. If the transaction is valid, the party who suspected will get their bond slashed.
There are two famous projects working on optimistic rollups: optimism and arbitrium. The main difference between them is their dispute resolution system. If optimism, executed one by one every suspected transaction. Arbitrium has come up with an interactive multi-round model which allows to narrow down the scope of dispute and execute potential fraudulent transactions. This is also Arbitrium to a much larger contract size in the Ethereum.
Despite their differences, their main goal is to make EVM compatible. Therefore, all Ethereum apps like Uniswap, Bancor, Synthethic, Aave, and etch can migrate to optimistic rollups seamlessly without changing the code.
If optimistic rollups rely on the system which will be able to replay a transaction with the exact state when executed on rollups. The system also relies heavily on the honest party which monitors the system to submit fraud when needed. This long process of dispute resolution can take up to 2 weeks of settlement in layer 1.
This is different from ZK rollups because there is no dispute resolution at all. This is possible because of cryptography called Zero-knowledge proof, therefore the name ZK rollups. Every batch posted to layer 1 is already cryptographic proof called ZK-Snark. This proof can be verified instantly by layer 1 when the transaction is submitted. Therefore, any invalid batch of transactions will be rejected straight away. Sounds more advanced and simple right?
However, there are challenges to making ZK rollups happen. Because of the complexity of its technology, it is much more difficult to create an EVM compatible with ZK rollups. Therefore, it is hard to scale general-purpose applications without having to rewrite the application’s logic. Moreover, ZK rollups are more computation-heavy than optimistic rollups. Meaning the nodes that compute ZK proof must have high-spec machines.
Even though currently, optimistic rollups look gives more progress and are feasible, there are many projects that try to use ZK-rollups. ZkSync is a 100% open-source project which makes significant progress to make ZK rollups EVM compatible available soon. A compatible virtual machine can fully support any arbitrary smart contract written in Solidity. Loopring is another example of a project which uses ZK rollups technology to scale its exchange and payment protocol. Hermez and ZKTube are also working on payments with ZK rollups with Hemez focusing on EMV compatible rollups and Aztec focusing on privacy on ZK rollups.
In conclusion, Ethereum smart contracts are capable of disturbing the current incumbent of intermediary technology companies. Even though Ethereum must solve the scalability problem before maximizing its potential, Ethereum has already begun transforming itself. It is not impossible for Ethereum to have 100,000k TPS with the combination of migrating to ETH 2.0 (PoS and sharding) and layer 2 solutions (optimistic rollups and ZK rollups).
Cryptopedia Staff. (2021, November 24). The Blockchain Trilemma: Fast, Secure, and Scalable Networks. Gemini. Retrieved December 27, 2021, from https://www.gemini.com/cryptopedia/blockchain-trilemma-decentralization-scalability-definition#section-solving-the-blockchain-trilemma-layer-2
Cryptopediastaff. (2021, December 8). Ethereum 2.0, Phase 1: Boosting Throughput with Sharding. Gemini. Retrieved December 27, 2021, from https://www.gemini.com/cryptopedia/ethereum-2-0-proof-of-stake-pos-blockchain-serenity
Cryptopediastaff. (2021, April 24). Ethereum 2.0: A Guide to the Proof-of-Stake Transition. Gemini. Retrieved December 27, 2021, from https://www.gemini.com/cryptopedia/ethereum-blockchain-pos-proof-of-stake#section-main-benefits-of-ethereum-2-0
Munarriz, R. (2021, December 17). 3 Reasons Why It's Not Too Late to Buy Ethereum. fool. Retrieved December 27, 2021, from https://www.fool.com/investing/2021/12/17/3-reasons-why-its-not-too-late-to-buy-ethereum/#:~:text=Ethereum%20is%20a%20digital%20leader&text=No%20one%20comes%20close%20to,next%2Dgen%20decentralized%20finance%20platforms.
packtpub. (n.d.). Implementing Ethereum 2.0 roadmap. https://subscription.packtpub.com/. Retrieved December 27, 2021, from https://subscription.packtpub.com/book/data/9781789954111/4/ch04lvl1sec22/implementing-ethereum-2-0-roadmap
Skidanov, A. (2018, October 22). Detailed overview of Ethereum 2.0 shard chains: Committees, Proposers and Attesters. Medium. Retrieved December 27, 2021, from https://medium.com/nearprotocol/detailed-overview-of-ethereum-2-0-shard-chains-committees-proposers-and-attesters-a9992d2fd103
YouTube. (2021). Rollups - The Ultimate Ethereum Scaling Strategy? Arbitrum & Optimism Explained. YouTube. Retrieved January 4, 2022, from https://www.youtube.com/watch?v=7pWxCklcNsU.