Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.86 KB

065.md

File metadata and controls

62 lines (43 loc) · 1.86 KB

Bright Felt Bird

Medium

Auctions run for less time than intended

Summary

The NounsAuctionHouse contracts calculate auction duration from creation time rather than first bid time, potentially reducing the effective auction period and impacting price discovery. code Snippet : https://github.com/sherlock-audit/2024-11-nounsdao/blob/main/nouns-monorepo/packages/nouns-contracts/contracts/NounsAuctionHouseV3.sol#L299

Root Cause

When an auction is created, the end time is immediately set based on current timestamp plus duration, regardless of when the first bid occurs. This means if the first bid comes significantly after auction creation, the remaining time for competitive bidding is reduced from the intended duration.

function _createAuction() internal {
    try nouns.mint() returns (uint256 nounId) {
        uint40 startTime = uint40(block.timestamp);
        uint40 endTime = startTime + uint40(duration);

        auctionStorage = AuctionV2({
            nounId: uint96(nounId),
            clientId: 0,
            amount: 0,
            startTime: startTime,
            endTime: endTime,
            bidder: payable(0),
            settled: false
        });
    }
}

However, when an auction is created in _createAuction(), the auction's startTime is incorrectly initialized as uint40(block.timestamp) instead of firstBidTime.

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

  1. Reduced time for competitive bidding
  2. Less price discovery
  3. Potentially lower final auction prices
  4. Reduced market efficiency
  5. Lower treasury revenue

PoC

No response

Mitigation

Modify auction timing to start from first bid