The function ChoosingRam::increaseValuesOfParticipants is designed to allow a challenger to compete against another user, with the winner's characteristics being updated. However, there is a vulnerability that allows an attacker to exploit the function by passing their token ID for both tokenIdOfChallenger and tokenIdOfAnyPerticipent. This allows the attacker to continuously call the function and ensure they are the selected Ram, thereby manipulating the competition and winning.
Function Affected: ChoosingRam::increaseValuesOfParticipants
Parameters: tokenIdOfChallenger, tokenIdOfAnyPerticipent
Issue: The function does not validate that tokenIdOfChallenger and tokenIdOfAnyPerticipent are different, allowing users to pass the same token ID for both parameters.
Exploitation: An attacker can exploit this by repeatedly calling the function with the same token ID for both parameters, ensuring that they win and become the Ram.
The vulnerability undermines the fairness of the competition by allowing attackers to guarantee wins and continuously improve their characteristics without legitimate competition.
Manual Review
To address this vulnerability, the increaseValuesOfParticipants function should be modified to include a validation check ensuring that tokenIdOfChallenger and tokenIdOfAnyPerticipent are not the same. This will prevent users from exploiting the function by competing against themselves.
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.