The MysteryBox smart contract initializes rewards with specific values at deployment, but the openBox function uses different values for these rewards. This inconsistency can lead to confusion and unexpected behavior for users.
The issue exists in the openBox function of the MysteryBox contract. The function assigns rewards with values that differ from those initialized at deployment. Specifically, the values for Gold and Silver coins are inconsistent.
Initialization in Constructor:
Values in openBox Function:
User Confusion: Users may be confused by the differing values of rewards, leading to a lack of trust in the contract.
Manual Review
To resolve this issue, ensure that the reward values in the openBox function match the values initialized at deployment.
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.