MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing Return Value Check for ERC20 Transfer Function

The Pot contract does not verify the return value of the ERC20 transfer function in the _transferReward function. This oversight can lead to undetected transfer failures, potentially affecting reward distribution.

Vulnerability Details

The _transferReward function calls the transfer function of the ERC20 token without checking its return value.

function _transferReward(address player, uint256 reward) internal {
i_token.transfer(player, reward);

If the transfer fails, the lack of a return value check means the contract will not be aware of the failure, leading to incorrect assumptions about reward distribution.

Impact

Failed transfers may go unnoticed, resulting in players not receiving their rewards.

Tools Used

Manual Review

Recommendation

Implement checks for the return value of the transfer function to ensure successful execution.

Updates

Lead Judging Commences

equious Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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