FlowNFTDescriptor
is responsible for generating metadata for NFTs that represent Sablier payment streams. The NFTs serve as on-chain representations of streaming payments.
The tokenURI
function generates static metadata without including any stream-specific data, despite receiving sablierFlow
and streamId
parameters that could be used to fetch stream details.
https://github.com/Cyfrin/2024-10-sablier/blob/main/src/FlowNFTDescriptor.sol#L13
The identical metadata across Sablier stream NFTs creates a vulnerability in the protocol's usability and integration surface. When users interact with these streams through wallets or marketplaces, they're presented with identical, non-descriptive NFTs that fail to reflect the underlying stream parameters. This breaks a fundamental trust and verification mechanism - users cannot distinguish between a stream worth 1000 DAI and one worth 1 DAI by examining the NFT metadata.
The problem becomes particularly acute in marketplace scenarios where NFT metadata serves as the primary interface for purchase decisions. A malicious actor could exploit this limitation by listing a low-value stream NFT while advertising it as representing a high-value stream, since the NFT metadata provides no way to verify these claims without querying the contract directly.
The ripple effects extend beyond direct user interaction. Protocols attempting to build on top of Sablier streams cannot programmatically filter, sort, or validate streams based on their NFT representations. This severely limits composability - a cornerstone of DeFi protocols. For instance, a lending protocol that might want to accept Sablier stream NFTs as collateral has no way to assess the stream's value or parameters from the NFT metadata alone.
This limitation effectively forces all integrators and users to maintain direct contract-level interactions rather than leveraging the NFT standard's built-in metadata capabilities, negating much of the benefit of having an NFT representation in the first place. The static metadata essentially reduces these NFTs from being rich, self-describing financial instruments to mere identifiers, significantly undermining their utility in the broader DeFi ecosystem.
Change function to view
to allow reading stream data
Add stream-specific data to metadata
Generate dynamic SVG visualization
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.