In the ChoosingRam::increaseValuesOfParticipants function, a user can challenge themselves by setting the same token ID for both the challenger and the participant, leading to a guaranteed win in every scenario.
The function allows a user to pass the same token ID for both tokenIdOfChallenger and tokenIdOfAnyPerticipent. This issue enables the user to always win since the random selection process does not differentiate between the challenger and the participant when they are the same entity. The user has just
to call the function again and again with the same parameters to guarantee a win.
Use this test in the Dussehra.t.sol
Users can exploit this vulnerability to always win.
Manual Review
Add a check to ensure that tokenIdOfChallenger and tokenIdOfAnyPerticipent are not the same. If they are, revert the transaction to prevent self-challenging.
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.