# Verification Phase

After the zk-proof is generated by the executor, it must be validated on-chain. This step is performed by a **Verifier Smart Contract on Ethereum**, ensuring that:

* The model used is authorized and registered,
* The input/output are consistent with the request,
* The zk-proof is cryptographically correct.

Only upon successful verification can any payment or downstream logic (like RWA royalty distribution) be triggered.

***

**🔐 Verifier Responsibilities:**

| Step                                    | Action                                                           |
| --------------------------------------- | ---------------------------------------------------------------- |
| 1. Retrieve `InferenceRequest`          | Based on request ID or hashes                                    |
| 2. Load model verifier key              | From `zkRegistry` or verifier reference                          |
| 3. Validate zk-proof                    | Using the on-chain verifier logic                                |
| 4. Confirm `input_hash` + `output_hash` | Must match expected values from the job                          |
| 5. Emit verification event              | Confirmation event used by settlement, dashboards, and RWA logic |

***

**📦 Verified Inference Struct:**

```solidity
struct VerifiedInference {
  bytes32 request_id;
  bytes32 model_hash;
  bytes32 proof_hash;
  bytes32 input_hash;
  bytes32 output_hash;
  uint64 verified_at;
}
```

All fields are cryptographically enforced and emitted in a verification log, allowing trustless downstream automation.

***

**🧠 zk-Proof Systems Supported:**

* Halo2, Groth16, Plonk (modular verifier contracts)
* Verifier addresses are registered per model in the zkRegistry
* Supports both monolithic and recursive circuits

***

**🌍 RWA Integration:**

* **Verification = Revenue Activation**: RWA-linked models/agents receive payment only after successful proof verification.
* **Immutable Traceability**: Logs can be queried to track real-world asset performance and yield events.
* **Regulatory Alignment**: Provides cryptographic evidence of every monetized AI action — auditable and timestamped.

> The verifier contract is not just a filter — it’s the **gatekeeper of revenue** in a cryptographically enforced AI economy.
