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

Implementation flaw in `ChoosingRam:increaseValuesOfParticipants` it is possible to bypass the randomness of the function

Summary

Implementation flaw in ChoosingRam:increaseValuesOfParticipants it is possible to bypass the randomness of the function

Vulnerability Details

It's possible to bypass the randomness of the function by calling the function ChoosingRam:increaseValuesOfParticipants if we pass the same tokenID in both tokenIdOfChallenger and tokenIdOfAnyPerticipent

Impact

the randomness of this event is completely altered and leads to the deterministic selection of a RAM.

Tools Used

Manual review

Recommendations

add revert condition tokenIdOfChallenger must be different of tokenIdOfAnyPerticipent

if (tokenIdOfChallenger == tokenIdOfAnyPerticipent) {
revert ChoosingRam__sameTokenId();
}
Updates

Lead Judging Commences

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

Challenge themselves

Support

FAQs

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