Beginner FriendlyFoundryDeFiOracle
100 EXP
View results
Submission Details
Severity: low
Invalid

missing check `isAllowedToken` with `token` make some piece of code doing nothing

Summary

missing check isAllowedToken with token makes s_tokenToAssetToken[token] can be address(0) and the following code does nothing

Vulnerability Details

Some function does not check s_tokenToAssetToken[token] with address(0) when the user pass token params to contract

Impact

The missing check isAllowedToken with token can lead to some redundant execute code after that line with value 0

Tools Used

Manual
Foundry

Recommendations

Add check isAllowedToken(IERC20 token) for each function that allows the user to pass the token as a parameter to prevent the default value address(0) in s_tokenToAssetToken[token] mapping.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

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