Rollup Basics

Before diving in, it’s important to understand what rollups are and the two primary types available. Alchemy Rollups supports both Optimistic Rollups and Zero-Knowledge (ZK) Rollups.

What is a Rollup?

A rollup is a blockchain solution that processes transactions off the main chain while using a Layer-1 blockchain for security. Instead of processing each transaction on the main chain, rollups batch transactions together and post a summary or proof to the Layer-1 network. This approach reduces fees and increases throughput while maintaining the security of the main chain.

Optimistic vs. ZK Rollups

Optimistic Rollups:

  • Assume transactions are valid by default.
  • Use a challenge period to allow for fraud proofs in case of invalid transactions.
  • Typically have a delay for finality due to the challenge period.
  • Provide strong security guarantees through economic incentives.

Zero-Knowledge (ZK) Rollups:

  • Generate a cryptographic proof for each batch of transactions.
  • Allow for near-instant finality since there’s no challenge period.
  • Offer even greater scalability by reducing the amount of data posted to Layer-1.
  • Can be more complex to implement due to the proof generation process.

Choose the framework that best fits your application’s requirements.