Mystery Box

First Flight #25
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Valid

randomness manipulation

Summary

Vulnerability Details

https://github.com/Cyfrin/2024-09-mystery-box/blob/main/src/MysteryBox.sol#L47

Since block.timestamp and msg.sender are publicly accessible values, they can be predicted by buyers or miners, making the randomness vulnerable to manipulation.

Impact

randomness can be manipulated by buyers to get higher random values

Tools Used

consider using Chainlink VRF (Verifiable Random Function)

Recommendations

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Weak Randomness

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!