Description:
The functions withdrawEgg() and isEggDeposited() are defined in the contract but are not utilized in the current implementation. This results in unnecessary code bloat, which can increase deployment costs and reduce code readability.
Impact:
While there is no direct security impact, unused functions contribute to increased gas costs during deployment and make the codebase harder to maintain.
Proof of Concept:
Recommended Mitigation:
Remove the unused functions if they are not required for the current or future implementation.
Alternatively, document these functions as utility functions if they are intended for future use or testing purposes.
Instances:
100 should be a constant in EggHuntGame::setEggFindThreshold().
100 should be a constant in EggHuntGame::searchForEgg().
Description:
Define and use constant variables instead of using literals like 100. If the same constant literal value is used multiple times, create a constant state variable and reference it throughout the contract as it is cheaper to use that way
Impact:
Gas - Code bloat but no direct security impact.
Proof of Concept:
Recommended Mitigation:
Replace all occurrences of the literal 100 with a defined constant variable such as MAX_EGGS.
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.