Bid Beasts

First Flight #49
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Valid

Misplaced AuctionSettled Event Emission

Summary

The AuctionSettled event is incorrectly emitted in the placeBid function before any bid . This event should only be emitted when an auction is finalized (in _executedSale), but instead it fires on every regular bid placement, providing misleading information to off-chain systems and users.

Description

In the placeBid function, the AuctionSettled event is emitted immediately after the buy-now return statement and before regular bidding logic:

function placeBid(uint256 tokenId) external payable isListed(tokenId) {
// ... buy-now logic with early return ...
return; // Buy-now path exits here
require(msg.sender != previousBidder, "Already highest bidder");
@> emit AuctionSettled(tokenId, msg.sender, listing.seller, msg.value);
}

Impact

  • Off-chain System Errors: Indexers and APIs will show auctions as "settled" when they're still active

  • User Interface Bugs: Frontends may display incorrect auction states, confusing users

Mitigation

Remove the misplaced event emission as it emitted in _executeSale:

function placeBid(uint256 tokenId) external payable isListed(tokenId) {
// ... existing code ...
return; // Buy-now path exits
require(msg.sender != previousBidder, "Already highest bidder");
- emit AuctionSettled(tokenId, msg.sender, listing.seller, msg.value);
// --- Regular Bidding Logic ---
// ... rest of the code ...
}
Updates

Lead Judging Commences

cryptoghost Lead Judge 2 months ago
Submission Judgement Published
Validated
Assigned finding tags:

BidBeasts Marketplace: Incorrect Event Emission

placeBid emits AuctionSettled even though the auction hasn’t ended, causing misleading event logs.

Support

FAQs

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

Give us feedback!