Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: low
Invalid

Refreshing the NFT metadata for non-existent tokens can create issues for marketplaces.

Vulnerability details

The SablierV2Lockup::setNFTDescriptor function emits the BatchMetadataUpdate event, allowing all marketplaces listening for this event to refresh the old metadata of all tokens to new metadata. Unfortunately, this function does not validate whether any tokens have been minted or not.

It hardcodes the value of the first token to 1 and the last token to nextStreamId - 1, but the initial value of nextStreamId is 1. So, if no streams have been created at the time of updating the NFT descriptor, the values of this event will be 1 and 0, which will create problems for marketplaces because there will be no NFTs with token IDs 1 and 0.

Impact

Refreshing the NFT metadata for non-existent tokens can create issues for marketplaces

Tools Used

Manual Review

Recommended Mitigation Steps

Ensure that metadata is only refreshed when at least one stream has been created.

Updates

Lead Judging Commences

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

Info/Gas/Invalid as per Docs

https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

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

Info/Gas/Invalid as per Docs

https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Support

FAQs

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