Installation & Setup
Complete setup guide for pdr-backend and Prediction Submitter Manager
⚠️ Prerequisites
- Python 3.12 (earlier versions will fail)
- Ubuntu or MacOS (Windows not supported)
- Git installed
- ROSE tokens for gas fees
Step 1: Install pdr-backend Repository
1.1 Clone the repository
git clone https://github.com/oceanprotocol/pdr-backend
cd pdr-backend1.2 Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate1.3 Install dependencies
pip install -r requirements.txt
export PATH=$PATH:.1.4 Get Ocean contract addresses
mkdir -p ~/.ocean/ocean-contracts/artifacts/
curl https://raw.githubusercontent.com/oceanprotocol/contracts/main/addresses/address.json -o ~/.ocean/ocean-contracts/artifacts/address.json1.5 MacOS only: Fix dependencies
# Fix sapphire.py
codesign --force --deep --sign - venv/sapphirepy_bin/sapphirewrapper-arm64.dylib
# Install xgboost dependency
brew install libompInstallation complete! Verify by running:
pdr --helpStep 2: Run Simulation (Highly Recommended)
💡 Why Simulate First?
Simulation lets you backtest your strategy with historical data, saving you from costly mistakes on mainnet. You can test different parameters and see potential profits/losses before risking real money.
2.1 Copy config template
cp ppss.yaml my_ppss.yaml2.2 Run simulation
pdr sim my_ppss.yamlThe simulation will download historical data and run through many epochs, showing you predicted accuracy and estimated profits.
2.3 Visualize results (optional)
# In a separate terminal
pdr sim_plotsOpens a dashboard at http://127.0.0.1:8050 with real-time plots.
Step 3: Deploy Prediction Submitter Manager (Predictoor Only)
🚨 CRITICAL for Predictoor Bots
This step is required for Predictoor bots. Without deploying this contract, your bot cannot submit predictions. You only need to do this once per account.
3.1 Export your private key
export PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HEREMake sure you have ROSE tokens in this wallet for gas fees!
3.2 Deploy the contract (Testnet)
pdr deploy_pred_submitter_mgr my_ppss.yaml sapphire-testnetThis will deploy a smart contract and output its address. Save this address!
3.3 Deploy the contract (Mainnet)
pdr deploy_pred_submitter_mgr my_ppss.yaml sapphire-mainnetYou'll need a separate deployment for mainnet.
3.4 Copy the contract address
The command will output something like:
Deployed Prediction Submitter Manager at: 0x1234...abcd⚠️ Copy this address! You'll need it when configuring your bot.
✓ Setup Complete!
You're now ready to configure your bot:
- Go to Predictoor Bot Configuration
- Enter your Prediction Submitter Manager contract address
- Download your ppss.yaml and launch!
Troubleshooting Installation
Python version error
Make sure you're using Python 3.12. Check with: python --version
address.json not found
Verify the file exists: ls ~/.ocean/ocean-contracts/artifacts/address.json
Contract deployment fails
Check you have enough ROSE for gas. Get testnet ROSE from the Oasis faucet