# How it works

## Optimistic + RollUp + zk-transaction = zkopru

The "Optimistic" way in Ethereum means that we can skip the computation of a transaction by a challenge system if we provide enough data on-chain. Plasma Group brought up this concept to solve the data availability problem in the plasma solutions.

This concept gives us a significant advantage in computation. Especially for the implementation of the zk-transaction on Ethereum, it is necessary to use a SNARK-friendly hash function to construct a Merkle tree, which is usually very expensive on EVM. However, using the optimistic rollup, we can update the SNARK friendly Merkle tree at a low cost compare to computing it on-chain. As a result, this protocol consumes about 8,800 gas per private transaction.

Most of all, Zkopru can continuously upgrade itself because it supports mass migration, which allows moving assets to the other layer-2 network.


---

# Agent Instructions: 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:

```
GET https://docs.zkopru.network/develop/how-it-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
