To give an example, some smaller transactions on the Ethereum network are currently priced out. It can cost hundreds of dollars in gas fees to execute smart contract transactions. Claiming staking rewards on some protocols can cost more than $100, depending on the level of congestion in the Ethereum network. The exception is if you are staking enough of a token to generate rewards worth more than the gas fees themselves. This problem prevents an entire cohort of smaller investors from being able to interact with the protocols in the way they were intended.

You may have heard of Layer 1 and Layer 2 (L1/L2) solutions for various protocols over the last 24 months. However, these concepts are not yet widely understood. In this article we will be covering the fundamentals of scaling and looking at a few innovative solutions in development - warning, it is a fairly technical read.
A Layer 2 solution refers to a secondary framework/protocol that is built on top of the existing main chain (L1). The goal of an L2 solution is to improve the throughput and scale of the main chain without altering the underlying structure of the blockchain. This process is known as ‘off-chain’ scaling.
L2 solutions create a secondary framework that allows transactions and processes to take place independent of the main chain as a second layer. In short, the first layer provides the security and continuity of the ledger while the second layer allows for a higher throughput.
[caption id="attachment_103059" align="aligncenter" width="638"]
'Vitalik's Trilemma'[/caption]
Here are a few examples for each side of the trilemma:
The main issue facing DeFi at the moment is the scalability of the Ethereum network, on which a large portion of DeFi protocols are built.
[caption id="attachment_103053" align="aligncenter" width="617"]
Visual representation of a side chain (or shadow chain)[/caption]
In order to ensure security, guarantees are made that transactions will not be misused, and will eventually be settled on the Layer 1 blockchain. Data is published periodically on-chain so that any outside observer can reconstruct account balances and detect invalidity. Rollups require operators to stake a bond in the Rollup contract similar to the Proof-of-Stake concept. This incentivises the correct execution and verification of transactions.
The computation of transactions is a slow and expensive interaction with the Ethereum network. Optimistic Rollups allow for up to 100 times improvements in scalability by removing this computational strain and handling transactions outside of the main network.
The term ‘Optimistic’ comes from the fact that aggregators run computation off-chain while only publishing the absolute minimum information required to reconstruct the transaction. The assumption is made that all transactions are valid by default. Therefore, they are ‘optimistically’ publishing transaction results without actually executing those transactions on Ethereum. Proof is only provided in the case of a disputed transaction. Hence, it utilises the ‘fraud-proof’ security model.
Anything that can be handled on Ethereum Layer 1, including both simple transactions as well as smart contracts, can be controlled with Optimistic Rollups. They are compatible with the Ethereum Virtual Machine (EVM) used by Ethereum. I’ll explain what this means later.
Synthetix has integrated L2 staking utilising the Optimistic Ethereum network. It has allowed SNX holders to stake with a substantial reduction in fees. Additionally, there are no fees for claiming rewards.
Here is how it works:
If a fraudulent transaction is noticed, the rollup will execute a fraud-proof and run the computation using the available state data. This process costs gas because you are now using the main chain to run the equivalent computation and to check if the transaction is valid. If fraud is proven, the gas cost for running a fraud-proof, as well as an additional forfeit, will be taken from the operator’s bond.
Think of the analogy of perjuring yourself in a court proceeding. The L2 node operator has sworn to tell the truth and nothing but the truth. If it is proven that they have not told the truth, they will be punished in the form of losing some or all of their bond, depending on the severity of the offence.
Wait times for an on-chain transaction can be quite long due to potential fraud challenges outlined above. This reduces the speed of the solution when compared to ZK-Rollups. Even so, all transaction data is stored on the main chain making it more secure and decentralised.
Imagine a high-rise building. You can fit a lot more rooms (transactions) in the same area of land (blocks) using a high-rise compared to having the same number of rooms spread across multiple houses. This means less infrastructure is required to maintain the same amount of living space.
ZK-Rollups bundle hundreds of transfers into a single transaction off-chain, generating a cryptographic proof called a Succinct Non-interactive Argument of Knowledge (SNARK) in the process. This is known as the ‘validity proof’ security model. The SNARK proof compares a snapshot of the sidechain before and after any transfers to that of the sidechain. It reports any change in the state of the hash to the main chain.
The ZK-Rollup contract maintains the state of all transfers that happen on Layer 2 without needing to store the transaction data. This state can only be updated with a validity proof. As a result, validating blocks on the main chain is quicker and cheaper than with Optimistic. The reason is that less data is included in each block. Also, there is no delay when moving funds from Layer 2 to Layer 1 since all of the transactions are pre-verified.
In their current form, ZK-Rollups are not compatible with the EVM and can only handle payment and transfer type transactions. Additionally, validity proofs are process-intensive because validation still needs to occur even if it is off-chain. Thus, applications with lower on-chain activity would be better matched with another solution.
[caption id="attachment_103055" align="aligncenter" width="792"]
Multiple Rollups interacting with Ethereum[/caption]
Simple monetary transactions such as the transactions carried out on the BTC network are easy enough to keep track of as they are essentially just numbers moving around wallets. However, since Ethereum is capable of application-based activity, there must be a way of handling these complex conditions throughout the whole existence of the blockchain. This is what the EVM does. It is the core innovation that has made Ethereum suitable for DeFi applications and protocols.
Currently, most blockchain ecosystems operate completely isolated from other blockchains. Polygon aims to blur the lines between blockchains by implementing a user friendly, developer friendly method whereby different chains can utilise their Layer 2 solution. This change would allow for blockchain interoperability.
Boasting up to 65,000 transactions per second, Polygon chains use Ethereum as a base layer in order to leverage its security (and popularity). That said, varying levels of dependency on the Ethereum base layer are available depending on the needs of the client DApp.
Polygon is also compatible with the Ethereum Virtual Machine. This means that developers already accustomed to programming Ethereum DApps do not have to learn new processes.