Here for a Layer 2 solution cost? Ethereum’s rising gas fees dominated crypto news for a few years, and the developers have promised a move to Proof-of-work. This is meant to mitigate high gas fees and reduce congestion on the Ethereum network. 

In the meantime, layer 2 solutions have attempted to build applications and protocols on top of Ethereum to solve high gas fees. Many have succeeded, including the Bitcoin Lightning Network, which allows the best crypto casino users to make cheap microtransactions for crypto gambling. Layer 2 solution costs are much cheaper than Ethereum’s gas fees. Let us look at these solutions and compare costs between 4 of the major layer 2 solutions. 

What Is A Layer 2 Solution?

With Ethereum’s popularity as a blockchain for DeFi applications, many crypto enthusiasts transact using it. This creates a bottleneck for the Ethereum mainnet. Ethereum can only handle around 15-25 transactions per second (TPS), and transaction confirmations take up to 6 minutes, depending on network congestion. This makes Ethereum less than ideal as a platform for micro-payments and NFT marketplaces.

Furthermore, Ethereum uses the proof-of-work consensus mechanism, and miners receive rewards in the form of gas fees to process transactions. Miners need incentives to mine certain transactions, so the average gas fee will increase as more users want their transactions included in the next block. This can cause the fee to be higher than the actual transaction.

Accordingly, many Ethereum developers have begun implementing Layer 2 solutions. These smart contract applications or parallel blockchains use Ethereum’s security to record and secure transactions but process smaller transactions off the main Ethereum chain. This means that users only need to pay a fraction of the transaction cost for settling a bundled transaction.

There are many approaches to the idea of processing transactions off-chain. These include layer 2 rollups, sidechains, payment channels, and sidechains.

What Are The Types Of Layer 2 Solutions?

State Channels

State Channels

State channels utilize smart contracts to allow a pre-determined number of participants to transact without using the main blockchain to validate each transaction. Instead, both participants stake an amount of crypto into a multi-sig contract. They then open the channel on the main chain. They can then transact using the shared balance on the channel.

If a participant wants to leave the channel, they send an exit request to the main chain. After the channel closes, each participant receives their share of the balance after their last transaction.

Lastly, the most common form of state channels, payment channels, only requires transaction costs at the opening and closing of the channel. Transactions in the channel inquire no transaction fees. This is one way of ensuring cheaper layer 2 solution costs.

Sidechains

Unlike state channels that need the main chain to begin transactions, sidechains only communicate to the main chain through a 2-way bridge at certain periods. These periods depend on the blockchain’s consensus protocol. Additionally, sidechains like Polygon have compatibility with all ERC-20 tokens. Users can swap their tokens with other layer 2 solutions if the sidechain supports it.

Sidechains allow developers to launch Dapps (decentralized applications) on the sidechain. They can also communicate with the mainchain without needing to open or close channels. However, they do not rely on the mainchain’s security, meaning that they are not strictly layer 2 solutions. Instead, they have connections (bridges) to the mainchain to allow interoperability.

Lastly, sidechains run the risk of malicious validators. This is because they do not use an established mainchain’s consensus protocol, and they usually require users to use their native token. But they do allow for low layer 2 solution costs.

Rollups

Rollups execute transactions off the main chain and only send the bundled transaction data to the main chain for consensus. This means that users do not need to pay for each transaction. Instead, they only pay for the bundle of transactions at the end of a period. This is like state channels, but users do not need to open or close their own channels.

Moreover, there are two kinds of rollups, optimistic and zero-knowledge rollups. Both require users to check transaction data for validity to ensure no malicious transactions are included in the bundle.

Roll ups

Optimistic Rollups

Optimistic rollups save on layer 2 solution costs because they do not send each transaction to the mainchain. The protocol assumes that all validators act honestly. It trusts validators to find malicious actors and submit fraud proofs to the mainchain. Accordingly, validators challenge transactions during the challenge period. This usually lasts more than a week.

Users cannot withdraw their funds during this period, which incentivizes them to act quickly to find malicious actors. If a user violates the rules, the layer protocol slashes their rollup layer stake. But due to its reliance on human validators and a challenge period of at least a week, user withdrawal times take a long time.

Zero-knowledge Rollups

Zero-knowledge Rollups (zk-rollups) use mathematical proofs to validate bundled transactions. Users on the layer create a Succinct Non-Interactive Argument of Knowledge (SNARK) for each transaction bundle and send it to the main chain.

Accordingly, without needing human validators, it does not require a challenge period once a user generates a SNARK. This equals faster settlement times on the mainchain and provides a more secure method for proving bundle validity.

Previously, ZK-rollups could only handle simple transactions. These excluded compatibility with smart contracts, but there have been many advances in implementing them. Polygon Hermez and ZKSync have successfully implemented smart contract compatibility without any need to change the contract’s base code.

What Is The Layer 2 Solutions Cost?

Layer 1 blockchains like Bitcoin and Ethereum have transaction costs to incentivize miners to add blocks to the network. On Ethereum, users need to bid gas to have their transactions included. There is an average gas fee depending on network congestion. The size of the transaction also determines the total gas fee for individual transactions.

Layer 2 solutions attempt to sidestep this with fractional transaction costs for multiple users. By only sending one large transaction to the main chain, layer 2 solutions can free up traffic on the mainchain, and individuals only pay a small fee.

