# Model Registration (One-Time)

Before an AI model can be used within the Orby AI network, it must be registered through a one-time process that cryptographically anchors its identity, verification logic, and metadata to Ethereum smart contracts.

This ensures:

* **Immutable model identity**
* **Proof compatibility enforcement**
* **Optional RWA token linkage**

***

**🧾 Registration Workflow:**

1. **Model developer** compiles the model into a zero-knowledge circuit.
2. A **unique hash** (e.g., SHA-256 of the zk-circuit) is generated.
3. Metadata is prepared (e.g., zk format, version, license terms).
4. Developer submits to the `zkRegistry` via `ModelSubmission` contract.

***

**📦 On-Chain Structure (Simplified):**

```solidity
struct ModelSubmission {
  bytes32 model_hash;        // Unique zk-circuit hash
  address verifier_contract; // Ethereum contract used for zk verification
  address owner;             // Wallet entitled to inference royalties
  uint64 timestamp;          // Registration time
  string metadata_uri;       // Off-chain descriptor (IPFS, Arweave)
}
```

***

**🧠 Off-Chain Metadata Example:**

```json
{
  "name": "RWA-Yield-Optimizer-v1",
  "zk_format": "Halo2",
  "input_spec": "[APR, stake_volume]",
  "output_spec": "[reallocation_target]",
  "accuracy": 0.921,
  "rwa_token": "0xTokenizedModelERC20",
  "description": "Optimizes validator restaking using zkML."
}
```

***

**🌍 RWA Integration:**

* **Ownership Tokenization:** The `owner` address can be a smart contract that manages revenue splits to ERC-20 or NFT holders.
* **Governance-Scoped Models:** DAOs can submit models and bind them to governance logic or yield policy.
* **Usage Metering:** All inference calls are logged and traceable for performance-based monetization.

> Once registered, the model becomes a **verifiable, composable, and revenue-capable digital asset** — optionally wrapped into an RWA token.
