Monitor & Analyze Performance

Track your bot's accuracy, profits, and costs to optimize strategy

Dashboard Visualization

The pdr-backend provides a real-time dashboard to visualize your bot's performance using live blockchain data.

Setup the dashboard

cd pdr-backend
source venv/bin/activate

# Start the dashboard
pdr sim_plots

Opens at http://127.0.0.1:8050

View specific run

# List available runs
ls sim_state/

# View specific run
pdr sim_plots --run-id <unique_id>

Multiple dashboards

# Run on different port
pdr sim_plots --port 8051

Key Metrics to Track

Accuracy

  • Overall prediction accuracy (%)
  • Accuracy by timeframe
  • Accuracy by market pair
  • Trend over time

Profit/Loss

  • Total profit in OCEAN
  • Profit after gas fees
  • ROI percentage
  • Daily/weekly breakdown

Costs

  • Gas fees (ROSE consumed)
  • Stakes slashed
  • Compute costs
  • Total costs vs revenue

Operations

  • Predictions submitted
  • Predictions missed
  • Transaction failures
  • Uptime percentage

Log Analysis

Real-time logs

# Docker logs
docker compose logs -f

# Or tail local logs
tail -f logs/out_*.txt

What to look for in logs

  • ✓ Successful predictions submitted
  • ✗ Failed transactions (investigate gas or balance)
  • ⚠️ Warnings about accuracy drops
  • 💰 Rewards claimed
  • 📊 Model retraining events

Configure logging

Edit logging.yaml to adjust log levels:

loggers:
  pdr_backend:
    level: INFO  # DEBUG for more detail
    handlers: [console, file]

Predictoor Subgraph Queries

Query detailed on-chain data about your predictions and earnings using the Predictoor subgraph.

Subgraph endpoints

Testnet:

https://v4.subgraph.sapphire-testnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph

Mainnet:

https://v4.subgraph.sapphire-mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph

Example queries

# Get your predictions
{
  predictions(where: {user: "YOUR_ADDRESS"}) {
    id
    stake
    payout
    trueval
    timestamp
  }
}

Optimization Based on Monitoring

Optimization strategies

  • Adjust stake amounts based on confidence
  • Filter out low-liquidity markets
  • Retrain model with recent data
  • Change prediction timeframes
  • Optimize gas timing (submit earlier/later)

Use multisim for parameter tuning

pdr multisim my_ppss.yaml

Test multiple parameter combinations to find optimal settings.