The random value generated in the openBox() function is not truly random and can be easily predicted because it relies on block.timestamp for randomness.
The block.timestamp represents the current block's timestamp, which is set by the miner. Since miners can adjust this timestamp within a limited range, it is not entirely unpredictable, allowing them to exploit the contract.
By manipulating the block.timestamp, a miner could control the outcome to consistently open rare boxes, such as those containing a "Golden coin".
Slither, manual review
Implement a secure random number generation method like Chainlink VRF (Verifiable Random Function), which provides tamper-proof randomness through an oracle.
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.