What Are Layer 2s? A Complete Guide to Ethereum Scaling Solutions

Portals.fi

What Are Layer 2s?

If you have spent any time in crypto over the past few years, you have almost certainly encountered the term “Layer 2” or seen network names like Arbitrum, Optimism, Base, and zkSync appearing alongside Ethereum in DeFi applications.

Layer 2 networks (L2s) are a category of blockchain scaling solutions that process transactions outside of Ethereum mainnet (Layer 1) while still inheriting Ethereum’s security guarantees. They exist to solve a fundamental problem: Ethereum mainnet can only process around 15-30 transactions per second, which is far too slow and expensive for mass adoption.

This guide explains what Layer 2s are, how the different types work, why they matter for DeFi users, and what risks to consider when using them.


Why Ethereum Needs Layer 2s

Ethereum mainnet has a throughput bottleneck. Every transaction, whether a simple ETH transfer, a Uniswap swap, or a complex multi-step DeFi interaction, competes for limited block space. When demand is high, this competition drives gas fees up dramatically.

During peak DeFi activity in 2021 and 2022, a single Uniswap swap could cost $50-200 in gas fees, making the network effectively unusable for smaller transactions and pricing out the majority of potential users.

Layer 2 networks solve this by moving the actual execution of transactions off of Ethereum mainnet while still using Ethereum as a settlement and security layer. The analogy often used is that of a bar tab, rather than paying (and waiting for confirmation) after every individual drink, you open a tab and settle everything at once at the end of the night.

L2s batch many transactions together and periodically post compressed summaries back to Ethereum, dramatically reducing the per-transaction cost while maintaining a connection to Ethereum’s security.

The result is that transactions on Layer 2 networks typically cost a fraction of a cent to a few cents, compared to several dollars (or more) on Ethereum mainnet, and they confirm in one to two seconds rather than 12-15 seconds. This makes DeFi activities like swapping tokens, providing liquidity, and managing lending positions economically viable for users of all sizes.


Optimistic Rollups: Arbitrum, Optimism, and Base

The most widely used Layer 2 category is optimistic rollups. These networks execute transactions off-chain, batch them together, and post the transaction data to Ethereum mainnet. The “optimistic” part refers to the trust model, the rollup assumes that all posted transactions are valid by default, and relies on a fraud proof mechanism to catch any invalid transactions after the fact.

Here is how the fraud-proof system works: when a batch of transactions is posted to Ethereum, there is a challenge period (typically seven days) during which anyone can submit a fraud proof if they believe the batch contains an invalid transaction. If a fraud-proof demonstrates that a transaction was invalid, the batch is reverted, and the party that submitted the invalid batch is penalised. If no fraud proof is submitted during the challenge period, the batch is considered finalised.

This design has a practical consequence that users should understand: withdrawing assets from an optimistic rollup back to the Ethereum mainnet requires waiting for the challenge period to elapse. This is why native withdrawals from Arbitrum or Optimism to Ethereum take approximately seven days. Third-party bridges (like Across, Stargate, or Hop) can provide faster withdrawals by fronting the assets and taking on the waiting risk themselves, but they charge a fee for this service.

Arbitrum is currently the largest Layer 2 by total value locked, hosting major DeFi protocols like GMX, Aave, Uniswap, and Camelot. Optimism pioneered the OP Stack — a modular framework for building optimistic rollups, which has been adopted by Base (Coinbase’s L2), Mantle, and several other chains. Base has grown particularly rapidly, driven by Coinbase’s distribution and the success of applications like Aerodrome.

The OP Stack’s shared architecture means that chains built on it may eventually be able to communicate with each other more efficiently through a shared “Superchain” framework.


ZK Rollups: zkSync, Scroll, Linea, and Polygon zkEVM

Zero-knowledge (ZK) rollups take a different approach to security. Instead of optimistically assuming transactions are valid and relying on fraud proofs, ZK rollups generate a cryptographic proof (called a validity proof or zero-knowledge proof) that mathematically demonstrates the correctness of every transaction in a batch. This proof is posted to Ethereum alongside the compressed transaction data, and Ethereum smart contracts verify the proof before accepting the batch.

The advantage of this approach is that batches are considered final as soon as the proof is verified on Ethereum; there is no seven-day challenge period. This means withdrawals from ZK rollups to Ethereum can be processed much faster than from optimistic rollups. The trade-off is that generating zero-knowledge proofs is computationally intensive and adds complexity to the rollup’s infrastructure.

Several ZK rollup networks are now live with full EVM compatibility. zkSync Era (by Matter Labs) was one of the first ZK rollups to achieve EVM equivalence, allowing developers to deploy standard Solidity smart contracts. Scroll and Linea (developed by ConsenSys) offer similar EVM-compatible ZK rollup environments. Polygon zkEVM is Polygon’s ZK-based scaling solution that operates alongside its original proof-of-stake sidechain.

