Sparkn

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

Some tokens may revert when zero value transfers are made

Summary

In spite of the fact that EIP-20 states that zero-valued transfers must be accepted, some tokens, such as LEND will revert if this is attempted. See Weird ERC20 Tokens - Revert on Zero Value Transfers.

Vulnerability Details

There is 1 instance of this issue.

File: src/Distributor.sol
147: erc20.safeTransfer(winners[i], amount);
File Link Instance Count Instance Link
Distributor.sol 1 147

Impact

A zero-valued transfer may cause transactions that involve other tokens (such as batch operations) to fully revert.

Tools Used

baudit: a custom static code analysis tool; manual review

Recommendations

Consider skipping the transfer if the amount is zero, which will also save gas.

Support

FAQs

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