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

Randomness in ‘Soulmate_readMessageInSharedSpace()’.

Summary

Vulnerability Details

In this function, it returns at the end of the message a random
word in ‘niceWords’ array, but it not well implemented, it returns a word
doing ‘block.timestamp % nicewords.length”. This is a bad practice
because block.timestamp can be manipulated from the attacker. Also, this
practice will ever returns the word ‘darling’, and not the others ones.

Impact

The message is always read with ‘darling’ as last word.

Tools Used

Foundry

Recommendations

Do not utilize block.timestamp, in order to get
random values consider using chainlink VRFA.

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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