Static array (string[48]) limits flexibility and causes gas inefficiency
=> the contract should store tournament teams in a way that supports different tournament sizes for example, 16, 32, or 64 teams without changing the source code
=> the contract currently uses a fixed-size static array string[48] public teams; This enforces a hard limit of 48 teams wastes storage for unused slots and increases gas cost during setCountry() since it must loop through all 48 indexes even if fewer teams are used
Likelihood:
This occurs every time the contract is deployed for a tournament that doesn’t have exactly 48 teams (which is almost always
Gas inefficiency also occurs in every call to setCountry() since the loop runs through all 48 indexes, even when many are empty
Impact:
Causes unnecessary gas consumption for both deployment and setup
Prevents contract reuse for tournaments with a different number of teams
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.