FlashBet-AI_demo.mp4
Frontend: https://flashbet-ai.vercel.app Backend API: https://warning-apparel-journal-pst.trycloudflare.com
Production Status: β Live on Conway Testnet with 10 demo markets
Quick Commands:
- Check Status:
./scripts/check_status.sh - Run Demo:
./scripts/demo_full_cycle.sh
gantt
title FlashBet AI - Linera Buildathon 2025 Roadmap
dateFormat YYYY-MM-DD
axisFormat %b %d
section Wave 1 β
MVP Foundation :done, w1, 2025-10-20, 10d
section Wave 2
Security & Wallets :active, w2, 2025-11-03, 10d
section Wave 3
Market Expansion :w3, 2025-11-17, 10d
section Wave 4
Order Book System :w4, 2025-12-01, 10d
section Wave 5
Security & Expansion :w5, 2025-12-15, 24d
section Wave 6
Optimization & Social :w6, 2026-01-12, 10d
section Post-Hackathon
Enterprise Features :p1, 2026-02-01, 90d
Global Expansion :p2, 2026-05-01, 90d
Ecosystem Growth :p3, 2026-08-01, 120d
Full Decentralization :p4, 2027-01-01, 180d
| Wave | Period | Focus | Status |
|---|---|---|---|
| Wave 1 | Oct 20-29 | MVP Foundation | β Complete |
| Wave 2 | Nov 3-12 | Security & Wallets | Next |
| Wave 3 | Nov 17-26 | Market Expansion | Planned |
| Wave 4 | Dec 1-10 | Order Book System | Planned |
| Wave 5 | Dec 15-Jan 7 | Security & Expansion | Planned |
| Wave 6 | Jan 12-21 | Optimization & Social | Planned |
Wave 1: MVP Foundation β
- 3 Linera microchains deployed (User, Market, Oracle)
- Multi-market architecture with 10 demo markets
- Production deployment with HTTPS
Wave 2: Security & Wallets π
- Smart contract security audit and fixes
- MetaMask integration with EIP-712 signatures
- Complete test suite (>90% coverage)
Wave 3: Market Expansion
- Expand to 15+ sports (NHL, UFC, Golf, Cricket, Esports)
- Live in-game betting with real-time odds
- Multiple oracle sources (The Odds API, ESPN, Chainlink)
Wave 4: Order Book System
- CLOB (Central Limit Order Book) Polymarket style
- Limit orders, market orders, stop-loss
- Hybrid parimutuel + order book model
Wave 5: Security & Expansion
- CLOB smart-contract audit
- Adding politics, finance, crypto events
Wave 6: Optimization & Social
- Advanced analytics dashboard (P&L, win rates, ROI)
- Social features (leaderboards, profiles, following)
Post-Hackathon Goals (2026)
- Advanced risk management tools
- Multi-language support (10+ languages)
- Regulatory compliance framework (KYC/AML)
- Enhanced security: Multi-sig wallets, cold storage
- Prediction markets beyond completed (geopolitics, weather, economics)
- Conditional markets (e.g., "Team A wins IF Player X plays")
- AI-powered odds recommendations
- Risk assessment tools for users
- Fraud detection and prevention
- Predictive analytics for market trends
- Transition to fully decentralized governance
- Community-run oracle network
- Decentralized moderation and dispute resolution
βββββββββββββββββββ
β User Chain β β Balance: 1000 tokens
β (Your Wallet) β β Places bet: 100 tokens on mlb_game_001
ββββββββββ¬βββββββββ
β Cross-Chain Message
β
βββββββββββββββββββββββββββββββββββββββββββ
β Market Chain (Multi-Market Support) β
β ββ mlb_game_001 (100 tokens on Home) β
β ββ nba_game_001 (200 tokens on Away) β
β ββ nfl_game_001 (150 tokens on Draw) β
ββββββββββ¬βββββββββββββββββββββββββββββββββ
β Subscribes to Oracle Events
β
βββββββββββββββββββββββββββββββββββββββββββ
β Oracle Chain β
β β Auto-creates markets from live data β
β β Publishes results: mlb_game_001 HOME β
ββββββββββ¬βββββββββββββββββββββββββββββββββ
β Event Stream
β
βββββββββββββββββββββββββββββββββββββββββββ
β Market Chain β
β β Auto-resolves mlb_game_001 β
β β Distributes winnings to User Chains β
βββββββββββββββββββββββββββββββββββββββββββ
- Deposit: User deposits funds to their User Chain
- Place Bet: User places bet β cross-chain message to Market Chain
- Pool Creation: Market Chain creates betting pool, calculates live odds
- Result Fetching: Oracle Worker fetches game results from The Odds API
- Publication: Oracle Chain publishes results via event stream
- Resolution: Market Chain auto-resolves, calculates payouts
- Distribution: Winnings sent back to User Chains automatically
Performance: Full bet-to-payout cycle in <10 seconds (Linera sub-second finality)
Conway Testnet:
Chain ID: 15fbdd3dc9cad5ab05ac3c77e0645962f6bc6f90c213b0e4787b9ab8bedb8ec7
Oracle App: d4a3c79502b626278c2d10457947440a7b72f86207ac2349e68fd7ece154ce01
Market App: 8d4e1c6afd378769dafb2fc8cee0897f886d127a9160757e0c2c3317a31e8017
User App: 8fd6c26d5068f53015fcf90f3770e325d55b98e27ddadb9054d60372f6421156Purpose: Personal wallet chain for each user
Features:
- Deposit/withdraw token management
- Place bets with cross-chain messaging to Market Chain
- Receive payouts automatically via cross-chain messages
- Track active bets and betting history
Purpose: Central betting pool and odds calculation engine
Features:
- Multi-market architecture: Unlimited markets per chain (EventId-indexed with MapView)
- Parimutuel pool betting with three outcomes (Win/Loss/Draw)
- Real-time odds calculation:
odds = totalPool / winningPool - Auto-resolution via Oracle Chain event stream subscriptions
- Automatic payout distribution to winning User Chains
Purpose: Trusted result publication and event streaming
Features:
- Publish verified game results with authorization checks
- Oracle authorization management (only approved oracles can publish)
- Idempotency protection (prevents duplicate result publication)
- Event streams for Market Chain subscriptions
- Result history storage for transparency
Purpose: Shared types and message definitions across all contracts
Features:
- Common types:
EventId,Outcome,BetDetails,OracleResult,Payout - Cross-chain message definitions for User β Market β Oracle communication
Purpose: Automated market creation and result publishing service
Features:
- The Odds API integration for live sports data (500 requests/month free tier)
- Auto-creates markets 24 hours before game start time
- Featured game detection (playoffs, rivalries, championships)
- Polls completed games every 5 hours (optimized for free tier quota)
- Publishes results to Oracle Chain automatically via GraphQL mutations
- Mock mode for testing without API key
- Quota tracking and rate limit handling
Purpose: User interface for the betting platform
Features:
- Real-time balance display with 3-second polling
- Live odds calculation display for all markets
- Bet placement with amount validation and confirmation
- Oracle panel for manual market resolution (demo mode)
Tech: React 19, TypeScript, Vite, Apollo Client (GraphQL), Tailwind CSS v4
Key Components:
MarketsList.tsx- Market display with filtering and oddsUserBalance.tsx- Balance card with deposit/withdrawOraclePanel.tsx- Manual result publication for demosapollo.ts- GraphQL configuration with environment variables
Location: frontend/src/
| Layer | Technology |
|---|---|
| Blockchain | Linera Protocol (Conway Testnet) |
| Smart Contracts | Rust 1.86.0, Linera SDK v0.15.4 |
| Oracle Worker | TypeScript, Node.js, The Odds API |
| Frontend | React 19, TypeScript, Vite |
| GraphQL Client | Apollo Client |
# Terminal 1: Start GraphQL service
./scripts/start_service.sh
# Terminal 2: Run automated test
./scripts/test.sh# Terminal 1: Start GraphQL service
./scripts/start_service.sh
# Terminal 2: Start frontend
cd frontend && npm install && npm run dev
# Open http://localhost:5173Complete betting cycle demonstration with 10 live markets:
# Ensure service is running
./scripts/start_service.sh
# Run full demo (deposit β bet β oracle β payout)
./scripts/demo_full_cycle.shDemo shows: Balance check β Deposit 500 tokens β Browse 10 markets β Place bet on Yankees β View odds β Oracle publishes result (Yankees WIN) β Auto-resolve β Receive payout β Final summary
See: DEMO_SCRIPT.md for detailed documentation