ZK rollup technology is generally considered to have stronger theoretical security properties than optimistic rollups (mathematical proofs versus economic game theory), but the technology is newer and the implementations are less battle-tested. The ZK proving systems are complex cryptographic constructions, and subtle bugs in the prover or verifier could have serious consequences.


How Layer 2s Affect DeFi Users

For everyday DeFi users, the practical impact of Layer 2s is significant. Activities that are prohibitively expensive on Ethereum mainnet become accessible on L2s. Swapping tokens on Uniswap costs a few cents on Arbitrum instead of several dollars on mainnet. Opening and managing a lending position on Aave requires minimal gas. Even complex strategies that involve multiple transactions — like depositing into a yield vault, adjusting collateral ratios, or claiming and reinvesting rewards, become economical when each transaction costs fractions of a cent.

Most major DeFi protocols are deployed across multiple L2 networks. Aave, Uniswap, Curve, 1inch, and many others operate on Arbitrum, Optimism, Base, and other L2s with the same interfaces and functionality as their Ethereum mainnet deployments. Users interact with these protocols in exactly the same way, connecting a wallet, approving transactions, and signing operations, the only difference is that the transactions process faster and cost less.

The main user-facing complexity that L2s introduce is the need to bridge assets between networks. To use DeFi on Arbitrum, a user first needs to move their tokens from Ethereum (or another network) to Arbitrum. This bridging step requires a transaction, takes some time (from seconds to minutes with third-party bridges, or up to seven days for native optimistic rollup bridges), and carries its own costs and risks. Cross-chain bridges have historically been one of the highest-risk components in DeFi, as several major bridge exploits have demonstrated.


Choosing Between Layer 2 Networks

Different L2 networks have different strengths, and the best choice depends on what a user wants to do. Arbitrum has the deepest DeFi liquidity and the broadest protocol selection, making it the default choice for most DeFi activities. Base has grown rapidly for trading (especially through Aerodrome) and has strong consumer application adoption. Optimism has a robust DeFi ecosystem and is the foundation of the OP Stack Superchain vision.

For users primarily interested in low-cost swaps and basic DeFi, any major L2 will provide a dramatic improvement over Ethereum mainnet. For more specialised needs, such as accessing a specific protocol that is only deployed on certain networks, or wanting the fastest withdrawal times (which favours ZK rollups), the choice may be more specific.

Liquidity depth varies across networks. While major tokens (ETH, USDC, USDT) have deep liquidity on most L2s, less common tokens may have significantly better liquidity on one network than another. Checking where the deepest liquidity exists for the specific tokens you want to trade is worthwhile before committing to a particular L2.


Risks and Considerations

Layer 2 networks, while generally safer than standalone blockchains (because they inherit security from Ethereum), carry their own risk factors. Sequencer centralisation is one of the most discussed concerns. Most current L2 networks use a single sequencer, a centralised entity that orders transactions and produces blocks.

If the sequencer goes down, the network can experience downtime. If the sequencer censors transactions, users may not be able to execute trades or manage positions during critical moments. Most L2s have escape hatch mechanisms that allow users to force transactions through Ethereum mainnet if the sequencer is unresponsive, but these mechanisms are slower and more expensive to use.

Upgrade risk exists because many L2 networks can be upgraded by their development teams through multisig-controlled contracts. This means the rules of the network can be changed, potentially affecting user funds. The degree of upgradeability and the security of the upgrade mechanism vary across networks, some have implemented time-locked upgrades and security councils, while others retain more direct upgrade authority.

Smart contract risk applies at the L2 level itself. The rollup contracts on Ethereum, the bridge contracts, and the fraud proof or validity proof systems are all complex software that could contain vulnerabilities. While these systems have been audited, the technology is relatively new compared to Ethereum mainnet, and the consequences of a bug in a rollup’s core contracts could be severe.

Cross-chain fragmentation is a practical concern. With assets and liquidity spread across multiple L2s, users may find themselves needing to bridge frequently between networks, incurring costs and bridge risks each time. The proliferation of L2 networks has also fragmented developer attention and user activity, with some networks having much thinner liquidity and fewer active protocols than others.


Portals.fi is a DeFi aggregation platform that supports interactions across multiple Layer 2 networks and chains through a unified interface. Users can access DeFi protocols on Arbitrum, Optimism, Base, and other networks — including token swaps, liquidity provision, and lending, without needing to navigate each network’s ecosystem separately.

For more information about how Portals.fi works, visit portals.fi.


This article is for informational purposes only and does not constitute financial advice. DeFi protocols carry inherent risks including smart contract vulnerabilities, liquidation risk, and market volatility. Always conduct your own research before interacting with any protocol. For our full disclaimer, please visit here.

DeFiLayer 2EthereumScalingGuide