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

`ChoosingRam::isRamSelected` is not being updated after Ram is selceted

Summary

ChoosingRam::isRamSelected is not being updated in ChoosingRam::increaseValuesOfParticipantsafter the Ram has been selected.

Vulnerability Details

After ChoosingRam::selectedRam variable is updated to the address of the winner, the ChoosingRam::isRamSelected is not being set to true, which leads to several issues.

Impact

The organizer would be able to call ChoosingRam::selectRamIfNotSelected and the participants would be able to call ChoosingRam::increaseValuesOfParticipants even if the Ram has been actually selected, moreover, the Ram won't be able to call Dussehra::killRavana and withdraw their reward after.

Tools Used

Manual Review

Recommendations

Set isRamSelected to true, after the Ram has been chosen

selectedRam = ramNFT.getCharacteristics(tokenIdOfChallenger).ram;
+ isRamSelected = true;
selectedRam = ramNFT.getCharacteristics(tokenIdOfAnyPerticipent).ram;
+ isRamSelected = true;
Updates

Lead Judging Commences

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

`isRamSelected` is not set

Support

FAQs

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