40,000 USDC
View results
Submission Details
Severity: gas
Valid

Zero value ERC20 token transfers can revert for certain tokens

Summary

Some ERC20 tokens revert for zero-value transfers (e.g. LEND). See Weird ERC20 Tokens - Revert on Zero Value Transfers.

Vulnerability Details

There is 1 instance of this issue.

File: src/EscrowFactory.sol
39: tokenContract.safeTransferFrom(msg.sender, computedAddress, price);
File Link Instance Count Instance Link
EscrowFactory.sol 1 39

Impact

If used as a order.baseAsset and a small strike price, the fee token transfer will revert. Hence, assets and the strike can not be withdrawn and remain locked in the contract.

Tools Used

baudit: a custom static code analysis tool; manual review

Recommendations

Consider adding explicit amount validation prior to attempting to the transfer.

Support

FAQs

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