# 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="https://4229568706-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuWoxXnGgpNfN7RzTGB3%2Fuploads%2FLV3fP8hu8i4MB6LMNcjw%2Fimage%20(5).png?alt=media&#x26;token=74a6144d-fe59-493c-a2b5-6d3cb5e4197c" 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.
