Layer-2 rollups execute transactions off Ethereum's main chain (layer 1), then bundle the results and post compressed data back to layer 1. This keeps most of the computational work off the expensive base chain while still inheriting its security.
Optimistic vs. zero-knowledge rollups
Optimistic rollups assume transactions are valid by default and allow a challenge window for anyone to dispute them with fraud proofs. Zero-knowledge rollups instead generate a cryptographic proof that the transactions are valid before they are ever posted, which settles faster but requires more complex infrastructure.
Why security is not sacrificed
Because the underlying transaction data (or proofs of it) is posted to Ethereum's layer 1, rollups inherit Ethereum's security guarantees rather than running an independent, less-secured chain.
Related Articles
What the Ethereum Merge Actually Changed
Ethereum switched from proof-of-work to proof-of-stake in 2022. Here is what that transition actually altered under the hood.
