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

Ram cannot be selected other than by the organiser

Summary

Ram cannot be selected other than by the organiser

Vulnerability Details

function testRamCannotBeSelectedOtherThanByTheOrganiser() public participants {
vm.startPrank(player1);
assertEq(ramNFT.getCharacteristics(0).ram, player1);
while (!ramNFT.getCharacteristics(0).isSatyavaakyah) {
choosingRam.increaseValuesOfParticipants(0, 0);
}
assert(ramNFT.getCharacteristics(0).ram == player1);
assert(ramNFT.getCharacteristics(0).isJitaKrodhah == true);
assert(ramNFT.getCharacteristics(0).isDhyutimaan == true);
assert(ramNFT.getCharacteristics(0).isVidvaan == true);
assert(ramNFT.getCharacteristics(0).isAatmavan == true);
assert(ramNFT.getCharacteristics(0).isSatyavaakyah == true);
assert(choosingRam.isRamSelected() == false);
}

Impact

User has no incentive increasing their Ram:

  1. Users increasing their Ram have no impact on whether they become selected or not

  2. Organiser selects Ram randomly

Tools Used

Manual Review, Foundry

Recommendations

Set isRamSelected to true in the function increaseValuesOfParticipants when ramNFT.isSatyavaakyah is set to true at the end of if else clause.

Updates

Lead Judging Commences

bube Lead Judge over 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.