Wrong checks on Line 37 and Line 40 of the ChoosingRam
contract allows the users to challenge an unexisted participant. This increases their chance to become Ram and get the reward.
The ChoosingRam::increaseValuesOfParticipants
function is expected to revert when an unexisted token id is challenged. For this purpose the RamNFT
contract counts the number of minted NFT tokens and provides the function RamNFT::tokenCounter
. The returned value of this function is not used correctly in the equation in Line 37 of the ChoosingRam
. The equation must be tokenIdOfChallenger >= ramNFT.tokenCounter()
instead of tokenIdOfChallenger > ramNFT.tokenCounter()
. Also for Line 40 the equation must be tokenIdOfAnyPerticipent >= ramNFT.tokenCounter()
and not tokenIdOfAnyPerticipent > ramNFT.tokenCounter()
.
The following test shows that the ChoosingRam::increaseValuesOfParticipants
is not reverting as expected.
The users might get the information from the RamNFT::tokenCounter
and always challenge an unexisted token which will increase their chance to become Ram and get the reward.
Manual review
Fix the sign of the equations in Line 37 and Line 40 of the ChoosingRam
. See the code below.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.