20,000 USDC
View results
Submission Details
Severity: medium

Some tokens may revert when zero value transfers are made

Summary

In some of the transfer and transferFrom functions it is not prevented to send 0 value and the transaction could potentially be reverted.

Vulnerability Details

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, which may cause transactions that involve other tokens (such as batch operations) to fully revert.

Impact

Having the transaction unexpectedly reverted might cause issues.

Tools Used

None

Recommendations

Consider skipping the transfer if the amount is zero, which will also save gas.
Add a condition before each transfer to avoid sending 0

Support

FAQs

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