You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
sherlock-admin opened this issue
May 5, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
No check if transfer() operation was successful in FootiumEscrow.sol
Summary
There is no check provided for transfer() function to check if this operation was successful.
Vulnerability Detail
If transfer() opcode costs more than 2300 gas it will be reverted. And when you use it to send to a smart contract, the chances are it will cost more and it's considered a bug to use it.
It's better to use low-level calls that don't revert on failure but instead return a boolean value that can be checked. And it's better to use safeTransfer() implementation of transfer() because there some weird ERC20 tokens that can behave unexpectedly.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
0xeix
medium
No check if transfer() operation was successful in FootiumEscrow.sol
Summary
There is no check provided for transfer() function to check if this operation was successful.
Vulnerability Detail
If transfer() opcode costs more than 2300 gas it will be reverted. And when you use it to send to a smart contract, the chances are it will cost more and it's considered a bug to use it.
Impact
Medium-risk vulnerability.
Code Snippet
https://github.com/sherlock-audit/2023-04-footium/blob/main/footium-eth-shareable/contracts/FootiumEscrow.sol#L110
Tool used
Manual Review
Recommendation
It's better to use low-level calls that don't revert on failure but instead return a boolean value that can be checked. And it's better to use safeTransfer() implementation of transfer() because there some weird ERC20 tokens that can behave unexpectedly.
Duplicate of #86
The text was updated successfully, but these errors were encountered: