The BidBeastsNFTMarketPlace::AuctionSettled event should only be emitted when an auction is actually completed, which occurs in three legitimate scenarios: when a buyer purchases an NFT at the buy-now price, when an auction naturally ends and is settled via BidBeastsNFTMarketPlace::settleAuction function, or when a seller accepts the current highest bid via BidBeastsNFTMarketPlace::takeHighestBid function. In all these cases, the event is properly emitted from the BidBeastsNFTMarketPlace::_executeSale internal function after the NFT transfer and payment distribution have been completed.
The BidBeastsNFTMarketPlace::AuctionSettled event is incorrectly emitted on [line 143 in BidBeastsNFTMarketPlace.sol](https://github.com/CodeHawks-Contests/2025-09-bid-beasts/blob/449341c55a57d3f078d1250051a7b34625d3aa04/src/BidBeastsNFTMarketPlace.sol#L143) of the BidBeastsNFTMarketPlace::placeBid function during regular bidding operations, specifically when a bidder places a bid that exceeds the minimum bid increment. This creates a false signal that the auction has been completed when it is actually still ongoing, as the auction timer continues to run and other bidders can still place higher bids. The event is emitted with incorrect parameters (msg.sender as winner and msg.value as the final price) before any actual auction settlement logic has occurred.
Likelihood:
This event emission occurs on every valid bid placement that exceeds the minimum bid increment percentage (5%), which happens frequently during active auctions as bidders compete for NFTs
Impact:
Frontend applications, monitoring systems, and event listeners will receive false BidBeastsNFTMarketPlace::AuctionSettled events during active bidding, leading to incorrect UI states, premature auction completion notifications, and potential automated system failures
Users monitoring auctions will receive misleading notifications suggesting auctions have ended when they are still ongoing, potentially causing them to stop bidding prematurely or miss opportunities to place higher bids
Mint NFT
List NFT
Bidder 1 places first bid
Set-up event test using vm.expectEmit and creating a BidBeastsNFTMarketPlace::AuctionSettled template.
Place a second bid. If an event is emmitted in market.placeBid{value: secondBidAmount}(TOKEN_ID); that matches the event template then the vm.expectEmit test will not FAIL.
Verify second bid is active and second bid executed
Removing the BidBeastsNFTMarketPlace::AuctionSettled event on line 143 eliminates the false event emissions while preserving all legitimate auction completion events.
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.