The AuctionSettled event should only be emitted when an auction is actually completed and finalized, indicating the final winner and sale price.
The placeBid function incorrectly emits the AuctionSettled event during regular bid placement, even though the auction is still ongoing and no settlement has occurred.
Likelihood:
This occurs on every valid bid placement after the buy-now logic check, affecting all regular auction bidding activity.
The event is emitted regardless of whether the auction will continue or end, creating false settlement signals.
External monitoring systems and frontend applications will receive incorrect auction state information on every bid.
Impact:
Off-chain monitoring systems and indexers will incorrectly interpret ongoing auctions as completed, leading to data inconsistencies.
Frontend applications may display incorrect auction status, confusing users about whether auctions are still active.
Analytics and reporting tools will show inflated settlement counts and incorrect auction completion data.
First we need to make a quick fix in test/BidBeastsMarketPlaceTest.t.sol:BidBeastsNFTMarketTest::setUp()
Please add the following test to test/BidBeastsMarketPlaceTest.t.sol:BidBeastsNFTMarketTest:
Then run forge test --mt testIncorrectEmit
Output:
Remove the incorrect event emission from the placeBid function:
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.