Bounty Challenge is a decentralized issue reward system on the Bittensor network. Miners earn TAO rewards by discovering and reporting valid issues. Issues must be closed with the valid label by project maintainers to qualify for rewards.
IMPORTANT: To receive rewards, you MUST submit issues in this repository (PlatformNetwork/bounty-challenge). Issues submitted directly to other repositories will NOT be counted for rewards.
- Getting Started - Installation and first registration
- Registration Guide - Link your GitHub account
- Scoring & Rewards - Weight calculation formulas
- API Reference - Endpoints and payloads
- Validator Setup - Run a validator
- Centralized Bug Bounty: All issues tracked in this repository
- Adaptive Rewards: Dynamic weight calculation based on daily activity
- Cryptographic Registration: sr25519 signature-based hotkey linking
- Real-Time Leaderboard: Track miner standings and valid issues
- PostgreSQL Backend: Production-ready storage via Platform integration
- GitHub Label Protection: Automated label protection via GitHub Actions
flowchart LR
Miner["🧑💻 Miner"] -->|"create issue"| GitHub["📋 GitHub Issues"]
Validator["✅ Validator"] -->|"scan"| GitHub
Validator -->|"submit weights"| Platform["🌐 Platform"]
flowchart LR
A["1. Run CLI"] --> B["2. Enter key"] --> C["3. GitHub user"] --> D["4. Sign"] --> E["5. Verified"]
flowchart LR
A["Create Issue"] --> B["Review"] --> C{Valid?}
C -->|Yes| D["✅ Reward"]
C -->|No| E["❌ No reward"]
Bounty Challenge uses a point-based reward system.
Each resolved issue gives you points:
| Repository | Points per Issue | Issues for 100% |
|---|---|---|
| PlatformNetwork/bounty-challenge | 5 points | 20 issues |
Your weight is calculated from your total points:
Where:
- 100 points = 100% weight (maximum)
-
$W_{stars}$ = star bonus (see below)
Examples:
| Miner | Issues | Repository | Points | Weight |
|---|---|---|---|---|
| A | 7 | cortex | 7 × 5 = 35 | 35% |
| B | 10 | cortex | 10 × 5 = 50 | 50% |
| C | 20 | cortex | 20 × 5 = 100 | 100% |
See Scoring Documentation for complete specifications.
WARNING: Invalid issues (closed without
validlabel) count against you!
| Rule | Description |
|---|---|
| Ratio 1:1 | 1 invalid issue allowed per valid issue |
| Penalty | If invalid > valid, weight = 0 |
| Recovery | Submit valid issues to return balance >= 0 |
Formula:
balance = valid_issues - invalid_issues
weight = balance >= 0 ? normal_weight : 0
Example: (assuming cortex issues = 5 points each)
| Miner | Valid | Invalid | Balance | Points | Weight |
|---|---|---|---|---|---|
| A | 5 | 3 | +2 | 25 pts | 25% |
| B | 3 | 5 | -2 | - | 0% (penalized) |
Earn extra credits by starring our repositories!
| Requirement | Bonus |
|---|---|
| Minimum | 2 valid issues resolved |
| Bonus | +0.25 weight per starred repo |
| Maximum | +1.25 (5 repos × 0.25) |
Repositories to star:
| Repository | URL |
|---|---|
| CortexLM/vgrep | https://github.com/CortexLM/vgrep |
| CortexLM/cortex | https://github.com/CortexLM/cortex |
| PlatformNetwork/platform | https://github.com/PlatformNetwork/platform |
| PlatformNetwork/term-challenge | https://github.com/PlatformNetwork/term-challenge |
| PlatformNetwork/bounty-challenge | https://github.com/PlatformNetwork/bounty-challenge |
Example:
- Miner with 5 valid issues + 3 starred repos = base weight + 0.75 bonus
- Miner with 1 valid issue + 5 starred repos = base weight only (need 2+ valid issues first)
Analyze this project to find bugs, security issues, and improvements:
| Repository | Description | Points | For 100% Weight | URL |
|---|---|---|---|---|
| PlatformNetwork/bounty-challenge | Bounty Challenge repository | 5 points | 20 issues | https://github.com/PlatformNetwork/bounty-challenge |
Note: 100 points = 100% weight. 20 valid issues in cortex = maximum weight!
Important: Analyze the bounty-challenge repository for bugs, then submit your issue reports to this repository (PlatformNetwork/bounty-challenge) to receive rewards.
- Bittensor Wallet (miner hotkey with secret key)
- GitHub Account
- Rust 1.70+ (to build the CLI)
# Clone and build
git clone https://github.com/PlatformNetwork/bounty-challenge.git
cd bounty-challenge
cargo build --release
# Add to PATH
export PATH="$PWD/target/release:$PATH"
# Verify installation
bounty --versionRun the interactive registration wizard:
bountyOr explicitly:
bounty wizardThe wizard will:
- Ask for your miner secret key (64-char hex or 12+ word mnemonic)
- Derive your hotkey (SS58 format)
- Ask for your GitHub username
- Sign the registration with sr25519
- Submit to the platform
WARNING: Issues must be created in this repository to be eligible for rewards!
IMPORTANT: You MUST include the version in your issue title. Issues without a version will be automatically closed.
Title Format: [TYPE] [vX.X.X] Description
Examples:
[BUG] [v0.1.5] CLI crashes on startup[FEATURE] [v0.2.0] Add export to JSON[PERF] [v0.1.5] Slow response time on leaderboard
To find your version, run: [app cli --version]
Go to the bounty-challenge repository and create issues:
| Repository | URL |
|---|---|
| PlatformNetwork/bounty-challenge | https://github.com/PlatformNetwork/bounty-challenge/issues |
You can report issues about the Cortex project (see Target Repository above) but they must be submitted HERE to count for rewards.
Valid issue types:
| Type | Description |
|---|---|
| Bug Reports | Reproduction steps, expected vs actual behavior |
| Security Issues | Vulnerabilities (follow responsible disclosure) |
| Feature Requests | Use cases and proposed solutions |
| Documentation | Gaps, errors, or improvements |
Maintainers will review your issue:
- ✅ Valid: Closed with
validlabel → Reward auto-credited - ❌ Invalid: Closed without label → No reward
Note: Only maintainers can add/remove the valid label. This is enforced via GitHub Actions.
bounty status --hotkey YOUR_HOTKEYbounty leaderboard| Command | Description |
|---|---|
bounty |
Interactive registration wizard (default) |
bounty wizard |
Same as above |
bounty status -h <hotkey> |
Check your status and rewards |
bounty leaderboard |
View current standings |
bounty config |
Show challenge configuration |
bounty server |
Run in server mode (subnet operators) |
bounty validate |
Run as validator (auto-scan) |
| Variable | Default | Description |
|---|---|---|
PLATFORM_URL |
https://chain.platform.network |
Platform server URL |
DATABASE_URL |
- | PostgreSQL connection (server mode) |
GITHUB_TOKEN |
- | GitHub API token (increases rate limits) |
MINER_HOTKEY |
- | Your miner hotkey (SS58) |
IMPORTANT: All issues must be submitted to this repository to receive rewards.
| Repository | URL | Status |
|---|---|---|
| PlatformNetwork/bounty-challenge | https://github.com/PlatformNetwork/bounty-challenge/issues | ✅ Rewards eligible |
| Other repositories | - | ❌ Not counted |
Report bugs, security issues, or feature requests about the Cortex project in the bounty-challenge repo.
| Mechanism | Description |
|---|---|
| Valid Label Required | Only issues closed with valid label count |
| Signature Verification | sr25519 signature proves hotkey ownership |
| Author Verification | GitHub username must match issue author |
| First Reporter Wins | Each issue can only be claimed once |
| Adaptive Weights | High activity reduces per-issue reward |
| Maintainer Gatekeeping | Only project members can validate issues |
| Label Protection | GitHub Actions prevent unauthorized label changes |
All requests go through the platform bridge:
https://chain.platform.network/api/v1/bridge/bounty-challenge/
| Endpoint | Method | Description |
|---|---|---|
/register |
POST | Register GitHub username with hotkey |
/status/{hotkey} |
GET | Get miner status and rewards |
/leaderboard |
GET | Get current standings |
/stats |
GET | Get challenge statistics |
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/config |
GET | Challenge configuration |
/get_weights |
GET | Calculate current weights |
See API Reference for complete documentation.
bounty-challenge/
├── src/
│ ├── main.rs # Server entry point
│ ├── lib.rs # Library exports
│ ├── challenge.rs # Challenge implementation
│ ├── github.rs # GitHub API client
│ ├── pg_storage.rs # PostgreSQL storage
│ ├── server.rs # HTTP server & routes
│ ├── discovery.rs # Auto-scan for valid issues
│ └── bin/bounty/ # CLI application
│ ├── main.rs # CLI entry point
│ ├── client.rs # Bridge API client
│ ├── wizard/ # Registration wizard
│ └── commands/ # CLI commands
├── migrations/
│ └── 001_initial.sql # PostgreSQL schema
├── docs/
│ ├── miner/ # Miner guides
│ ├── reference/ # API references
│ └── validator/ # Validator guides
├── .github/workflows/
│ └── protect-valid-label.yml # Label protection
├── config.toml # Configuration
└── assets/
└── banner.jpg # Banner image
-
For Miners:
-
For Validators:
-
Reference:
# Debug build
cargo build
# Release build
cargo build --release
# Run tests
cargo test
# Run with logging
RUST_LOG=info cargo run# Format code
cargo fmt
# Run linter
cargo clippy
# Check without building
cargo checkWhen deployed as a Platform challenge module:
flowchart LR
subgraph Miners
Miner["🧑💻 Miner<br/>(CLI/wizard)"]
end
subgraph Platform["Platform Server<br/>chain.platform.network"]
API["API Gateway"]
DB[("PostgreSQL")]
Bounty["Bounty Challenge<br/>(container)"]
API --> DB
Bounty --> DB
end
Miner -->|"register/status"| API
API -->|"route"| Bounty
- Cortex Foundation for the Cortex ecosystem
- Platform Network for the challenge SDK
- Bittensor for the decentralized AI network
Apache-2.0
