AI-Oracle Powered Prediction Markets on GenLayer
Welcome to the Gnothi documentation. This guide covers everything from basic concepts to advanced deployment.
| Document | Description |
|---|---|
| Introduction | What is Gnothi, the oracle problem, and how AI consensus solves it |
| Architecture Overview | System design, component diagrams, and data flow |
| Core Components | Smart contracts, bridge service, and frontend details |
| Document | Description |
|---|---|
| NEWS Market Flow | Complete end-to-end walkthrough of market resolution |
| SCEM Payout Mechanism | Mathematical foundation of fair payout distribution |
| AI Console | Real-time validator transparency feature |
| Document | Description |
|---|---|
| Deployment Guide | Step-by-step deployment instructions |
| API Reference | Complete bridge service HTTP API documentation |
| Troubleshooting | Common issues and solutions |
# 1. Clone repository
git clone https://github.com/enliven17/gnothi.git
cd gnothi
# 2. Install dependencies
cd contracts && npm install
cd ../frontend && npm install
cd ../bridge/service && npm install
# 3. Configure environment
# See ./07-deployment.md for detailed setup
# 4. Start development
cd contracts && npm run compile
cd ../frontend && npm run dev
cd ../bridge/service && npm run dev- Connect Wallet: Navigate to the app and connect your wallet
- Browse Markets: Explore active prediction markets
- Place Bets: Bet on outcomes with confidence levels (1-99%)
- Watch Resolution: Track AI validators resolving markets in real-time
- Claim Winnings: Receive SCEM-weighted payouts
Gnothi is a cross-chain prediction market protocol that uses AI consensus to resolve real-world events.
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Create │────▶│ Trade │────▶│ Resolve │
│ Market │ │ Bets │ │ with AI │
└──────────────┘ └──────────────┘ └──────────────┘
│ │ │
▼ ▼ ▼
Base Sepolia Base Sepolia GenLayer + Bridge
(EVM) (EVM) (AI Consensus)
- AI Oracle Resolution: 5 LLM agents reach consensus via Optimistic Democracy
- Cross-Chain Architecture: Base ↔ GenLayer communication via LayerZero
- SCEM-Weighted Payouts: Mathematically optimal incentive mechanism
- AI Transparency Console: Real-time visibility into validator decisions
Start here:
- Introduction - Understand what Gnothi is
- NEWS Market Flow - See how a market works
- AI Console - Learn about the transparency feature
Start here:
- Architecture Overview - System design
- Core Components - Contract and service details
- Deployment Guide - Deploy your own instance
Start here:
- API Reference - HTTP API documentation
- Core Components - Contract interfaces
- SDK Usage - TypeScript client examples
┌─────────────────────────────────────────────────────────────────┐
│ GNOTHI ECOSYSTEM │
└─────────────────────────────────────────────────────────────────┘
┌──────────────────────┐ ┌──────────────────────┐
│ BASE SEPOLIA │ │ GENLAYER │
│ (Trading Layer) │ │ (Resolution Layer) │
│ │ │ │
│ • BetFactoryCOFI │ │ • NewsOracle.py │
│ • BetCOFI │◄───────▶│ • AI Consensus │
│ • SCEM Scoring │ LZ V2 │ • Validator Network │
│ • USDC Payments │ │ • Web Scraping │
└──────────────────────┘ └──────────────────────┘
│ │
└───────────┬───────────────────┘
│
┌───────────▼───────────┐
│ Bridge Service │
│ (Node.js Relay) │
│ • Event Polling │
│ • Oracle Deployment │
│ • HTTP API │
└───────────────────────┘
│
┌───────────▼───────────┐
│ Frontend (Next.js) │
│ • Market UI │
│ • AI Console │
│ • Wallet Integration│
└───────────────────────┘
| Layer | Technology | Purpose |
|---|---|---|
| Smart Contracts | Solidity 0.8.22 | EVM logic (Base Sepolia) |
| AI Oracle | Python (GenLayer) | Market resolution |
| Cross-Chain | LayerZero V2 | Base ↔ GenLayer messaging |
| Frontend | Next.js 15 + TypeScript | User interface |
| Scoring | SCEM Library | Fair payout calculation |
| Bridge | Node.js + Express | Event relay + HTTP API |
- Gnothi Demo - 5-minute walkthrough
- How AI Consensus Works - Technical deep dive
- SCEM Explained - Payout mechanism tutorial
- GitHub: https://github.com/enliven17/gnothi
- App: https://app.gnothi.xyz
- Twitter: https://twitter.com/gnothi
- Discord: https://discord.gg/gnothi
- GenLayer: https://genlayer.org
- LayerZero: https://layerzero.network
| Network | Status | Contracts |
|---|---|---|
| Base Sepolia | ✅ Active | View |
| GenLayer Bradbury | ✅ Active | View |
| Base Mainnet | 🔜 Coming Soon | - |
We welcome contributions! See our Contributing Guide for details.
MIT License - see LICENSE for details.
- Documentation: https://docs.gnothi.xyz
- Discord: https://discord.gg/gnothi
- Email: support@gnothi.xyz
| Date | Version | Changes |
|---|---|---|
| 2025-04-01 | 1.0.0 | Initial documentation release |
| 2025-04-01 | 1.0.1 | Added troubleshooting guide |
Last Updated: April 1, 2026