Severity: Important
// contract.rs:676
let derived_module_id = hackathon_id * 1000 + track_id as u64;
Track 1000 of hackathon X collides with track 0 of hackathon X+1. Currently no assertion bounds track_id.
Fix
- Assert
track_id < 1000 and return InvalidTrackId (new error)
- OR use a larger multiplier:
hackathon_id * (1 << 32) + track_id as u64
- Long-term: use a hash-derived pool_id that doesn't rely on numeric encoding
Tests
- 1000th track on a hackathon → reject
- 999th track + first track on next hackathon → distinct pool_ids
Severity: Important
Track 1000 of hackathon X collides with track 0 of hackathon X+1. Currently no assertion bounds
track_id.Fix
track_id < 1000and returnInvalidTrackId(new error)hackathon_id * (1 << 32) + track_id as u64Tests