# Two-Step ZKP Submission Mechanism

Merlin Chain will adopt the two-step Zero-Knowledge Proof (ZKP) submission mechanism proposed by Lumoz to achieve decentralized Proof of Work (PoW):

<figure><img src="/files/DZFS59u09s2O66QYSGJn" alt=""><figcaption><p>Merlin's ZKP Submission Mechanism</p></figcaption></figure>

1. **Hash Submission**
   * The prover generates a ZKP for a specific sequence and first calculates the hash of the proof/address.
   * This hash, along with the prover's address, is submitted to a chain-level smart contract.
   * The proof represents the ZKP of the sequence, while the address identifies the prover.
   * Initial hash submissions by provers are unrestricted and are processed and accepted within the following T+10 blocks. After the T+11 block, new provers are not allowed to submit additional hashes.
2. **ZKP Submission**
   * After the T+11 block, any prover can submit the complete ZKP.
   * A verified ZKP can be used to validate all previously submitted hashes.
   * Provers will receive PoW rewards based on their staked proportion.

This mechanism effectively incentivizes miners to remain online, ensuring a stable computational environment, further enhancing the network's security and reliability:

* **Prevents Race Attacks**: Prevents malicious participants from attempting to disrupt or damage the system by quickly submitting a large number of proofs.
* **Encourages Stable Participation**: Rewards incentivize miners to provide stable and continuous ZKP computation power, enhancing the network's security and reliability.
* **Ensures System Efficiency**: Ensures efficiency and fairness, avoiding resource wastage and network congestion, while improving overall system performance and stability.


---

# 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.merlinchain.io/merlin-docs/about-merlin/key-modules/two-step-zkp-submission-mechanism.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.
