Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Invalid

Approve will not revert on call failure due to missing return value

Summary

Checking bool return of ERC20 approve breaks protocol for mainnet USDT and similar tokens which don't return true

As a result, if the call fails the boolean will still return true for those specific tokens.

Vulnerability Details

All tokens that implement the ERC20-Standard are in scope, which includes tokens such USDT & BNB.

For USDT, the approve function does not return a boolean value. This means that even if the approve were to fail, the bool would still be set to true and the approve within the contract will pass.

https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/CapitalPool.sol#L24-L39

Impact

Protocol won't work with USDT and similar tokens

Tools Used

Manual Review

Recommendations

Use SafeApprove.

Updates

Lead Judging Commences

0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Too generic
Assigned finding tags:

[invalid] finding-CapitalPool-approve-return-boolean

Invalid, low level call will always return true as long as the call succeeds without reverting, so this has no impact described, given approvals can only fail when some weird tokens do not allow a uint256.max approval, which is not described in any of the issues below.

Support

FAQs

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