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

BAHOZ - Return of arbitrary ERC20 transfer is not checked in escrow #85

Closed
sherlock-admin opened this issue May 5, 2023 · 1 comment
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

BAHOZ

medium

Return of arbitrary ERC20 transfer is not checked in escrow

Summary

The return value of erc20.transfer call in transferERC20() is not checked.

Vulnerability Detail

Several tokens do not revert in case of transfer failure and return false instead. If one of these tokens is used here, although transfer fails, transferERC20() will not revert. Moreover, the return value is not returned to the caller, which makes it impossible to handle this issue in case it is called by another contract that expects a successful transfer.

Impact

Depending on where the function is called from, the impact can be quite severe.

Code Snippet

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

Tool used

Static Analysis

Recommendation

Require the return value of the transfer to be true or use OZ's SafeERC20 wrapper for ERC20 tokens.

Duplicate of #86

@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
@sherlock-admin
Copy link
Contributor Author

sherlock-admin commented May 24, 2023

Escalate for 10 USDC

This should be dup of #14

You've deleted an escalation for this issue.

@sherlock-admin sherlock-admin added Escalated This issue contains a pending escalation and removed Escalated This issue contains a pending escalation labels May 24, 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