Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: medium
Invalid

Return values of approve() not checked

Summary

[M-3] Return values of approve() not checked

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

file: /contracts/strategy/gmx/GMXWorker.sol
118 IERC20(sp.tokenIn).approve(address(self.swapRouter), sp.amountIn);
133 IERC20(sp.tokenIn).approve(address(self.swapRouter), sp.amountIn);
Updates

Lead Judging Commences

hans Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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