Exit to App
Getting Started

How MOI Works

Step-by-step breakdown of the end-to-end treasury execution pipeline.

The MOI execution pipeline consists of 12 deterministic stages coordinating the owner, agent orchestrator, policy engine, Textile reactor, and Celo blockchain.

Deterministic 12-Step Execution Pipeline

  1. CONNECT
  2. MANDATE
  3. MONITOR
  4. PREVIEW
  5. FIRM_RFQ
  6. POLICY_CHECK
  7. ATTESTATION
  8. SUBMIT
  9. CONFIRM
  10. SETTLE
  11. RECONCILE
  12. AUDIT
Figure 2: Linear state progression of an authorized MOI treasury trade.
  1. 1

    Owner Authentication & Treasury Connection

    The owner connects their wallet and completes an EIP-4361 SIWE challenge, initializing an isolated PostgreSQL tenant session.

  2. 2

    Mandate Registration

    The owner sets policy constraints: allowed corridor (e.g. cNGN/USD₮), daily spend caps, max slippage, and target portfolio allocation.

  3. 3

    Telemetry & Drift Detection

    The agent continuously calculates portfolio drift. If local currency balances exceed the target threshold, a rebalance intent is triggered.

  4. 4

    Textile FX Quote Discovery

    MOI requests a firm RFQ from Textile FX v2 (POST /v2/rfq/request), receiving guaranteed rates and calldata targeted at the LimitOrderReactor.

  5. 5

    Deterministic Policy Evaluation

    The policy engine evaluates all 18 rules. If all pass, it signs an HMAC-SHA256 policy attestation token binding the execution parameters.

  6. 6

    Execution & Settlement Verification

    The transaction is signed by the restricted signer (or approved by the owner), tagged with ERC-8021 metadata, broadcast to Celo Mainnet, and verified onchain.

  7. 7

    Double-Entry Ledger Reconciliation

    The journal entry engine records debit and credit legs across treasury assets, clearing accounts, and protocol fee expenses.