Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

mstpr-brainbot - transfer can fail for non standard ERC20 tokens #46

Closed
sherlock-admin opened this issue May 5, 2023 · 0 comments
Closed
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented May 5, 2023

mstpr-brainbot

high

transfer can fail for non standard ERC20 tokens

Summary

Some tokens does not have return values as booleans which would fail if its used with IERC20(address).transfer. To mitigate this safeTransfer should be used.

Vulnerability Detail

As stated in summary, due to some Non standard ERC20-s not returning boolean in transfers, it is best to use safeTransfer instead of transfer. In case of these tokens (i.e: USDT) received by the contract, tokens will be stucked forever since transfer will not go through

Impact

Code Snippet

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

Tool used

Manual Review

Recommendation

Use safeTransfer instead of transfer

Duplicate of #14

@github-actions github-actions bot added Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels May 10, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant