Logo
Learn
  • Explore Course
Build
  • Explore Buildathon
  • Project Archive
Hack
Hack Coming Soon
  • Explore IRL Hackhouse
  • How to Qualify
  • Past Events

GoalOracle

Agent-native World Cup oracle: free live data via MCP Server, premium analytics behind an x402 USDC paywall on Injective, CCTP funding, Agent Skills. Agents pay per call - no API keys.

Videos

Description

# GoalOracle โ€” Submission

**World Cup data for AI agents. No API keys โ€” agents pay per call.**

## Links

| | |
|---|---|
| ๐Ÿ”— GitHub repository | https://github.com/wildanre/goaloracle |
| ๐ŸŒ Live product | https://goaloracle-kappa.vercel.app |
| ๐ŸŽฅ Demo video + announcement | https://x.com/danuste10/status/2081300064832803013 |
| ๐Ÿ“„ Demo script | [DEMO.md](../DEMO.md) |

## Overview

AI agents can't sign up for sports data APIs โ€” subscriptions, API keys, and manual onboarding all assume a human. GoalOracle solves this for the 2026 World Cup with an **agent-native data oracle**:

- **Free tier** โ€” live scores, fixtures, and group standings for anyone: plain HTTP, an MCP server, or the dashboard. No key, no account.
- **Premium tier** โ€” deterministic match analytics (Poisson win probabilities, expected goals, form indices, head-to-head) priced at $0.01โ€“$0.02 per call behind an **x402 paywall**: the server answers HTTP 402 with a quote, the agent signs a gasless EIP-3009 USDC authorization, and the payment settles on **Injective EVM testnet** with a verifiable transaction hash.

Every analysis in our demo material was bought by a wallet, not an API key โ€” the settlement tx is visible in each screenshot and in the video. Our model priced Spain at **79%** before the final (Spain won 1โ€“0) and **84%** in their semifinal (won 2โ€“0).

All analytics are framed as statistical estimates, never betting advice. Testnet only โ€” mainnet values are refused at startup.

## How the four Injective technologies are used

1. **x402** โ€” premium endpoints are mounted behind `injectivePaymentMiddleware` from the official `@injectivelabs/x402` package; the demo client, dashboard, and MCP paid tools use `createInjectiveClient` for the automatic 402 โ†’ sign โ†’ settle โ†’ 200 flow. A preflight layer guarantees a payer is never charged for a failing request, and a local JSON-RPC shim works around the public testnet RPC's broken tx-hash index.
2. **USDC CCTP** โ€” `scripts/fund-wallet-cctp.ts` funds the agent wallet cross-chain: `depositForBurn` on Ethereum Sepolia โ†’ Circle attestation โ†’ `receiveMessage` mints native USDC on Injective (destination domain 29). `--dry-run` prints the full plan.
3. **MCP Server** โ€” `packages/mcp-server` exposes 8 stdio tools (5 free, 2 paid via autonomous x402 payment, 1 wallet status). Verified end-to-end: a headless Claude session checked its own wallet, paid $0.02, and reported the probabilities honestly.
4. **Agent Skills** โ€” three SKILL.md files (`world-cup-analyst`, `match-predictor`, `x402-payer`) teach any agent the tool routing, the check-wallet-then-buy workflow, and funding/troubleshooting. A test pins every tool name in the skills to the real MCP registrations, so they can't drift.

## Repository structure

```
packages/api         Express API โ€” free endpoints + x402-gated premium, rpc-shim, preflight
packages/mcp-server  stdio MCP server (8 tools, autonomous payment)
packages/data        football-data.org provider + bundled mock (zero-config demo)
packages/analysis    pure deterministic Poisson analytics engine
skills/              3 Agent Skills (auto-loaded via .claude/skills for Claude Code users)
scripts/             demo orchestrator ยท x402 demo client ยท CCTP funding script
public/              single-file dashboard (shadcn zinc dark, live x402 payment trace)
video/               Remotion demo video project (motion graphics, ElevenLabs voiceover)
docs/                plans, learnings log, submission assets
```

## Try it

```bash
pnpm i && pnpm demo     # clean machine, zero env vars: mock data + x402 dry mode
```

With funded testnet keys in `.env`, the same command settles real USDC on Injective and prints the explorer link. Full setup, API reference, and MCP install snippet are in the [README](../README.md).

Quality gates: 36 tests, `tsc --noEmit` clean, verified real on-chain settlements through the API, dashboard, MCP tools, and the deployed Vercel instance.

Progress During Hackathon

<p>Built from scratch, end to end, during the hackathon window:</p><p>- Data core &amp; free API โ€” pnpm monorepo (strict TS), <a href="http://football-data.org">football-data.org</a> provider with zod validation + bundled mock fallback so a clean clone demos with zero accounts; Express API with caching and structured errors.</p><p>- Analytics engine โ€” pure deterministic Poisson model (win probabilities, expected goals, form, H2H). It priced Spain at 79% for the final โ€” correctly.</p><p>- x402 paywall (real settlements) โ€” premium endpoints behind the official @injectivelabs/x402 middleware; verified live: HTTP 402 quote โ†’ gasless EIP-3009 signature โ†’ USDC settled on Injective EVM testnet with tx hashes. Hardened along the way: a preflight layer so payers are never charged for failed requests, and a JSON-RPC shim that recovers receipts from the public testnet RPC's broken tx index (documented in docs/<a href="http://LEARNINGS.md">LEARNINGS.md</a>).</p><p>- MCP server + Agent Skills โ€” 8 stdio tools; proven autonomy: a headless Claude agent followed our match-predictor skill, checked its own wallet, paid $0.02, and reported honestly. Three <a href="http://SKILL.md">SKILL.md</a> files are test-pinned to real tool names.</p><p>- CCTP funding script โ€” Sepolia โ†’ Injective (domain&nbsp;29) with --dry-run plan.</p><p>- Dashboard โ€” shadcn-dark single-file UI with a live x402 payment trace; deployed to Vercel with real on-chain settlement from serverless.</p><p>- Quality &amp; docs โ€” 36 tests, tsc --noEmit clean, pnpm demo E2E on a clean machine; README, <a href="http://DEMO.md">DEMO.md</a>, compound-engineering learnings log; Remotion demo video (motion graphics + ElevenLabs voiceover).</p>

Tech Stack

ReactWeb3AINode

Fundraising Status

<p> Not fundraising. GoalOracle is a self-funded, open-source (MIT) hackathon project built for the Injective Global Cup. No external funding raised or sought to date โ€” future development would focus on extending the x402-gated oracle pattern to other live-data domains.</p>

Team Leader
MMuhammad Wildanu
GitHub Link
github

GitHub

https://github.com/wildanre/goaloracle