Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

`block.timestamp` and `block.prevrandao` has unexpected behavior on other chains decreasing the randomness.

Description

All chains do not have the same behavior for variable used in this protocol:

block.timestamp can be 23 hours in the past and 1 hour in the future on Arbitrum, tampering the end of the event.
block.prevrandao is always equal to 2500000000000000 on zkSync decreasing the randomness.

Risk

Likelyhood: Medium/Low

  • Sequencer can be in the past or the future on Arbitrum.

  • block.prevrandao is always equal to 2500000000000000.

Impact: High

  • People won't be able to finish the event at the right time on Arbitrum and can miss the time to retrieve the funds.

  • Bad randomness on ZkSync

Recommended Mitigation

Do not use Arbitrum for protocol who need one specific day to use a function.
Use an oracle for randomness on ZkSync.

Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Weak randomness in `ChoosingRam::selectRamIfNotSelected`

The organizer is trusted, but the function `ChoosingRam::selectRamIfNotSelected` uses a way to generate a random number that is not completely random.

Support

FAQs

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