A high-severity vulnerability was discovered in the (MysteryBox) smart contract, where the openBox function gives a reward depending on a value that is calculated using the block.timestamp a source that is not random. This issue allows an attacker to open a box knowing this number and getting the desired reward.
Using block.number orblock.timestamp as a source of randomness is commonly advised against, as the outcome can be manipulated by calling contracts.
This vulnerability allows a user to get the reward desired. A malicious actor could take advantage of this getting several rewards and extracting all the Etherum stored in the contract.
Manual Analysis
Foundry: Smart contract testing and simulation framework
Consider using a decentralized oracle for the generation of random numbers, such as Chainlinks 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.