It is no secret, Ethereum, the by market cap and adoption most successful smart contract blockchain, is at its limit. Various DeFi apps, like Uniswap, Aave, games, like Axie Infinity, NFT marketplaces and issuing protocols, like OpenSea and Rarible and countless transactions and other smart contract interactions are clocking up the network. Sidechains and Layer 2 solutions are here to tackle the scaling problem of Ethereum until its transition to Ethereum 2.0 in completed.
For each transaction on Ethereum a certain amount of Gas needs to be paid. The amount depends on the computational effort. A simple transfer of ETH costs 21.000 Gas while a trade on Uniswap can cost 250.000 Gas. Miners of the network set the Block Gas Limit, which specifies the amount of how much Gas can be included within one block. This limit is currently set to around 12.5 million. A new block is minted roughly every 13 seconds. Which transaction is getting in the next block is determined by the Gas Price the sender is willing to pay. To make an example, at the current Block Gas Limit 595 simple ETH transactions could be process, rounding to 45 transactions per second.
Solving the scaling issue of Ethereum
Since ETH 2.0 is still under development various teams are working on solutions to solve the scaling problem of Ethereum. Most scaling solutions can be categorized into Sidechains or Layer 2 solutions. The main difference between Sidechains Layer 2 solutions lies in their security mechanisms.
The term Sidechains describe blockchains with own consensus mechanisms, which are compatible with Ethereum. Examples are the xDai and Polygon network. xDai used a delegated proof of stake consensus mechanism, which allows for fast and inexpensive stable transactions. A transaction does not take longer than 5 seconds and 500 of them cost only around $0.01. A bridge between xDai and Ethereum makes it possible to transfer any ERC20/677/827 tokens between the networks. This scaling solution is used from various NFT minting platforms, like Nifty Ink, or DAO infrastructure providers.
In contrast, Layer 2 solution do not have their own consensus mechanism but rely on the security of Ethereum. An example of Layer 2s are Roll-ups, which describe off-chain aggregation of transactions inside a Ethereum Smart Contract. You can differentiate between ZK-Rollups and Optimistic Roll-ups.
With ZK-Rollups, funds are hold by the smart contract on the mainchain. Computation and storage are done off-chain while validity is ensured using zero-knowledge proofs. A project with works on ZK-Rollups is Loopring.
Optimistic Rollups, are using a challenge period of 1-2 weeks to challenge fraud in case the aggregator has submitted an incorrect transaction. Therefore, you are “optimistic” on the submitted transactions. A project using Optimitic Rollups to scale Ethereum is Optimism. Its launch is planned for July 2021. Uniswap is currently running a demo version, Unipig, on Optimism, which only required 143x gas costs and allows for transaction in milliseconds.
Sidechains and Layer 2 solutions are an essential element to solve the scaling problem of Layer 1 protocols. It will be interesting to see what will happen to them when hyper scalable Layer 1 solutions arise, like Ethereum 2.0, Solana, Elrond, and many more.