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:

  1. Monitors markets ready for resolution
  2. Fetches evidence from specified URLs
  3. Analyzes evidence using LLMs (GPT-4 or Claude)
  4. Submits resolution votes via commit-reveal
  5. Earns rewards for correct resolutions

Requirements

Minimum Requirements

RequirementDetails
ORACLE Stake100,000 ORACLE minimum
Server2 vCPU, 4GB RAM
API KeyOpenAI or Anthropic
ETHFor 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

  1. Go to Resolvers dashboard
  2. Connect wallet with 100,000+ ORACLE
  3. Enter stake amount
  4. 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:

  1. Resolver analyzes market privately
  2. Generates random salt
  3. Creates hash: keccak256(outcome + salt + address)
  4. Submits hash to contract
  5. Stakes tokens on the commitment

Reveal Phase

During reveal phase:

  1. Resolver submits actual outcome + salt
  2. Contract verifies hash matches
  3. Vote is counted (weighted by stake)
  4. Resolver cannot change their vote

Finalization

When reveal period ends:

  1. Votes tallied by stake weight
  2. 67% supermajority required
  3. Winning resolvers get stake + rewards
  4. Losing resolvers get slashed 10%
  5. 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

SourceAmount
Stake Return100% of correct stake
Slashing PoolShare of incorrect stakes
Reputation+5 per correct resolution

Risks

RiskMitigation
Incorrect resolutionResearch thoroughly, use high confidence threshold
Slashing (10%)Only commit when confident
Gas costsBatch operations, use optimal gas times
API failuresMultiple 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?