approve()
return value not checked
#115
Labels
0 (Non-critical)
Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation
bug
Something isn't working
Handle
sirhashalot
Vulnerability details
Impact
The
approveToken()
function in TreasuryManager.sol callsapprove()
on an ERC20 token, but does not check the return value of this call to confirm it completed as expected. Some tokens do not follow the ERC20 specifications as expected and do not revert if the approve failed, but checking if the function returns true can help to catch these edge cases.This finding was identified in the last Notional contest as a medium risk, but I conservatively marked it as low risk.
Proof of Concept
Line 79 of TreasuryManager.sol is where
approve()
is called without any return value checksRecommended Mitigation Steps
Check the return value of ERC20 operations to validate that they were successfully completed.
The text was updated successfully, but these errors were encountered: