Multi-agent consensus oracle for decentralized prediction markets. Three independent AI agents fetch data → majority vote → resolves the market.
User creates market ("BTC > $100k by June 1?")
↓
Users place YES/NO bets
↓
Resolution date arrives
↓
┌─────────────────────────────┐
│ Agent 1: CoinGecko API │ ← free, no key
│ Agent 2: Binance API │ ← free, no key
│ Agent 3: LLM Oracle │ ← Groq / GLM / OpenRouter
└─────────────────────────────┘
↓
Majority vote (2 of 3) → YES / NO / INVALID
↓
Winners paid from pool
- Fork this repo on GitHub
- Go to dash.deno.com → New Project → Link GitHub repo
- Set entry point:
main.ts - In Settings → Environment Variables, add:
GROQ_API_KEY— from console.groq.com (free)- Optionally:
GLM_API_KEY,OPENROUTER_KEY
- Deploy → your oracle is live!
cp .env.example .env
# Edit .env with your keys
deno task dev
# Open http://localhost:8000| Agent | Source | API Key Required |
|---|---|---|
| Agent 1 | CoinGecko Public API | ❌ None |
| Agent 2 | Binance Public API | ❌ None |
| Agent 3 | Groq (llama-3.1-8b) | ✅ Free tier |
| Agent 3 | Zhipu GLM-4-Flash | ✅ Free tier |
| Agent 3 | OpenRouter (free models) | ✅ Free tier |
For crypto markets: Agents 1 & 2 fetch real prices, Agent 3 uses LLM. For sports / politics / custom: All 3 agents use LLM reasoning.
- Crypto — price threshold questions (BTC > $X, ETH > $Y, etc.)
- Sports — match outcomes (team X wins, score > Y)
- Politics — election results, policy decisions
- Custom — anything with a clear YES/NO resolution rule
"price > $100000" → BTC/ETH price check
"price >= $5000" → Ethereum milestone
"team wins the match" → LLM evaluates news
"bill passes senate" → LLM evaluates news
GET /api/markets → list all markets
GET /api/markets/:id → get market detail
POST /api/markets/create → create a new market
POST /api/markets/:id/bet → place a bet
POST /api/markets/:id/resolve → trigger 3-agent resolution
GET /api/stats → platform statistics
GET /api/logs → audit log
GET /health → health check
- Runtime: Deno Deploy (edge, free tier)
- Storage: Deno KV (built-in, free)
- Agents: Fetch + LLM APIs
- Frontend: Single-file, no build step
MIT