NFT Dealers

First Flight #58
Beginner FriendlyFoundry
100 EXP
Submission Details
Impact: low
Likelihood: low

`NFT_Dealers_Sold` event missing `listingId` and `tokenId` making off-chain tracking unreliable

Author Revealed upon completion

`NFT_Dealers_Sold` event missing `listingId` and `tokenId` making off-chain tracking unreliable

Description

The `NFT_Dealers_Sold` event only emits `soldTo` and `price`, omitting both `listingId` and `tokenId`. This makes it impossible for off-chain indexers or subgraphs to reliably reconstruct the full lifecycle of a listing solely from events.

// Missing listingId and tokenId
event NFT_Dealers_Sold(address indexed soldTo, uint256 price); // @>
// Compare with other events that include listingId:
event NFT_Dealers_Listed(address indexed listedBy, uint256 listingId);
event NFT_Dealers_ListingCanceled(uint256 listingId);

Risk

This approach will make off chain tracking unreliable because in Sold event there is no listingId indexed

Proof of Concept

-

Recommended Mitigation

Add the listingId for make off chian tracking much easier

- event NFT_Dealers_Sold(address indexed soldTo, uint256 price);
+ event NFT_Dealers_Sold(address indexed soldTo, uint256 indexed listingId, uint256 price);

Support

FAQs

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

Give us feedback!