We Provide Refunds for x402 Payments. Wrap calls through our proxy or CLI, pay a small fee per call, get an automatic USDC refund when the API breaks its SLA on latency, availability, or schema.
**Pact-0G is the insurance layer for AI agent API calls on 0G.**
Agents that call 0G Compute today have no recourse when a provider degrades. A breached SLA still gets billed, the agent eats the loss, and nobody on-chain knows it happened. Pact fixes that.
How it works:
1. An endpoint registers on `PactCore` with a flat premium, SLO (e.g. 5s latency), and exposure cap.
2. Integrators top up a per-endpoint **coverage pool** with real USDC.e.
3. Agents call the endpoint via `market-proxy-zerog`. The proxy charges a premium per call, classifies the response against the SLO, and emits a `SettlementEvent`.
4. `settler-evm` batches events, uploads the per-call evidence blob to **0G Storage**, and submits `settleBatch` on **0G Chain**.
5. On success: the premium splits per fee config (Treasury + Affiliates + residual to pool). On breach: the agent gets refunded from the coverage pool, clamped by the hourly exposure cap.
Real USDC.e moves through the protocol. We point at the canonical [XSwap Bridged USDC](https://chainscan.0g.ai/address/0x1f3AA82227281cA364bFb3d253B0f1af1Da6473E), not a mock.
**Why it matters:** the agentic economy needs payment trust layers, not just rails. Pact gives 0G Compute consumers a money-back guarantee, makes provider reliability priceable on-chain, and lets integrators (DEXes, AI marketplaces, agent platforms) bundle insurance into their UX without writing their own claims logic.
This is a real product. The team runs the equivalent stack on Solana mainnet today at `market.pactnetwork.io`. The 0G port is product expansion, not a hackathon-only build.
**Architecture:**
- `protocol-zerog-contracts`: Solidity port of Pact's v1 Pinocchio program. 54/54 tests, 100% line + branch coverage.
- `protocol-zerog-client`: viem bindings, event decoders, error map.
- `zerog-storage-client`: typed wrapper over `@0gfoundation/0g-storage-ts-sdk`.
- `zerog-compute-client`: typed wrapper over `@0gfoundation/0g-compute-ts-sdk`.
- `market-proxy-zerog`: Hono proxy in front of 0G Compute with ECDSA auth + balance pre-check.
- `settler-evm`, `indexer-evm`, `db-zerog`: NestJS services for batched on-chain settlement and read API.
- `pact-zerog-dashboard`: Next.js dashboard, deployed at https://pact-zerog-dashboard.vercel.app.
- `samples/zerog-demo`: one-shot CLI that runs the full lifecycle end-to-end.
**0G components used (three of five):**
- **0G Chain (Aristotle 16661):** `PactCore` deployed at `0xc702c3f93f73847d93455f5bd8023329a8118b7f`.
- **0G Storage:** per-call evidence blob, rootHash embedded in every `CallSettled` event.
- **0G Compute:** insured inference calls via `market-proxy-zerog`.<pre><code class="language-markdown"><span class="hljs-bullet">-</span> <span class="hljs-strong">**Day 0–1 (2026-05-15): **</span> Validated 0G stack assumptions with throwaway spikes. Foundry deploys with <span class="hljs-code">`cancun`</span> on Galileo testnet, <span class="hljs-code">`@0gfoundation/0g-storage-ts-sdk`</span> round-trips with deterministic rootHash, <span class="hljs-code">`@0gfoundation/0g-compute-ts-sdk`</span> discovery passes. Full numbers in <span class="hljs-code">`spikes/RESULTS.md`</span>. <span class="hljs-bullet">-</span> <span class="hljs-strong">**Week 1–2 :**</span> Scaffolded 9 new packages covering Solidity contracts, viem client, storage + compute typed wrappers, market-proxy, settler, indexer, dashboard. 184 files, ~21K insertions. <span class="hljs-bullet">-</span> <span class="hljs-strong">**Week 3: **</span> Researched the canonical stablecoin on 0G mainnet. Confirmed XSwap Bridged USDC.e via Chainlink CCIP exists at <span class="hljs-code">`0x1f3AA82227281cA364bFb3d253B0f1af1Da6473E`</span> (6 decimals, ~1.7M circulating supply). USDT0 explicitly doesn't support 0G yet, so the protocol is USDC-only by ecosystem constraint. Wired the deploy script to point at the real token instead of MockUsdc on mainnet. <span class="hljs-bullet">-</span> <span class="hljs-strong">**Week 4: **</span> Deployed <span class="hljs-code">`PactCore`</span> to 0G mainnet (Aristotle 16661), registered <span class="hljs-code">`demo-chat`</span> endpoint, topped up the coverage pool with 0.5 USDC.e, settled a 2-call batch (1 non-breach + 1 breach with 0.01 USDC.e refund). Live mainnet evidence: [<span class="hljs-string">settle_batch tx</span>](<span class="hljs-link">https://chainscan.0g.ai/tx/0x218aa729d6f40236be617c946e9e20ee0a1726e38868c1d93ca12b93e6e14f37</span>). <span class="hljs-bullet">-</span> <span class="hljs-strong">**Week 5:**</span> Shipped the read-only dashboard to Vercel at https://pact-zerog-dashboard.vercel.app. Reads <span class="hljs-code">`CallSettled`</span> events directly from PactCore via viem, no indexer needed. <span class="hljs-bullet">-</span> <span class="hljs-strong">**Cuts (honest list):**</span> ERC-7857 INFT integration deferred. Dashboard wallet-connect + demo-runner button cut. <span class="hljs-code">`forge verify`</span> against <span class="hljs-code">`chainscan.0g.ai/open/api`</span> unresolved (Sourcify fallback documented). End-to-end inference POST through the proxy was validated only as far as 0G Compute discovery + provider routing on Galileo. The demo CLI uses a synthetic evidence rootHash instead of an actual 0G Storage upload. Production settler-evm does the upload.</code></pre>
<p>N/A - Self Funded</p>