The function relies on hardcoded constants (401, 100) instead of named parameters or configuration values. Developers may misconfigure reward calculations during updates, causing unintended payout ranges.
Normal behavior: The reward calculation should use clearly defined constants for transparency and maintainability.
Issue: The function uses hardcoded numbers (401, 100, 500) directly in the logic. These "magic numbers" lack context and make the contract harder to audit, maintain, and upgrade. More importantly, they obscure the intended reward range and could introduce inconsistencies if later modified in multiple places.
Likelihood:
Reason 1 High chance of introducing errors if values need to be updated
Reason 2 Always present during maintenance or upgrades.
Impact:
Impact 1 Reduced readability and auditability.
Impact 2 Misconfiguration risk leading to unintended reward ranges (e.g., if only one number is updated).
If developers later decide to change rewards to 50–250, they must update both 100 and 401. Missing one update would create an unintended range.
Define named constants for reward parameters and reference them instead of magic numbers.
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.