# End-to-End Flow: DAO Delegation Automation

This section illustrates how a DAO can execute **trustless, tokenizable validator delegation** using a zk-model deployed through Orby AI. Each step is verifiable, monetizable, and enforceable on Ethereum.

***

**🌀 Phase 1: Metrics Collection**

The DAO compiles a dataset of validator metrics such as:

* 30-day uptime,
* Recent slashing incidents,
* Average staking APR,
* MEV activity or commission rates.

→ The dataset is hashed (`input_hash`) and submitted as part of an inference request.

***

**📦 Example Input Payload:**

```json
{
  "validators": [
    {"id": "0xA1", "uptime": 0.97, "apr": 5.4, "slashed": false},
    {"id": "0xC2", "uptime": 0.92, "apr": 5.9, "slashed": true}
  ]
}
```

***

**🌀 Phase 2: Model Selection & Dispatch**

* DAO references a pre-approved zk-model (`model_hash`) from the Orby AI zkRegistry.
* Validator contract dispatches the task to an executor node.
* Model: `Orby-RWA-StakeOpt v1.2`
* RWA Token: `StakeOptToken`

***

**🌀 Phase 3: zk-Inference Execution**

* Executor loads the model.
* Runs zk-circuit with DAO-provided input.
* Produces `zk-proof`, `output_hash`, `proof_hash`.

***

**🌀 Phase 4: On-Chain Verification**

* Verifier contract checks:
  * Model hash matches registry
  * zk-proof is valid
  * Input/output integrity is preserved
* Emits `InferenceVerified` event:

```solidity
event InferenceVerified {
  bytes32 model_hash;
  address dao;
  bytes32 input_hash;
  bytes32 output_hash;
  bool success;
}
```

***

**🌀 Phase 5: DAO Stake Reallocation**

* DAO smart contract reads verified output (e.g., top 3 validators).
* Triggers capital movement via staking/re-delegation logic.
* Records action in DAO log for governance transparency.

***

**🌀 Phase 6: Revenue Settlement**

* Model owner receives 60% of the inference fee (e.g., 0.6 $ORBY).
* If tokenized, the fee is routed to `StakeOptToken` contract.
* Token holders receive proportional share via payout contract.

***

> From input to execution to payout, every action is backed by math, traceable by DAO, and monetizable through RWA logic.
