Mystery Box

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

Using weak source of randomness

Summary

Relying on block.timestamp and msg.sender to generate a random number in not good because the number is not completely random and can be predicted

Vulnerability Details

In openBox function it calculate the randomValue as result of hashing block.timestamp and msg.sender % 100 which a weak source of randomness .

Impact

  • User can get always the highest reward when he open a box

Tools Used

Manual review

Recommendations

  • Use Source of randomness as Chainlink VRF

Updates

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.