TreasuryManager.approveToken ERC20 missing return value check #77
Labels
0 (Non-critical)
Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation
bug
Something isn't working
duplicate
This issue or pull request already exists
Handle
PranavG
Vulnerability details
The
approveToken
function inTreasuryManager
contract performs anERC20.approve()
call but does not check the success return value.Some tokens do not revert if the approval failed but return false instead.
Impact
Tokens that don't actually perform the approve and return
false
are still counted as a correct approve.Recommended Mitigation Steps
Use OpenZeppelin’s SafeERC20 library that can handle tokens that do not revert on failed approval.
The text was updated successfully, but these errors were encountered: