20,000 USDC
View results
Submission Details
Severity: medium

Unchecked Return Value

Summary

This occurs when a smart contract calls a function of another contract (or token) and doesn't check the return value of this function. Some functions return a status code rather than throwing an exception in case of failure. If the calling contract doesn't check this status code, it could assume the called function succeeded when it actually failed.

Vulnerability Details

The vulnerability can be exploited if the smart contract calls external functions that return status codes rather than throwing exceptions in case of failure and the contract doesn't check these return values.

If the contract doesn't check the return value of transferFrom, it will assume the tokens were transferred successfully and proceed with its logic, potentially leading to undesirable outcomes.

Impact

The calling contract could continue execution with an incorrect state, possibly leading to loss of funds or other unintended behaviors.

Tools Used

manual

Recommendations

Always check return values of external function calls that are designed to return false in case of failure.

Use Openzeppelin safeERC20

Support

FAQs

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