stake.link

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

Approving MAX_UINT amount of ERC20 tokens

Summary

The code grants maximum allowances (type(uint256).max) of linkToken and sdlToken to the _router.
This practice, while common for gas optimization, has proven to increase the impact of an attack many times in the past, in case the approved contract gets hacked.

Impact

Compromised routers can siphon unlimited funds.

Tools Used

Manual Analysis

Recommendations

Consider approving the exact amount that’s needed to be transferred, or alternatively, add an external function that allows the revocation of approvals.

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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