list() stores the listing in s_listings[_tokenId] but the emitted event
uses listingsCounter. Off-chain systems (frontends, indexers) that use the
event's listingId to call buy(), cancelListing(), or updatePrice() will
reference wrong or nonexistent listings.
Likelihood:
Every listing emits a mismatched ID. Any integration
relying on events will break.
Impact:
Users calling buy(listingsCounter) interact with the wrong
listing or revert. Marketplace is functionally broken for off-chain consumers.
Token ID 5 creates listing stored at s_listings[5], but event emits
listingId = 1. A buyer calling buy(1) references s_listings[1] which is
a different (or empty) listing.
Use a consistent key. Either store at listingsCounter or emit _tokenId.
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.
The contest is complete and the rewards are being distributed.