Overview
Proteus runs on BASE (Coinbase L2) and deploys to two environments:- Testnet (BASE Sepolia): For development and testing (current deployment)
- Mainnet (BASE): For production (not yet deployed)
Current Deployment
The production testnet deployment is running on Railway:| Component | Provider | URL/Address |
|---|---|---|
| Backend | Railway | proteus-production-6213.up.railway.app |
| Redis | Railway | Internal |
| Contracts | BASE Sepolia | See Contract Addresses |
Railway Deployment
The Flask backend auto-deploys from themain branch on GitHub.
Railway Configuration
Connect Repository
- Log in to Railway
- Create a new project
- Connect your GitHub repository
- Select the
mainbranch for auto-deployment
Add Redis
Add a Redis instance to your Railway project:
- Click + New
- Select Database > Redis
- Railway will automatically set the
REDIS_URLenvironment variable
Configure Start Command
Railway uses
railway.json for configuration. The start command is:railway.json
Health Checks
Railway monitors the/health endpoint:
Contract Deployment
Deploy to BASE Sepolia Testnet
Fund Deployer Wallet
Get test ETH from the BASE Sepolia faucet.Request at least 0.1 ETH to your deployer wallet.
Deploy Contracts
Deploy PredictionMarketV2 and related contracts:Save the deployed contract addresses from the output.
Contract Addresses
Current deployed contracts on BASE Sepolia:Seed Example Markets
Thescripts/seed_examples.py script creates 6 example markets demonstrating different prediction scenarios:
Create Markets
Create markets and submissions:This creates 6 markets with different prediction quality examples.
Production Deployment (BASE Mainnet)
Proteus is not yet deployed to mainnet. Before mainnet deployment:Prerequisites Checklist
Security Audit
- Complete external security audit of all contracts
- Address all high and medium severity findings
- Get audit report published
Decentralize Resolution
- Implement multi-oracle consensus (commit-reveal)
- Add slashing for dishonest oracles
- Require screenshot proofs (IPFS-pinned)
Production Infrastructure
- Set up hardware wallet for deployer
- Implement multisig for contract owner (Gnosis Safe 2-of-3)
- Use production RPC (Alchemy/QuickNode)
- Set up monitoring (Sentry, Datadog)
- Configure alerting for critical events
Real Wallet Integration
- Replace PBKDF2 shim with Coinbase CDP Server Signer
- Test with real Coinbase wallet credentials
- Implement proper key rotation
Mainnet Configuration
When ready for mainnet, update environment variables:.env
Mainnet Deployment Steps
Monitoring
Backend Monitoring
Key metrics to monitor:- Response times: API endpoint latency
- Error rates: 4xx/5xx responses
- Redis health: Connection status, memory usage
- Blockchain health: RPC latency, failed transactions
Contract Monitoring
Monitor on-chain events:Rollback Procedures
Backend Rollback
Railway keeps deployment history. To rollback:- Go to Railway dashboard
- Select your project
- Click Deployments
- Find the last known good deployment
- Click Redeploy
Contract Rollback
Instead:- Deploy a new fixed version
- Update frontend to use new contract address
- Announce migration to users
- Consider implementing upgradeable proxies for future deployments
Next Steps
Local Setup
Set up your development environment
Testing
Run the comprehensive test suite
Architecture
Understand the system design
API Reference
Explore the API endpoints