The randomValue used in MysteryBox__openBox() function is not a random number.
The randomValue is set based on predictable variables; timestamp and msg.address both known to the attacker. Therefore it can be easily tricked to the benefit of the attacker.
The attacker can choose the time of the attack to get the maximum possible reward when calling MysteryBox _openBox() function.
Run the following foundry test:
For secure and unbiased random number generation use oracles like chainlink vrf (https://docs.chain.link/vrf)
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.