0G Chain (chainId 16661)
- Hosts every market.
MarketFactorydeploys EIP-1167 clones ofPredictionMarketplus a freshTreasuryandGimoAdapterper market in a single transaction. - Sub-second finality + cheap gas make per-market provisioning practical (~0.005 0G per market) and let bets feel instant.
- The
AIResolvercontract verifies TEE provider signatures on-chain viaecrecoveragainst an allowlist before forwarding to the market.
0G Compute (TEE)
Three roles share the same OpenAI-compatible inference endpoint, swapped in at runtime via theOG_COMPUTE_PROVIDER_URL / OG_COMPUTE_API_KEY config:
| Role | Where it runs | What it does |
|---|---|---|
| Gatekeeper | apps/api (POST /posts/evaluate) | Scores tweets on falsifiability / clarity / specificity / signal / novelty; rejects unsuitable ones |
| Writer | apps/api (POST /posts/evaluate) | Drafts { question, description, resolutionCriteria, judgePrompt, aiProbability } |
| Judge | apps/judge-worker | Re-runs the frozen judge prompt at resolutionDate, signs the verdict |
AIResolver accepts.
0G Storage
The judge prompt — the deterministic instructions the judge model will read at resolution time — is sealed to 0G Storage at market creation. Only its merkle root lives on-chain (in the market’sjudgeStorageRoot field). At resolve time the worker pulls the full prompt back, runs the judge, and submits the resolution receipt’s merkle root as attestationHash. Anyone can re-fetch and audit.
Gimo Finance (StakePool at 0xAc06d1Df23a4Fa00981aFAC0f33A5936Bd2135aF)
Built on 0G Chain — StaFi LSaaS architecture. Native 0G in → st0G out; the rate appreciates over time. Each market’s Treasury owns a GimoAdapter instance that:
- Calls
stake(referrer)on deposit and holdsst0Gshares. - Calls
unstake(lsdAmount)to start the ~3 day unbonding queue (3 eras × 86400s). - Calls
withdraw()to claim matured tickets back as native 0G.
getRate() hourly and exposes a derived APY at /price/og-yield, which the bet panel uses to project the yield a market will earn between now and resolution. Until enough samples accumulate, the projection falls back to a 5% default that matches the SDK constant.
See GimoAdapter for the full interface and edge cases.
