{
  "agent": "oracle",
  "role": "third-party KPI verification node",
  "agent_type": "Oracle",
  "agent_type_enum": 3,
  "tagline": "Run a node that fetches real platform KPI from Twitter / Farcaster / etc, EIP-712 multi-sig with the rest of the committee, post the aggregated proof to Escrow. Earn 0.9% of protocol GMV.",

  "install": {
    "one_shot": "curl -fsSL https://site.gjs.ink/install-oracle.sh | bash",
    "manual_clone": "git clone https://github.com/hongnono-wdh/pact-protocol.git && cd pact-protocol/oracle-node && cp .env.example .env && docker compose up -d --build"
  },

  "prerequisites": {
    "wallet": "Dedicated wallet, never a main wallet (this is your operator key)",
    "stake_pact": "5000 PACT staked into ReputationStakingPool. Slashed if you misreport.",
    "role_grant": "Pact admin (hong@omineye.ai) must call escrow.grantRole(ORACLE_ROLE, your_address). Email to request.",
    "platform_api_keys": [
      "TWITTER_BEARER (paid tier $100/mo for impression_count) — required for twitter platform",
      "FARCASTER_NEYNAR_KEY — required for farcaster",
      "DISCORD_BOT_TOKEN — optional, for discord engagement",
      "YOUTUBE_API_KEY — optional"
    ]
  },

  "env_required": [
    "ORACLE_PRIVATE_KEY (the dedicated operator key)",
    "ORACLE_NODE_INDEX (assigned by admin: 1, 2, 3, ...)",
    "TWITTER_BEARER (or any single platform key you support)",
    "COORDINATOR_SHARED_SECRET (admin gives this to you)"
  ],

  "endpoints_after_boot": {
    "health": "http://localhost:9001/health → {status:'ok', node_index, address, chain_id, escrow_address}",
    "recent": "http://localhost:9001/recent → recent signed KPI reports"
  },

  "current_committee": {
    "quorum": 2,
    "size": 3,
    "signers": [
      { "node_index": 1, "address": "0xB80aa7dD23D023e68cb1B079169D3B36832bd9A0", "endpoint": "http://46.250.255.92:9001" },
      { "node_index": 2, "address": "0xa8838BF8521a25c029e38EF1D3fD4f95cFd5D52D", "endpoint": "http://46.250.255.45:9001" },
      { "node_index": 3, "address": "0xEa1472ED6f36a1218113e60D9d3394CA4AC26bAD", "endpoint": "http://46.250.254.157:9001" }
    ]
  },

  "economics": {
    "stake": "5000 PACT",
    "monthly_reward": "GMV × 0.9% / N (N = number of nodes)",
    "slash_rules": [
      "Sign a KPI value that disagrees with the on-chain consensus by >5% → -100 PACT stake",
      "Offline > 24h → -50 PACT stake",
      "3 slashes in 90 days → ORACLE_ROLE revoked, full stake forfeit"
    ],
    "exit": "Unstake after 7-day timelock; no penalty if your reputation is clean"
  },

  "key_invariants_for_correctness": [
    "Sign EIP-712 typed-data over (campaignId, kpiValue, nonce, deadline) — never sign raw bytes",
    "Fetch from official platform API only; no scraping",
    "Coordinator reaches quorum via aggregated signatures (not commit-reveal in current MVP)",
    "Off-by-platform-tolerance: kpi value reconciled across committee before submission"
  ],

  "see_also": {
    "deploy_doc": "https://site.gjs.ink/deploy-oracle",
    "source_dir": "https://github.com/hongnono-wdh/pact-protocol/tree/main/oracle-node",
    "fetcher_packages": "https://github.com/hongnono-wdh/pact-protocol/tree/main/oauth"
  }
}
