> For the complete documentation index, see [llms.txt](https://docs.zecrey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zecrey.com/education/concepts-explained/crypto-knowledge/zk-rollup.md).

# ZK-Rollup

Rollup is currently the preferred Layer 2 solution for scaling Ethereum. By packing hundreds of transactions into a single transaction on the L1 network, it helps users drastically reduce the gas fee. Rollup inherits the security of Ethereum by submitting transaction data to L1 network. There are two different ways to implement Rollup: optimistic rollup and zero-knowledge rollup (zk-Rollup). Their main difference is how the transaction data is submitted to L1. Zk-Rollup will package hundreds of off-chain transactions and generate encrypted proofs to submit on chain. It is the Ethereum scalability solution that Vitalik shows a preference for its long-term technical advantage. Zk-Rollup's advantages include: faster completion time, because once the proof is sent to the main chain, the transaction state is instantly verified; less vulnerable to economic attacks that optimistic rollup may suffer; secure and decentralized, as the data needed to restore the state is stored on layer 1. Zecrey employs state-of-the-art zk-Rollup and advanced cryptographic technology to maintain the scalability, security, and privacy of the system.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zecrey.com/education/concepts-explained/crypto-knowledge/zk-rollup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
