increaseValuesOfParticipants()
doesn't add any limitations to the tokenIds that you can pass as parameters (apart from their existence)
So, the following situations are possible:
the same value for both parameters
two NFTs that you control on different accounts
Of course, in those situations, the caller always wins.
increaseValuesOfParticipants
is risk-free because users can always choose a favorable situation for them.
Add the following test to test/Dussehra.t.sol
:
A code like this can be easily added into a smart contract function and called after this contract has entered the competition with the tokenId that he received.
Even if we disallow increaseValuesOfParticipants
to accept the same value for both his parameter, users can still create multiple accounts and only pick battles with NFTs they own.
A possible solution to this is to also randomly pick tokenIdOfAnyPerticipent
to add more fairness to the game.
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.