Lack of check in ChoosingRam::increaseValuesOfParticipants
function allows a player to play against himself, which should not be allowed.
ChoosingRam::increaseValuesOfParticipants
function allows to increase value of Ram NFT. Function accepts token id of challenger (caller) and token id of any participant that also holds Ram NFT. Problem arises because caller can input his token id both as challenger and participant and function does not have check for this scenario. This means challenger can play versus himself, which shouldn't be allowed.
Player mints Ram NFT with token id 0.
Assert that token id 0 is not Jita Krodhah.
Player calls ChoosingRam::increaseValuesOfParticipants
function with token id 0 as challenger and token id 0 as participant. Token increased value to Jita Krodhah.
Player calls ChoosingRam::increaseValuesOfParticipants
function again with token id 0 as challenger and token id 0 as participant. Token increased value to Dhyutimaan.
Place the following test into Dussehra.t.sol
.
Owner of Ram NFT token can easily increase value without chance of losing because he is playing against himself, it is win-win situation. This is not desired behavior, because that player could easily become selected Ram within few function calls.
Manual review
Add additional check in ChoosingRam::increaseValuesOfParticipants
function to prevent player from playing against himself.
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.