Advanced Topics
What Are Rollups in Blockchain?
Learn what rollups are, how optimistic and zero-knowledge rollups work, and why they matter for scaling Ethereum and reducing gas fees in DeFi.
Understand Layer 2 scaling solutions: how rollups, state channels, and sidechains reduce costs and increase throughput while inheriting security from the main blockchain.
Layer 2 scaling solutions are blockchain networks that process transactions outside the main chain (Layer 1) while relying on it for security and data availability. They exist because L1 blockchains like Ethereum face a fundamental constraint: every node must process every transaction, limiting throughput to roughly 15–30 transactions per second.
This throughput bottleneck creates high gas fees during periods of demand. Simple token transfers can cost $5–50, and complex DeFi interactions — like managing a collateralized borrowing position — can cost $50–500 on Ethereum mainnet. Layer 2s solve this by moving execution off-chain while preserving the security guarantees that make L1 valuable.
Blockchain design involves a trilemma between three properties:
L1 blockchains prioritize security and decentralization at the expense of scalability. Layer 2s are the primary strategy for achieving all three: the L1 provides security and decentralization, while the L2 provides scalability.
Rollups are the dominant L2 architecture. They execute transactions off-chain, compress the results, and post data back to the L1. There are two varieties:
Optimistic Rollups assume all transactions are valid by default. They post state roots to L1 and open a challenge window (typically 7 days) during which anyone can submit a fraud proof demonstrating that a state transition was invalid. If a fraud proof succeeds, the invalid batch is reverted and the malicious sequencer is penalized.
Key optimistic rollups include:
ZK-Rollups generate cryptographic validity proofs (zero-knowledge proofs) for each batch of transactions. The L1 smart contract verifies these proofs mathematically, providing immediate certainty that the state transition is correct. No challenge period is needed.
Key ZK-rollups include:
For a deeper technical comparison, see our guide on zero-knowledge proofs.
State channels allow two or more parties to transact off-chain, only settling on the L1 when the channel opens and closes. Between those events, participants exchange signed messages representing state updates — infinitely and at zero cost.
Lightning Network on Bitcoin is the most prominent state channel implementation. For Ethereum, state channels are less common because rollups offer more general-purpose scalability. State channels work best for specific use cases: repeated payments between the same parties, gaming, or micropayments.
Limitations include requiring participants to be online, capital lockup in channels, and difficulty supporting general-purpose smart contract interactions.
Sidechains are independent blockchains with their own consensus mechanisms that connect to the L1 via a bridge. They do not inherit L1 security — they are secured by their own validator set.
Sidechains offer high throughput and low costs but with weaker security guarantees than rollups. If the sidechain's validators collude, they could theoretically steal user funds — a risk that does not exist with properly implemented rollups.
Validiums use ZK proofs like ZK-rollups but store data off-chain rather than on L1. This dramatically reduces costs but introduces a data availability risk: if the off-chain data becomes unavailable, users cannot reconstruct the state and may not be able to withdraw funds.
Volitions let users choose per-transaction whether to store data on-chain (rollup mode, more expensive, more secure) or off-chain (validium mode, cheaper, less secure). StarkEx supports this hybrid model.
Most rollups currently use a centralized sequencer — a single entity that:
The centralized sequencer provides fast transaction confirmation (often sub-second "soft confirmations") but introduces trust assumptions. Most rollups plan to decentralize their sequencers over time.
Data availability is critical for rollup security. Users must be able to reconstruct the L2 state from L1 data alone. If the sequencer disappears, anyone should be able to:
EIP-4844 (Proto-Danksharding), implemented in Ethereum's Dencun upgrade, introduced blob transactions — a new data type specifically designed for rollup data. Blobs are cheaper than calldata and are pruned after approximately 18 days, reducing long-term L1 storage costs while maintaining short-term data availability.
L2 transaction fees have two components:
Post-EIP-4844, L1 data fees dropped dramatically — by 90% or more on most rollups. Transactions that cost $0.50–2.00 on rollups pre-Dencun now cost $0.01–0.10.
| Operation | Ethereum L1 | Optimistic Rollup | ZK-Rollup |
|---|---|---|---|
| ETH transfer | $2–20 | $0.01–0.10 | $0.01–0.10 |
| Token swap | $10–100 | $0.05–0.50 | $0.05–0.50 |
| Lending deposit | $15–150 | $0.05–0.50 | $0.05–0.50 |
| Complex DeFi | $50–500 | $0.10–1.00 | $0.10–1.00 |
Approximate ranges; actual costs vary with L1 gas prices and network congestion.
For DeFi borrowing operations on Borrow, moving to L2s means the difference between paying $50+ to manage a position and paying pennies. This makes active position management, frequent collateral adjustments, and multi-protocol strategies economically viable for a much wider range of users.
Major lending protocols are deployed across L2s:
These deployments mean that platforms like Borrow can aggregate lending rates across not just multiple protocols but multiple networks, finding users the optimal combination of rate, collateral type, and chain.
The proliferation of L2s creates a liquidity fragmentation challenge. Instead of all DeFi activity concentrated on Ethereum mainnet, liquidity is split across dozens of L2s. This can result in:
Cross-chain bridges, bridging solutions, and intent-based protocols are working to solve this fragmentation. Aggregators like Borrow play a key role by abstracting away chain complexity — finding the best rates regardless of which L2 the protocol lives on.
The L2 ecosystem is working on seamless interoperability:
When choosing an L2 for DeFi activities, consider:
| Feature | Arbitrum | OP Mainnet | Base | zkSync Era | StarkNet |
|---|---|---|---|---|---|
| Type | Optimistic | Optimistic | Optimistic | ZK-Rollup | ZK-Rollup |
| EVM compatibility | High | High | High | Moderate | Custom (Cairo) |
| DeFi TVL | Highest among L2s | Strong | Growing fast | Moderate | Growing |
| Withdrawal time | 7 days | 7 days | 7 days | Hours | Hours |
| Gas costs | Very low | Very low | Very low | Low | Low |
Layer 3s are rollups that settle to L2s instead of directly to L1. They enable:
Based rollups use Ethereum L1 validators for sequencing instead of a centralized sequencer. This maximizes decentralization and censorship resistance, aligning L2 sequencing with L1 security, though it trades off some performance.
Ethereum's roadmap includes full danksharding — massively expanding blob space to support hundreds of rollups posting data simultaneously. This would reduce L2 data costs by another order of magnitude, making rollup transactions nearly free.
Ethereum has explicitly adopted a rollup-centric roadmap: the L1 focuses on being a secure, decentralized settlement and data availability layer, while rollups handle execution and scaling. This means the future of Ethereum DeFi — including borrowing and lending — will primarily take place on L2s.
Layer 2 scaling solutions are the primary path to making blockchain applications fast, cheap, and accessible without sacrificing security. Rollups — both optimistic and ZK — are the dominant L2 architecture, executing transactions off-chain and posting data or proofs back to Ethereum.
For DeFi users, L2s transform the economics of participation. Operations that cost $50–500 on L1 cost pennies on L2s. This is especially impactful for borrowing and lending, where active position management (collateral adjustments, refinancing, liquidation avoidance) becomes practical at L2 gas fee levels. Platforms like Borrow are positioned to leverage multi-chain L2 deployments, aggregating rates across protocols and networks to find users the best borrowing terms wherever they exist.
Common Questions
A Layer 2 (L2) is a separate blockchain or execution environment that processes transactions off the main chain (Layer 1) while inheriting its security guarantees. L2s submit compressed transaction data or cryptographic proofs back to the L1, enabling much higher throughput and lower costs without sacrificing the security and decentralization of the underlying chain.
Related Questions
Advanced Topics
Learn what rollups are, how optimistic and zero-knowledge rollups work, and why they matter for scaling Ethereum and reducing gas fees in DeFi.
DeFi Basics
Learn what gas fees are in cryptocurrency, how they work on Ethereum and other blockchains, why gas fees fluctuate, and practical strategies for reducing transaction costs in DeFi.
Borrow by Sats Terminal
Learn about every blockchain supported by Borrow by Sats Terminal -- Ethereum, BASE, Arbitrum, Polygon, Optimism, and BSC -- and how multi-chain support helps you find the best lending rates.
Advanced Topics
Explore zero-knowledge proofs (ZKPs): how they work, their role in blockchain scaling through ZK-rollups, privacy applications, and why they matter for the future of DeFi.