Rock Paper Scissors

First Flight #38
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Unchecked Return in `RockPaperScissors` contract from `winningToken.transferFrom()`

Summary

Functions createGameWithToken() and joinGameWithToken() returns a value but it is ignored. Consider checking the return value to ensure that the transfer was successful.

winningToken.transferFrom(msg.sender, address(this), 1);

Vulnerability Details

Impact

This could lead to a situation where the transfer fails but the function does not handle it, potentially leading to unexpected behavior or loss of funds.

Tools Used

Aderyn.

Recommendations

Add a check to ensure that the transfer was successful. This could be done by checking the return value of the transferFrom() function and reverting the transaction if it fails.

Updates

Appeal created

m3dython Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Missing Check on External Call Return Value

ERC20 implementation typically reverts on transfer failures

m3dython Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Missing Check on External Call Return Value

ERC20 implementation typically reverts on transfer failures

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.