MysteryBox::openBox Creates Opportunities for Reward FixingThe randomValue used to determine the Mystery Box reward is generated as a hash of block.timestamp and msg.sender. This allows users to manipulate the function call timing to ensure they receive one of the rare rewards, making the randomness scheme ineffective.
Below is the implementation of the openBox function:
The randomValue here uses a weak RNG scheme, which is not recommended for secure randomness generation.
Users can consistently win the rarest rewards by strategically timing their function calls, compromising the intended randomness.
Manual Review
Implement a provable randomness scheme such as Chainlink VRF to ensure the integrity of the random reward distribution.
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.