Layer 2 Security Models Compared: Rollups, Channels, Sidechains, Spark
Compare the security models of Bitcoin and Ethereum Layer 2s: optimistic rollups, ZK rollups, payment channels, sidechains, and Spark.
Layer 2 Security Models at a Glance
Every Layer 2 protocol makes a core tradeoff: it moves computation off the base chain to gain speed and reduce fees, but in doing so it introduces new trust assumptions. The security model defines what can go wrong, who can steal funds, and how users recover when something breaks. Understanding these differences is essential for anyone building on or holding assets in a Layer 2 system.
This guide compares the security architectures of six major Layer 2 protocols across Bitcoin and Ethereum: Lightning Network, Liquid Network, Spark, Arbitrum, Optimism, and zkSync Era. For a broader feature and fee comparison, see our Layer 2 comparison tool.
| Protocol | Type | Base Chain | Trust Model | Unilateral Exit | Data Availability |
|---|---|---|---|---|---|
| Lightning | Payment channels | Bitcoin | Trustless (2-of-2 multisig) | Yes | Peer-held |
| Liquid | Federated sidechain | Bitcoin | Federation (11-of-15) | No (federation-gated) | Sidechain nodes |
| Spark | Statechain-based L2 | Bitcoin | Trust-minimized (1-of-N operators) | Yes | Operators + user |
| Arbitrum One | Optimistic rollup | Ethereum | L1-inherited (fraud proofs) | Yes (7-day delay) | Ethereum L1 calldata |
| OP Mainnet | Optimistic rollup | Ethereum | L1-inherited (fraud proofs) | Yes (7-day delay) | Ethereum L1 calldata |
| zkSync Era | ZK rollup | Ethereum | L1-inherited (validity proofs) | Yes (hours) | Ethereum L1 (rollup) or off-chain (validium) |
Optimistic Rollups: Arbitrum and Optimism
Optimistic rollups post transaction batches to Ethereum L1 and assume those batches are valid unless challenged. If a validator detects an invalid state transition, they submit a fraud proof during a challenge window (currently 7 days on both Arbitrum One and OP Mainnet). The base chain acts as the final arbiter, which means rollup security inherits Ethereum's own consensus guarantees.
The two leading implementations differ in how they resolve disputes. Arbitrum uses interactive multi-round bisection: the challenger and asserter narrow the dispute down to a single WASM instruction, which Ethereum verifies on-chain. Optimism uses a similar bisection approach but executes the disputed step through a MIPS-based VM (cannon). Both designs ensure that a single honest verifier can force correct outcomes, but the 7-day withdrawal delay for canonical bridge exits is a significant UX cost. Most users bypass this via third-party liquidity bridges that front the withdrawal.
Centralization risk remains a concern. Both Arbitrum and Optimism currently rely on centralized sequencers to order transactions. A malicious or compromised sequencer cannot steal funds (L1 fraud proofs prevent that), but it can censor transactions or extract MEV. Both teams have published roadmaps toward decentralized sequencing, though production timelines remain open.
ZK Rollups: zkSync Era
ZK rollups replace the optimistic assumption with cryptographic proof. Every batch submitted to Ethereum includes a validity proof (a SNARK or STARK) that the L1 verifier contract checks before accepting the new state root. Invalid state transitions are rejected immediately: there is no challenge window, no reliance on watchers, and no 7-day delay for canonical withdrawals.
zkSync Era processes batches through a prover that generates SNARK proofs for each batch. As of Q1 2025, zkSync Era holds roughly $780M in TVL and accounts for approximately 58% of all ZK proof volume on Ethereum. The ZK Stack framework allows developers to deploy custom chains in rollup mode (data on Ethereum), validium mode (data off-chain), or a hybrid "volition" mode where users choose per-transaction.
The tradeoff is computational overhead. Generating validity proofs requires significant hardware, and proving costs are passed to users (though batching amortizes this). ZK rollups also face EVM compatibility challenges: while zkSync Era supports Solidity, certain opcodes behave differently than on Ethereum mainnet. Upgrades like Airbender (June 2025) and Atlas (October 2025) have reduced proving costs and improved settlement speed.
Payment Channels: Lightning Network
The Lightning Network is a payment channel network built on Bitcoin. Two parties open a channel by locking funds in a 2-of-2 multisig on-chain transaction. They can then exchange an unlimited number of off-chain payments by signing updated channel states. When either party wants to settle, they broadcast the latest state to Bitcoin L1.
Lightning's trust model is trustless in the strict sense: no third party holds custody, and either party can close the channel unilaterally at any time by publishing the latest commitment transaction. Security relies on HTLCs (Hash Time-Locked Contracts) for multi-hop routing and revocation keys to punish counterparties who broadcast outdated states. A justice transaction allows the honest party to claim all channel funds if the other side cheats.
The primary security requirement is liveness: users (or their watchtowers) must monitor the chain during the timelock period to detect and respond to fraudulent close attempts. If a user goes offline for too long and misses a cheating attempt, they can lose funds. This liveness assumption is Lightning's most significant security constraint. For a deeper technical walkthrough, see our research on payment channels from concept to implementation.
Federated Sidechains: Liquid Network
The Liquid Network is a federated sidechain built on Blockstream's Elements platform. Unlike rollups or channels, Liquid does not inherit Bitcoin's security directly. Instead, it relies on a federation of functionaries: a group of known entities that collectively sign blocks and manage the two-way peg between Bitcoin and Liquid.
The federation currently consists of 15 functionaries running Hardware Security Modules (HSMs). Block signing requires an 11-of-15 threshold, and the same threshold governs peg-out transactions. Blocks are produced every 60 seconds in a round-robin rotation, and transactions reach finality after two confirmations (roughly two to three minutes). The HSMs enforce rules like preventing chain reorganizations larger than one block and restricting peg-out destinations to whitelisted addresses.
The critical limitation is that users cannot exit Liquid unilaterally. If the federation goes offline or colludes (11 of 15 functionaries compromised), users lose access to their pegged bitcoin. This stands in contrast to Lightning and Spark, where unilateral exit to Bitcoin L1 is always possible. The Liquid Federation has grown to over 60 members (though only 15 serve as functionaries at a time), and no successful breach has been reported since the network launched in 2018.
Statechain-Based L2: Spark
Spark is a Bitcoin Layer 2 that uses a statechain-based design to transfer ownership of UTXOs off-chain. Rather than opening bilateral channels (like Lightning) or relying on a federation (like Liquid), Spark uses a shared signature scheme where users and a set of operators co-sign transactions via a 2-of-2 multisig. The operators collectively hold one key share using a threshold scheme.
Spark's security rests on a 1-of-N trust assumption: as long as at least one operator in the set honestly deletes their key share after co-signing a transfer, the previous owner cannot collude with operators to double-spend. This is weaker than Lightning's fully trustless model but stronger than Liquid's federation, since compromising Spark requires all N operators to be malicious simultaneously. For a complete technical breakdown, see our research on what Spark is and how it works.
Spark preserves the critical property of unilateral exit: users can broadcast pre-signed transactions to reclaim their bitcoin on L1 at any time, without operator cooperation. This anchoring to Bitcoin's base layer provides a safety net that federated systems like Liquid cannot offer. The protocol also supports stablecoins natively (including USDB), enabling instant, near-zero-fee dollar transfers on Bitcoin without bridging to another chain.
Security Properties Compared
The following table breaks down specific security properties across all six protocols. These properties determine how each system behaves under adversarial conditions.
| Property | Lightning | Liquid | Spark | Arbitrum | Optimism | zkSync Era |
|---|---|---|---|---|---|---|
| Inherits L1 security | Yes | No | Partial (anchored to L1) | Yes | Yes | Yes |
| Fraud/validity proof | Justice txn (revocation) | None | None (key deletion model) | Interactive fraud proof | Interactive fraud proof | SNARK validity proof |
| Challenge/withdrawal period | Configurable timelock | N/A (federated peg) | Cooperative: instant; unilateral: L1 confirmation | 7 days | 7 days | Hours (proof generation + verification) |
| Unilateral exit to L1 | Yes | No | Yes | Yes | Yes | Yes |
| Liveness requirement | Must monitor chain (or use watchtower) | Federation must be online | Operators must be online for transfers | 1 honest verifier needed | 1 honest verifier needed | Prover must generate proofs |
| Sequencer/operator centralization | None (peer-to-peer) | 15 functionaries | Multiple operators (expanding) | Centralized sequencer | Centralized sequencer | Centralized sequencer |
| Censorship resistance | High (unilateral close) | Low (federation can censor) | Medium (can exit to L1) | Medium (forced inclusion via L1) | Medium (forced inclusion via L1) | Medium (forced inclusion via L1) |
| Data availability | Channel peers only | Sidechain full nodes | Operators + user | Ethereum L1 | Ethereum L1 | Ethereum L1 or off-chain (validium) |
Attack Surfaces and Failure Modes
Each security model introduces distinct attack vectors:
- Lightning: a counterparty broadcasts an outdated channel state. If the victim (or their watchtower) is offline during the timelock window, funds can be stolen. Routing attacks and channel probing can also leak payment information.
- Liquid: if 11 of 15 functionaries collude or are simultaneously compromised, they can steal all pegged bitcoin or censor transactions. The federated model concentrates risk in a known set of entities.
- Spark: if all N operators collude with a previous owner and refuse to delete their key shares, they can double-spend a leaf. In practice, this requires every operator to be malicious simultaneously, which becomes less likely as the operator set grows.
- Arbitrum/Optimism: a compromised sequencer can censor or reorder transactions (extracting MEV) but cannot steal funds because L1 fraud proofs remain the final arbiter. The 7-day challenge window is the critical security parameter: if no honest verifier submits a fraud proof during that window, an invalid state root finalizes.
- zkSync Era: the prover infrastructure must remain operational. If the prover goes offline, no new batches finalize, though existing funds remain safe. In validium mode, if the off-chain data availability provider goes offline, state reconstruction becomes impossible without backup data sources.
How to Choose a Layer 2 by Security Requirements
The right security model depends on what you are optimizing for:
If you need fully trustless, peer-to-peer payments on Bitcoin: Lightning provides the strongest security guarantees with no third-party trust beyond standard cryptographic assumptions. The cost is channel management complexity and the liveness requirement.
If you need fast Bitcoin transactions with stablecoins and minimal channel overhead: Spark offers self-custodial transfers with unilateral exit, at the cost of a 1-of-N trust assumption on operators. It supports native stablecoin payments (USDB) without bridging.
If you need EVM-compatible smart contracts with L1 security: optimistic rollups (Arbitrum, Optimism) provide full Ethereum security inheritance with mature tooling. Accept the 7-day canonical withdrawal delay or use third-party bridges.
If you need fast finality and cryptographic proof guarantees on Ethereum: ZK rollups (zkSync Era) eliminate the challenge window and offer the strongest theoretical security among rollup designs. Accept higher computational overhead and occasional EVM compatibility gaps.
If you need confidential transactions and fast settlement for institutional use: Liquid's federated model provides 2-minute finality and built-in Confidential Transactions. Accept the federation trust assumption and lack of unilateral exit.
Frequently Asked Questions
What is the most secure Layer 2 solution?
Security depends on the threat model. For pure trustlessness, Lightning Network requires no trust beyond Bitcoin's own consensus and standard cryptography. For smart contract platforms, ZK rollups like zkSync Era offer the strongest guarantees because every state transition is cryptographically proven before L1 accepts it. Optimistic rollups (Arbitrum, Optimism) are also L1-secured but rely on at least one honest verifier submitting fraud proofs within the 7-day window.
Can you lose funds on a Layer 2?
Yes, though the risk profile varies. On Lightning, funds can be lost if you go offline and miss a fraudulent channel close during the timelock period. On Liquid, a federation compromise (11 of 15 functionaries) could result in loss of pegged bitcoin. On Spark, all operators would need to collude with a previous owner to double-spend. On optimistic rollups, funds are safe as long as one honest verifier exists. On ZK rollups, funds are safe as long as the validity proof system is sound.
What is the difference between a rollup and a sidechain?
A rollup posts transaction data to the base chain (Ethereum L1) and uses fraud proofs or validity proofs to inherit L1 security. A sidechain is an independent blockchain with its own consensus mechanism, connected to the main chain via a two-way peg. Sidechains are responsible for their own security, while rollups derive security from the base layer. This distinction is why rollups are considered "true" Layer 2s while sidechains are sometimes classified separately.
Why do optimistic rollups have a 7-day withdrawal period?
The 7-day challenge window gives verifiers enough time to detect and submit fraud proofs against invalid state transitions. If the window were shorter, an attacker could try to submit a fraudulent batch and finalize it before anyone notices. Both Arbitrum and Optimism use this 7-day period for canonical bridge withdrawals. Users can bypass the wait by using third-party liquidity bridges, which charge a small fee to front the withdrawal.
Is Spark trustless like Lightning?
Spark is trust-minimized rather than fully trustless. Lightning requires no trust in any third party: the two channel participants enforce correct behavior through on-chain penalty mechanisms. Spark requires a 1-of-N trust assumption: at least one operator must honestly delete their key share after each transfer. This is a weaker guarantee than Lightning but significantly stronger than a federation (Liquid) or a custodial service. Spark compensates by providing unilateral exit to Bitcoin L1, ensuring users can always recover their funds.
What is data availability and why does it matter for Layer 2 security?
Data availability refers to whether the transaction data needed to reconstruct the Layer 2 state is accessible. If data is unavailable, users cannot prove their balances or exit to L1. Rollups post data to Ethereum L1 (strongest guarantee). Lightning stores data locally between channel peers. Liquid stores data on sidechain nodes. zkSync Era offers a configurable spectrum: full rollup mode (data on Ethereum), validium (data off-chain), or volition (user chooses per transaction). If the data availability layer fails, users may be unable to withdraw funds.
How does the Liquid federation compare to rollup security?
They are fundamentally different models. Rollups inherit L1 security through proofs: even if every rollup operator is malicious, users can force correct outcomes via the base chain. Liquid relies on the honesty of a federation: if 11 of 15 functionaries collude, users have no recourse. Rollups provide stronger security guarantees but are currently only available on Ethereum. Liquid operates on Bitcoin, where rollup infrastructure does not yet exist, making it a practical tradeoff for users who need fast Bitcoin settlement with confidential transactions.
This tool is for informational purposes only and does not constitute financial advice. Security models are described based on publicly available documentation and may change as protocols upgrade. Always review official protocol documentation and conduct your own research before entrusting funds to any Layer 2 system.
Build with Spark
Integrate bitcoin, Lightning, and stablecoins into your app with a few lines of code.
Read the docs →