Furthermore, other layer 2 solutions do not charge for certain transactions. Although, most layer 2 solutions charge an execution fee (on layer 1) and a security fee (on layer 2).

Lastly, layer 2 solution costs differ depending on the action. For example, sending Ether (ETH) would have a different cost than swapping tokens on a network.

Layer 2 solutions

The 4 Major Layer 2 Solutions

Arbitrum

OffchainLabs is an Ethereum based Optimistic Rollup. It has the ability to port smart contracts without needing to modify the original code. This means that developers can use Arbitrum to develop Dapps using a layer 2 solution.

Furthermore, validators need to stake ETH to check the validity of transactions. If they break the rules, they lose a portion of their stake (slashing). Validators create an assertion after computing a transaction. During the challenge period, users create Dispute Assertions that validators need to settle.

Moreover, aggregators bundle transactions and send them to the layer 1 chain (Ethereum). They receive rewards from collected platform fees.

Additionally, Abritum supports multiple applications, including Uniswap, Chainlink, and Aave. It supports the Binance and Crypto.com exchanges and Metamask, Zapper, and Loopring wallets.

Lastly, depositing ETH to Arbritum from Ethereum costs around $7.31. However, sending ETH from Arbitrum only costs $0.53. Swapping tokens using this solution costs $0.73 on average.

Polygon Hermez

Hermez is a zero-knowledge rollup currently providing a layer 2 scaling solution to Ethereum. Polygon funded the project to create an open-source ZK-rollup that supports high TVL (trading volume) tokens, including several stablecoins, ETH, and MATIC.

Interestingly, users do not need to use ETH to use the solution. Instead, they can use MATIC to take advantage of low layer 2 solution costs and faster settlement. Hermez also uses proof-of-donation where potential transaction bundle creators (rollup batch creators) bid on being in charge of the next bundle. A portion of their bid goes to funding the project and other services.  

Moreover, Hermez only uses Ethereum as data storage and does all the transaction processing off-chain. This means that transaction data and proofs exist on the mainchain. Therefore, it maintains Ethereum’s security.

Lastly, Depositing ETH to Polygon costs nearly $12. While sending ETH using Hermez costs $0.25. However, swapping MATIC for another layer 2 token costs around 42.6 GWEI. Using the Polygon sidechain allows users to save on layer 2 transaction costs because there are several rollups that run on the Polygon chain and Hermez. Compared to Arbitrum, Hermez has a slight advantage as MATIC is cheaper than making an ETH deposit on Arbitrum. 

Arbitrum

Immutable X

Immutable X is a layer 2 zk-roll-up solution and NFT marketplace. It allows low to zero gas fees for minting and trading NFTs. The team developed the zk-roll up using StarkWare’s STARK prover. And, this solution has an IMX token that users can earn when performing platform actions. They can also use it to transact, mint NFTs, and vote on governance proposals.

Moreover, Immutable X’s roll-up protocol allows for over 9000 NFT trades and mints per second. It also has an API abstraction layer that will enable users to call APIs instead of directly communicating with a smart contract.

In contrast to other NFT marketplaces, Immutable X has a global order book. This means that users can fill orders from other marketplaces and vice versa. This bridges the gap between NFT marketplaces and enhances a creator’s ability to find an audience for their content.

Lastly, minting an NFT on Rarible or Foundation costs around $70 in gas fees. However, Immutable gas fees range from $5-10 for single transactions. Layer 2 solution costs on Immutable X range from zero to $0.05 to mint and trade NFTs. This makes Immutable X an attractive option for GameFi developers.

ZKSync

ZKSync is one of the original zk-roll-up applications for Ethereum. It has a comprehensive set of protocols and implementations that are compatible with most Ethereum based Dapps and layer 2 protocols. These include Polygon Hermez, metaverse tokens, and most other ERC-20 tokens.

Furthermore, ZKSync has smart contract support using Zinc or solidity programming language. This makes it one of the first zk-roll ups to support smart contract implementation.

Moreover, users can perform atomic swaps using ZKSync. This means that DEXs can easily port their platforms to take advantage of lower layer 2 solution costs and scalability.

For comparison with Immutable X, depositing ETH to ZKSync costs around $11.51. While transferring ERC-20 tokens on ZKSync costs around $0.08. More impressively, minting an NFT costs around $0.21. There is a one-time activation fee of $2.61, and withdrawals cost $5.28.

Lastly, ZKSync supports gasless meta-transactions. These allow users to pay a fraction of the transacting token as a gas fee rather than ETH.

Zksync

Do You Need To Use a Layer 2 Solution?

Using a layer 2 solution has several benefits for users that do not intend to make large transactions on a layer 1 network. Some layer 2 solution costs include an initial gas or deposit fee to begin transacting. However, they are not as expensive as the Ethereum gas fees during peak times.

Moreover, layer 2 solutions make it much easier for developers to scale their projects without needing a massive fund to pay gas fees.

Platforms like Immutable X and ZKSync have made minting and trading NFTs affordable for most users. This might give artists a viable market to sell their works. Ethereum’s eventual move to Proof-of-Stake will vastly reduce gas fees. This will not make layer 2 solution costs irrelevant but make them even more attractive to everyday users.

Final Thoughts

Low layer 2 solution costs make platforms like Arbitrum and ZKSync a viable option for users looking to transact using ERC-20 tokens without overpaying gas fees. More significantly, layer 2 solutions have already begun offering cheaper methods for developers and artists to mint NFTs at fractional prices.