stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: medium
Invalid

Return value of approve not checked

Summary

Return value of approve not checked

Vulnerability Details

Not all IERC20 implementations revert() when there's a failure in approve(). The function signature has a boolean return value and they indicate errors that way instead. By not checking the return value, operations that should have marked as failed, may potentially go through without actually approving anything.

Impact

As we can see the approve is called in the constructor and the return value is not checked, so if the approve is fail, the contract should be redeployed to make a successful approve.

Tools Used

Manual Review

Recommendations

Consider checking the return of approve if they give a bool in return (e.g LINK has a bool return in approve)

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other
ubl4nk Submitter
over 1 year ago
0kage Lead Judge
over 1 year ago
0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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