Closed sherlock-admin2 closed 4 months ago
2 comment(s) were left on this issue during the judging contest.
WangAudit commented:
I believe it's intended behaviour and admins will only make reasonable changes at a reasonable time
takarez commented:
this is invalid as the admin has the responsibility to change this parameters.
auditsbyradev
high
NounsAuctionHouseV2.sol
- Auction parameters are not individually cached for each auctionSummary
The
NounsAuctionHouseV2.sol
contract is designed to facilitate the auctioning of Nouns NFTs, playing a central role in the Nouns DAO ecosystem. This contract manages the entire lifecycle of an auction, from creation, bidding, to settlement. Each auction involves minting a new Noun NFT, setting it up for auction, accepting bids, and ultimately transferring the NFT to the highest bidder, with the process designed to be transparent and fair to all participants.Auction Process
Vulnerability Detail
The problem in
NounsAuctionHouseV2.sol
contract is that the auction parameters, such as theminimum bid increment
,reserve price
, andtime buffer
, are managed as global settings rather than being cached individually for each auction. This means that changes to these parameters affect all ongoing and future auctions.Global Parameters: In the current implementation, the contract uses single, global state variables for
timeBuffer
,reservePrice
, andminBidIncrementPercentage
. These variables apply to the active auction and any future auctions until they are changed.Lack of Individual Auction Context: Each auction does not have its own set of these parameters. Consequently, if an auction is ongoing and one of these parameters is changed, the new values immediately affect the current auction.
Potential Exploitation: If these parameters are changed while an auction is active. This can lead to scenarios where the rules of the auction are altered in real-time, potentially disadvantaging certain bidders or favoring others. For example, increasing the
minBidIncrementPercentage
could unexpectedly raise the minimum additional bid amount required, while decreasing thetimeBuffer
could shorten the auction duration unexpectedly.Impact
This design choice can lead to inconsistencies and potentially unfair advantages if the parameters are changed during an ongoing auction. For example:
Code Snippet
NounsAuctionHouseV2.sol#setTimeBuffer()
NounsAuctionHouseV2.sol#setReservePrice()
NounsAuctionHouseV2.sol#setMinBidIncrementPercentage()
Tool used
Manual Review
Recommendation
Implement a mechanism where each auction caches its own set of parameters at the time of creation. This ensures that the rules of an auction remain consistent throughout its duration. Another possible solution is to add a
whenPaused
modifier in the setter functions of auction parameters so that the auction parameters cannot be changed while there is an active auction.