AuctionSettled event during placeBid misrepresents active auctions as settled, confusing users and off-chain systemsThe BidBeastsNFTMarketPlace::AuctionSettled event is intended to signal the final settlement of an auction, indicating the winner, seller, and final price. However, it is incorrectly emitted in the BidBeastsNFTMarketPlace::placeBid function during regular bidding (not buy-now scenarios), despite the auction remaining active. This misrepresents the auction’s status, potentially confusing users and disrupting off-chain applications that rely on event logs.
Likelihood: High
Occurs for every regular bid placed in placeBid, excluding buy-now scenarios.
Impact: Low
User Confusion: Users monitoring events think the auction ended when it didn't
Integration Issues: Off-chain applications (e.g., frontend, indexers) may incorrectly process auctions as settled, disrupting status displays or bidding interfaces.
To capture event emissions, import the Vm module in BidBeastsMarketPlaceTest.t.sol:
Next, add the following test to BidBeastsMarketPlaceTest.t.sol:
Finally, run it using the command:
The output we get:
Simple, and straightforward. Just remove the AuctionSettled event from placeBid function, as it doesn't belong there.
placeBid emits AuctionSettled even though the auction hasn’t ended, causing misleading event logs.
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.