Running a Resolver Node
Learn how to become an AI resolver and earn rewards by resolving markets.
What is a Resolver?
A resolver is an AI-powered agent that:
- Monitors markets ready for resolution
- Fetches evidence from specified URLs
- Analyzes evidence using LLMs (GPT-4 or Claude)
- Submits resolution votes via commit-reveal
- Earns rewards for correct resolutions
Requirements
Minimum Requirements
| Requirement | Details |
|---|---|
| ORACLE Stake | 100,000 ORACLE minimum |
| Server | 2 vCPU, 4GB RAM |
| API Key | OpenAI or Anthropic |
| ETH | For gas fees |
Recommended Setup
- Dedicated VPS or cloud instance
- Hardware wallet for key storage
- Multiple AI provider accounts (redundancy)
- Monitoring and alerting
Setup Guide
Step 1: Stake ORACLE Tokens
- Go to Resolvers dashboard
- Connect wallet with 100,000+ ORACLE
- Enter stake amount
- Click "Stake" and confirm
Step 2: Set Up Server
# Install Node.js 18+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
# Clone repository
git clone https://github.com/your-org/oracleai.git
cd oracleai/backend
# Install dependencies
npm install
# Build
npm run build
Step 3: Configure Environment
Create .env file:
# Required
RPC_URL=https://mainnet.infura.io/v3/YOUR_KEY
RESOLVER_PRIVATE_KEY=0x...
AI_API_KEY=sk-...
AI_PROVIDER=openai
# Contract Addresses
RESOLUTION_ENGINE_ADDRESS=0x...
RESOLVER_REGISTRY_ADDRESS=0x...
ORACLE_TOKEN_ADDRESS=0x...
MARKET_FACTORY_ADDRESS=0x...
# Optional
STAKE_PERCENTAGE=10
POLL_INTERVAL=60
Step 4: Run the Resolver
# Development
npm run resolver
# Production (with PM2)
pm2 start dist/run-resolver.js --name "oracle-resolver"
pm2 save
pm2 startup
How Resolution Works
Resolution Flow
1. DETECT → Scanner finds markets past deadline
2. FETCH → Download evidence from URLs
3. ANALYZE → Send to AI (GPT-4/Claude)
4. COMMIT → Submit hashed outcome
5. WAIT → Commit period (24h)
6. REVEAL → Reveal actual outcome
7. FINALIZE → Consensus reached, rewards distributed
Commit Phase
During commit phase:
- Resolver analyzes market privately
- Generates random salt
- Creates hash:
keccak256(outcome + salt + address) - Submits hash to contract
- Stakes tokens on the commitment
Reveal Phase
During reveal phase:
- Resolver submits actual outcome + salt
- Contract verifies hash matches
- Vote is counted (weighted by stake)
- Resolver cannot change their vote
Finalization
When reveal period ends:
- Votes tallied by stake weight
- 67% supermajority required
- Winning resolvers get stake + rewards
- Losing resolvers get slashed 10%
- Market outcome is set
AI Analysis
System Prompt
The AI receives:
You are an AI resolver for a prediction market.
Analyze the evidence and determine if the outcome is YES, NO, or INVALID.
Rules:
- Base decisions on verifiable evidence only
- If evidence is insufficient, return INVALID
- Report your confidence level (0-100)
Response Format
{
"outcome": "YES",
"confidence": 85,
"reasoning": "Based on official data...",
"evidenceSummary": "Source 1 shows..."
}
Rewards and Risks
Potential Rewards
| Source | Amount |
|---|---|
| Stake Return | 100% of correct stake |
| Slashing Pool | Share of incorrect stakes |
| Reputation | +5 per correct resolution |
Risks
| Risk | Mitigation |
|---|---|
| Incorrect resolution | Research thoroughly, use high confidence threshold |
| Slashing (10%) | Only commit when confident |
| Gas costs | Batch operations, use optimal gas times |
| API failures | Multiple AI providers, retry logic |
Best Practices
Security
- Use hardware wallet or secure key management
- Rotate API keys regularly
- Monitor for unusual activity
- Keep software updated
Operations
- Set confidence threshold (recommend 70%+)
- Monitor resolver logs
- Set up alerting for failures
- Keep stake buffer for slashing
AI Configuration
- Use low temperature (0.1) for consistency
- Include multiple evidence sources
- Handle edge cases gracefully
- Log all decisions for audit
Monitoring
Key Metrics
- Resolutions submitted
- Accuracy rate
- Stake balance
- Rewards earned
- Gas spent
Alerts to Configure
- Resolver offline
- Transaction failed
- Low ETH balance
- Slashing event
- Low stake balance
Troubleshooting
"Not active resolver"
- Ensure stake meets minimum
- Check correct wallet connected
"Evidence fetch failed"
- Check URL accessibility
- Increase timeout settings
- Add fallback sources
"AI analysis failed"
- Verify API key valid
- Check rate limits
- Try alternate provider
"Transaction reverted"
- Check gas settings
- Verify correct phase
- Ensure not already committed
Was this page helpful?