sherlock-audit / 2023-04-footium-judging

13 stars 7 forks source link

jasonxiale - safeTransfer is recommended instead of transfer #365

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

jasonxiale

medium

safeTransfer is recommended instead of transfer

Summary

ERC20 standard allows transferF function of some contracts to return bool or return nothing. Some tokens such as USDT return nothing. Using safeTransfer of SafeERC20.sol is recommended instead.

Vulnerability Detail

https://github.com/sherlock-audit/2023-04-footium/blob/main/footium-eth-shareable/contracts/FootiumEscrow.sol#L110

https://github.com/sherlock-audit/2023-04-footium/blob/main/footium-eth-shareable/contracts/FootiumPrizeDistributor.sol#L130

Impact

Code Snippet

Tool used

Manual Review

Recommendation

Duplicate of #86