Monitor & Analyze Performance
Track your bot's accuracy, profits, and costs to optimize strategy
📊 Why Monitor?
Regular monitoring helps you identify issues early, optimize parameters, and maximize profits. A bot that was profitable last week might not be this week due to market changes.
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_plotsOpens 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 8051For detailed dashboard setup, see the official guide
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_*.txtWhat 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-subgraphMainnet:
https://v4.subgraph.sapphire-mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraphExample queries
# Get your predictions
{
predictions(where: {user: "YOUR_ADDRESS"}) {
id
stake
payout
trueval
timestamp
}
}Use pdr-backend CLI tools for easy subgraph queries:
pdr get_predictions_infoOptimization Based on Monitoring
💡 When to Optimize
- Accuracy drops below 52% for multiple days
- Gas costs exceed 30% of rewards
- Frequent transaction failures
- Market conditions change significantly
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.yamlTest multiple parameter combinations to find optimal settings.