sherlock-audit / 2024-02-smilee-finance-judging

2 stars 1 forks source link

rbitbytes - Incorrect Naming Of The ERC721 Contract Name and Symbol Inherited By The PositionManager #113

Closed sherlock-admin3 closed 8 months ago

sherlock-admin3 commented 9 months ago

rbitbytes

medium

Incorrect Naming Of The ERC721 Contract Name and Symbol Inherited By The PositionManager

Summary

The name and symbol of the NFT created by the PositionManager are incorrect and out-dated.

Vulnerability Detail

Strings are passed as arguments to the parameters of the constructor belonging to an ERC721 contract. This contract is inherited by PositionManger constructor. However these strings are out dated, and represent an earlier version of the smilee protocol.

Impact

A name and symbol that contains the correct information is important for the metadata integrity. This will allow the PositionManager.sol contract to be interrogated for it's name and for details about assets which the NFT's represent. This is also important in maintaining the intregity of the ERC721 Metadata JSON schema.

Code Snippet

https://github.com/sherlock-audit/2024-02-smilee-finance/blob/main/smilee-v2-contracts/src/periphery/PositionManager.sol#L44

constructor() ERC721Enumerable() ERC721("Smilee V0 Trade Positions", "SMIL-V0-TRAD") Ownable() {
    _nextId = 1;
}

Tool used

Manual Review

Recommendation

Ensure that strings containing up-to-date and relevant information should be passed as arguments to the ERC721 params.

constructor() ERC721Enumerable() ERC721("Smilee V2 Trade Positions", "SMIL-V2-TRAD") Ownable() {
    _nextId = 1;
}
sherlock-admin4 commented 8 months ago

2 comment(s) were left on this issue during the judging contest.

panprog commented:

invalid, this is informational finding and doesn't cause any loss of funds or functionality

takarez commented:

invalid