First Flight #18: T-Swap

First Flight #18
Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

PoolFactory::createPool should use .symbol() instead of .name()

Description: This will create problem in making the token because inside the createPool function we are declaring a string named liquidityTokenSymbol which helps us in making the token symbol. But in the code it is using the .name() function which is wrong because if we create the token with its name then it will create problem to identify it so we are creating it with the symbol but in the initialization state we have declared it as name() symbol. So, don't use the name() rather than use symbol().

Impact: Wrong token will be created which creates problem in identifying the token.

Recommend Mitigation:

- string memory liquidityTokenSymbol = string.concat("ts", IERC20(tokenAddress).name());
+ string memory liquidityTokenSymbol = string.concat("ts", IERC20(tokenAddress).symbol());

Also, try to use the correct name and symbol wherever it is required.

Updates

Appeal created

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

Support

FAQs

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