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
- Points-Based Rewards: 1 point per valid issue, 0.25 points per starred repo
- 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 valid issue earns you 1 point:
| Source | Points | Description |
|---|---|---|
| Valid Issue | 1 point | Issue closed with valid label |
| Starred Repo | 0.25 points | Each starred target repository |
Your weight is calculated from your total points:
Where:
- 50 points = 100% weight (maximum)
- Each point = 2% weight
Examples:
| Miner | Valid Issues | Stars | Total Points | Weight |
|---|---|---|---|---|
| A | 10 | 0 | 10 | 20% |
| B | 25 | 4 | 26 | 52% |
| C | 50 | 5 | 51.25 | 100% (capped) |
See Scoring Documentation for complete specifications.
WARNING: Issues marked with
invalidlabel count against you!
| Rule | Description |
|---|---|
| Penalty | -2 points per invalid issue |
| Zero Weight | If net points < 0, weight = 0 |
| Recovery | Submit valid issues to restore positive balance |
Formula:
net_points = valid_issues - (invalid_issues × 2)
weight = net_points > 0 ? (net_points × 0.02) : 0
Examples:
| Miner | Valid | Invalid | Net Points | Weight |
|---|---|---|---|---|
| A | 10 | 2 | 6 | 12% |
| B | 3 | 8 | -13 | 0% (penalized) |
Earn extra points by starring our repositories!
| Requirement | Bonus |
|---|---|
| Minimum | 2 valid issues resolved |
| Bonus | +0.25 points per starred repo |
| Maximum | +1.25 points (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 10 valid issues + 4 starred repos = 11 points = 22% weight
- Miner with 1 valid issue + 5 starred repos = 1 point only (need 2+ valid issues for star bonus)
Submit issues about bugs, security problems, or improvements you find:
| Repository | Points per Issue | For 100% Weight | URL |
|---|---|---|---|
| PlatformNetwork/bounty-challenge | 1 point | 50 issues | https://github.com/PlatformNetwork/bounty-challenge |
Note: 50 points = 100% weight. Star 5 repos for an additional 1.25 points bonus!
Important: All issues must be submitted 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 -k <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
│ ├── auth.rs # Signature verification
│ ├── challenge.rs # Challenge implementation
│ ├── config.rs # Configuration loading
│ ├── gh_cli.rs # GitHub CLI integration
│ ├── github.rs # GitHub API client
│ ├── github_oauth.rs # GitHub OAuth device flow
│ ├── metagraph.rs # Metagraph caching
│ ├── pg_storage.rs # PostgreSQL storage
│ ├── server.rs # HTTP server & routes
│ └── bin/
│ ├── bounty/ # CLI application
│ │ ├── main.rs # CLI entry point
│ │ ├── client.rs # Bridge API client
│ │ ├── style.rs # Terminal styling
│ │ ├── wizard/ # Registration wizard
│ │ └── commands/ # CLI commands
│ └── bounty-health-server.rs # Health check server
├── migrations/ # PostgreSQL migrations
│ ├── 001_schema.sql
│ ├── ...
│ └── 011_fix_negative_weight.sql
├── docs/
│ ├── anti-abuse.md # Anti-abuse documentation
│ ├── miner/ # Miner guides
│ ├── reference/ # API & scoring references
│ └── validator/ # Validator guides
├── .github/workflows/
│ ├── ci.yml # CI pipeline
│ ├── protect-valid-label.yml # Label protection
│ └── version-check.yml # Version validation
├── 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
