Bounty Challenge implements multiple layers of protection against gaming and abuse.
| Attack | Description | Mitigation |
|---|---|---|
| Spam | Mass low-quality issues | Maintainer gatekeeping + penalty system |
| Duplication | Same bug reported twice | First reporter wins (single-claim rule) |
| Collusion | Fake maintainer approval | Project-level access control |
| Frontrunning | Claiming others' issues | Author match verification |
| Self-Approval | Miners validating own issues | Only project members can add labels |
| Validator Manipulation | Single validator approving issues | Multi-validator consensus required |
Only project maintainers can add the valid label.
Issue Created → Maintainer Review → Valid Label Added → Bounty Eligible
↓ ↓
(anyone) (project members only)
This is the primary defense: no matter how many issues you create, they're worthless without maintainer approval.
The WASM module requires multiple validators to agree on issue data before it is accepted:
- Sync Consensus: Validators propose synced issue data via
/sync/propose. A majority must agree before the data is stored. - Issue Validity Consensus: Validators propose issue validity via
/issue/propose. A majority vote determines the outcome.
Validator A proposes ─┐
Validator B proposes ─┼──▶ Majority? ──▶ Consensus reached ──▶ Data stored
Validator C proposes ─┘
The GitHub username claiming the bounty must match the issue author:
Miner registers: github_username = "alice"
Issue #42 author: "alice" ✅ Can claim
Issue #43 author: "bob" ❌ Cannot claim
This prevents:
- Claiming others' work
- Frontrunning legitimate reporters
The verification is performed in the WASM module's validate_issue() function:
if issue.author.to_lowercase() != expected_author.to_lowercase() {
return (false, Some("Author mismatch"));
}Each issue can only be claimed once. The WASM module checks host storage before recording:
if storage::is_issue_recorded(&repo_owner, &repo_name, issue_number) {
// Reject: "Issue already claimed"
}First valid claim wins. Subsequent attempts are rejected.
Invalid and duplicate issues reduce a miner's balance:
| Penalty Type | Formula |
|---|---|
| Invalid | max(0, invalid_count - valid_count) |
| Duplicate | max(0, duplicate_count - valid_count) |
If net_points ≤ 0, the miner's weight becomes 0 (penalized).
See Scoring & Rewards for detailed penalty calculations.
Miners must register their GitHub username before claiming:
1. Register: hotkey → github_username (signed with sr25519)
2. Create issues (as github_username)
3. Claim bounties (verified against registration)
This creates an audit trail and prevents anonymous claiming. Each hotkey maps to exactly one GitHub username, and vice versa.
All authenticated operations require sr25519 signatures, proving ownership of the hotkey. The Platform validator verifies signatures before forwarding requests to the WASM module.
┌─────────────────────────────────────────────────────────────┐
│ CLAIM VERIFICATION │
├─────────────────────────────────────────────────────────────┤
│ │
│ Input: issue_numbers=[42], github_username="alice" │
│ │
│ ┌─────────────────┐ │
│ │ Already claimed?│──Yes──▶ REJECT: "Already claimed" │
│ └────────┬────────┘ │
│ │No │
│ ┌────────▼────────┐ │
│ │ In synced data? │──No───▶ REJECT: "Not found" │
│ └────────┬────────┘ │
│ │Yes │
│ ┌────────▼────────┐ │
│ │ Is closed? │──No───▶ REJECT: "Issue not closed" │
│ └────────┬────────┘ │
│ │Yes │
│ ┌────────▼────────┐ │
│ │ Has valid label?│──No───▶ REJECT: "Missing valid label" │
│ └────────┬────────┘ │
│ │Yes │
│ ┌────────▼────────┐ │
│ │ Author matches? │──No───▶ REJECT: "Author mismatch" │
│ └────────┬────────┘ │
│ │Yes │
│ ┌────────▼────────┐ │
│ │ Record in │ │
│ │ host storage │ │
│ │ Update balance │ │
│ └────────┬────────┘ │
│ │ │
│ ▼ │
│ ACCEPT ✅ │
│ │
└─────────────────────────────────────────────────────────────┘
Operators should monitor for:
- Rapid registrations: Same IP registering many hotkeys
- Claim spikes: Sudden large batch claims
- Low approval rate: Many claims, few valid
- Maintainer anomalies: Unusual label additions
All bounties are tracked in host storage with:
- Issue number
- Repository owner and name
- GitHub username
- Miner hotkey
- Recording epoch
Potential additional protections:
- Reputation system: Weight recent vs historical contributions
- Issue quality scoring: NLP analysis of issue content
- Cooldown periods: Time between registrations/claims
- Stake requirements: Minimum stake to participate
- Maintainer rotation: Prevent single-point collusion