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

getAirdropToken() should return an address

Summary

The getAirdropToken function within the smart contract should be modified to return an address type instead of an interface type (IERC20). This adjustment ensures consistency in data types and enhances clarity and usability of the function.

Vulnerability Details

The current implementation of the getAirdropToken function returns an interface type (IERC20) instead of an address type. While this may not necessarily lead to vulnerabilities, it introduces potential confusion and inconsistency in the codebase. Users interacting with the smart contract may expect a simple address value from the getAirdropToken function, but instead receive a more complex interface type. This discrepancy can lead to misunderstandings and errors in smart contract interactions.

Impact

The incorrect return type of the getAirdropToken function could affect the usability and understandability of the smart contract. Users may encounter difficulties in integrating the function into their applications or understanding its purpose due to the unexpected data type returned.

Tools Used

Manual Review

Recommendations

To address this issue, it is recommended to modify the getAirdropToken function to return an address type instead of an interface type (IERC20)

- function getAirdropToken() external view returns (IERC20) {
+ function getAirdropToken() external view returns (address) {
- return i_airdropToken;
+ return address(i_airdropToken);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info

Support

FAQs

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