In Solidity, using literal values repeatedly throughout the code reduces maintainability and increases the likelihood of inconsistencies during updates.
The value 100
is hardcoded in a require
statement to validate a percentage input. This literal should be replaced with a named constant
for clarity and future-proofing.
Likelihood:
Developers often copy and paste similar checks throughout the codebase, and changing all of them later becomes error-prone
Literal values reduce readability and may hide the domain-specific meaning behind magic numbers
Impact:
May cause inconsistent validations if the literal is changed in some places but not others.
Reduces code clarity and increases technical debt for future audits and changes
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.