Overview
GrokMarkets uses xAI's Grok API to automatically resolve prediction markets with 99% reliability and instant (<1 second) response times.
Why Grok API?
| Method | Success Rate | Speed | Cost |
|---|---|---|---|
| Public Grok Tagging | ~20% | 1-24 hours | Free |
| Grok API ✅ | 99% | <1 second | $0.0007 |
Result: 10-100x more reliable for less than a penny per market!
How It Works
Step 1: Market Expires
When a prediction market reaches its end time (e.g., "December 31, 2025 11:59 PM"), it becomes eligible for resolution.
Step 2: Bot Detects Expiration (Every 10 Minutes)
The GrokMarkets bot automatically checks for expired markets every 10 minutes.
Step 3: Grok API Resolution (Instant)
The bot sends the market question to Grok API, which analyzes real-world data and returns a structured JSON response.
Step 4: Public Announcement on Twitter
The bot posts the resolution publicly on Twitter for complete transparency.
Step 5: Automatic Payouts
Winners are paid automatically to their Twitter-linked Solana addresses. No manual claims needed!
Technical Details
Grok API Integration
We use the xAI Grok API (compatible with OpenAI SDK) for market resolution.
Response Format
Grok API returns structured JSON for easy parsing:
Automation Schedule
| Task | Frequency | Purpose |
|---|---|---|
| Check Expired Markets | Every 10 minutes | Detect markets ready for resolution |
| Grok API Call | On-demand | Resolve market instantly |
| Post Resolution | Immediate | Announce outcome on Twitter |
| Process Payouts | Immediate | Pay winners automatically |
Reliability & Fallbacks
Primary: Grok API (99% Success)
Our primary resolution method uses the Grok API for instant, reliable outcomes.
- ✅ 99%+ success rate
- ✅ <1 second response time
- ✅ Structured JSON output (no parsing errors)
- ✅ Real-time data verification
- ✅ Cost: $0.0007 per resolution
Fallback: Public Grok Tagging (20% Success)
If Grok API is unavailable, we fall back to public Twitter mentions.
- Free (no API costs)
- Lower success rate (~20%)
- Slower (1-24 hours)
- Used as backup only
Emergency: 24-Hour Alert System
If a market remains unresolved for 24+ hours, the bot posts a public alert:
Data Sources
Grok AI verifies outcomes using authoritative data sources based on market type:
Cryptocurrency Markets
- CoinGecko - Real-time price data, market caps
- CoinMarketCap - Historical price tracking
- Blockchain explorers - On-chain verification
Stock Markets
- Yahoo Finance - Stock prices, earnings
- Bloomberg - Market data, financial news
- SEC Filings - Official company reports
Political Events
- Official Government Sites - Congress.gov, WhiteHouse.gov
- AP News - Verified political news
- Reuters - International politics
Sports
- Official League Sites - NBA.com, NFL.com, etc.
- ESPN - Game results, statistics
- Official Team Sites - Verified outcomes
Resolution Examples
Example 1: Crypto Market (YES)
Example 2: Stock Market (NO)
Example 3: Political Event (NO)
Resolution Timeline
Here's exactly what happens when a market expires:
What Grok Analyzes
When resolving a market, Grok AI:
1. Parses the Question
- Identifies the claim: "Bitcoin reach $100K"
- Identifies the timeframe: "by December 2025"
- Identifies data source: "per CoinGecko" (if specified)
2. Gathers Evidence
- Queries relevant data sources
- Checks historical data for the timeframe
- Verifies from multiple sources if needed
- Cross-references information
3. Makes Decision
- Compares evidence against claim
- Determines binary outcome: YES or NO
- Provides reasoning with data source
- Assigns confidence level
4. Returns Structured Response
- JSON format (easy for bot to parse)
- Includes outcome, reasoning, and confidence
- Always returns within 1 second
Best Practices for Market Creation
To ensure Grok AI can accurately resolve your market, follow these guidelines:
✅ Good Market Questions:
❌ Avoid These:
Pro Tips:
- Specify data sources: "per CoinGecko", "per Yahoo Finance", "per official results"
- Use specific numbers: "$100K", "$5,000", "500 points"
- Include dates: "by December 2025", "by Q1 2026", "in 30 days"
- Make it binary: YES/NO outcomes only
- Be specific: "Lakers win championship" not "Lakers have good season"
Cost & Performance
Platform Costs (Transparent)
We believe in transparency. Here's exactly what it costs to run GrokMarkets:
| Component | Cost per Market | Who Pays |
|---|---|---|
| Grok API Resolution | $0.0007 | Platform |
| Twitter API | Free | Platform |
| Hosting & Database | ~$0.015 | Platform |
| User Fees | 1.5% of pool | Users |
Performance Metrics (October 2025)
| Metric | Performance |
|---|---|
| Resolution Success Rate | 99%+ ✅ |
| Grok API Response Time | <1 second ✅ |
| Average Resolution Time | <10 minutes ✅ |
| Payout Processing | Instant ✅ |
| Platform Uptime | 99.9% ✅ |
Common Questions
Q: How does Grok know the answer?
Grok AI has access to real-time data from the internet. When resolving a market, it:
- Queries the specified data source (CoinGecko, Yahoo Finance, etc.)
- Checks historical data for the timeframe
- Verifies the outcome against the market question
- Returns a binary YES/NO answer with evidence
Q: Can Grok make mistakes?
While Grok is 99%+ accurate, edge cases can occur:
- Ambiguous questions: Vague markets may get incorrect resolutions
- Data discrepancies: Different sources showing different data
- Breaking news: Very recent events not yet indexed
Q: What if Grok API is down?
We have a 3-tier fallback system:
- Primary: Grok API (99% success, instant)
- Fallback: Public Grok tagging (20% success, 1-24 hours)
- Emergency: Manual resolution after 24 hours
Result: 99.9% of markets resolve successfully!
Q: How much does it cost users?
Users pay a combined 1.5% fee on winnings:
- 0.5% goes to the market creator (incentive)
- 1.0% goes to platform treasury (operations)
Example: Win 10 SOL → Fees are 0.15 SOL → Net payout 9.85 SOL
Q: Can I manually resolve a market?
Yes! If you're the market creator or admin, you can manually resolve:
This is useful if:
- Grok's resolution is incorrect
- Market has been stuck for 24+ hours
- You have additional evidence
Next Steps
Now that you understand how Grok AI powers GrokMarkets:
- 📚 Read the Getting Started guide to create your first market
- 💻 Check the API Reference for developer integration
- ❓ Browse the FAQ for more answers
- 🚀 Visit GrokMarkets.com to see live markets
- 🐦 Follow @solpredictbot to get started betting
Tweet:
@solpredictbot create "Will Solana reach $500 by end of 2025?"