The CountriesSet event emits the entire 48-element string array, which costs approximately 100,000+ gas. A simple confirmation event would be sufficient.
Normal behavior for gas-efficient events expects emitting only essential information needed to track state changes. Full data can be reconstructed from storage or indexed separately.
The current implementation emits all 48 team names in the event, causing massive gas costs for data that's already stored on-chain and can be queried directly.
Likelihood:
Every setCountry() call emits this expensive event
Called at least once per tournament
May be called multiple times during testing/configuration
Impact:
Wastes approximately 100,000+ gas per configuration
Significantly increases deployment and setup costs
Makes contract less attractive for deployers
Event data is redundant (already in storage)
Bloats event logs unnecessarily
Option 1: Emit minimal confirmation
Option 2: Emit hash for verification
Option 3: No event (teams readable from storage)
Recommendation: Option 1 provides good balance - confirms action with minimal data. Off-chain services can read the teams array directly if they need full team names.
Estimated Gas Savings: ~100,000-150,000 gas per setCountry() call
Gas optimizations are invalid according to the CodeHawks documentation.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.