The openBox function uses an insecure method to generate randomness, making it susceptible to manipulation and prediction by malicious actors. This vulnerability can be exploited to influence the outcome of rewards.
The openBox function uses block.timestamp and msg.sender to generate a pseudo-random number. Both of these values can be influenced or predicted by miners or users, leading to predictable outcomes.
The issue with this approach is that block timestamps and sender addresses are predictable or controllable by miners or users. Here’s how the vulnerability works:
Miners can slightly influence the block timestamp. Although they cannot fully control it, they can adjust the timestamp within a small window to tilt the outcome in their favor.
The sender’s address is known ahead of time, making it a poor source of randomness. Attackers can use this knowledge to calculate the resulting random number and manipulate their actions accordingly (e.g., deciding when to open a mystery box).
Malicious users or miners can predict or manipulate the random number generation to consistently receive more valuable rewards, undermining the fairness of the system.
Manual Review
Implement a more secure method for randomness, such as Chainlink VRF. Utilize Chainlink's Verifiable Random Function (VRF) to generate provably fair and tamper-proof randomness.
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.