In the RockPaperScissors::_finishGame
, the prize
is sent directly to the winner without checking if it can receive it. This can fail if it is a contract account without a fallback or a receive payable function. The transaction will revert, the game state will not be updated to Finished
and the RockPaperScissors
contract owner will never be able to withdraw the fees associated to this game.
In the RockPaperScissors::_finishGame
function, there is no check to see if a winner is a contract account. If it is a contract account and if it doesn't have a fallback or a receive payable function, it will never get the prize
because the RockPaperScissors::_finishGame
function will fail all the time. There will be no possibility also for the RockPaperScissors
contract owner to withdraw the fees associated to this game and the funds will be locked in the contract.
The funds associated to the game will be locked in the RockPaperScissors
contract without possibility to withdraw them.
Manual review
You should implement a pull-based reward mechanism where each winner of a game can claim their prize. Additionally, ensure that the RockPaperScissors
contract owner can withdraw the collected fees independently of whether the winner claims their reward.
Malicious player wins a game using a contract that intentionally reverts when receiving ETH, the entire transaction will fail
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.