sherlock-audit / 2024-03-arrakis-judging

0 stars 0 forks source link

Incorrect Use of `symbol()` Instead of `name()` in `getTokenName` #94

Closed sherlock-admin2 closed 1 month ago

sherlock-admin2 commented 1 month ago

Incorrect Use of symbol() Instead of name() in getTokenName

Low/Info issue submitted by NoOne

Summary

in function getTokenName is used symbol() instead name()

Vulnerability Detail

Impact

The use of symbol() will return the symbol of token not the name of token

Code Snippet

        string memory symbol0 = IERC20Metadata(token0_).symbol();
        string memory symbol1 = IERC20Metadata(token1_).symbol();

Tool used

Manual Review

Recommendation

Use

        string memory name0= IERC20Metadata(token0_).name();
        string memory name1= IERC20Metadata(token1_).name();