stake.link

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

WrappedTokenBridge#recoverTokens will drain the whole token balance

Summary

recoverTokens is supposed to retrieve tokens accidentally sent to the contract. However, if this function is called to recover the bridge's token, wrappedToken, or LINK, it will drain the whole balance of the contract, instead of just the amount that was sent by mistake.

Impact

Bridge's token balance would be drained.

Recommendations

Either add the amount to recover as a function parameter, or disable recovery of these tokens.

Updates

Lead Judging Commences

0kage Lead Judge
over 1 year ago
0kage Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

recover-check

Disallow recovery of sdl tokens

Support

FAQs

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