Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low
Valid

zero-value ERC20 token transfers can revert for certain tokens

Summary

zero-value ERC20 token transfers can revert for certain tokens

Vulnerability Details

Some ERC20 tokens revert for zero-value transfers (e.g. LEND). 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.
See Weird ERC20 Tokens - Revert on Zero Value Transfers

Impact

Instances (2):

File: src/Distributor.sol
147: erc20.safeTransfer(winners[i], amount);
164: token.safeTransfer(STADIUM_ADDRESS, token.balanceOf(address(this)));

147, 164

Tools Used

Personal bot

Recommendations

Support

FAQs

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