Skip to content
Business logic Audit finding Intermediate

Auction parameters can be changed during ongoing auction

The auction contract allows the owner to change auction parameters such as duration, reserve price, time buffer, and minimum bid increment at any time, including during an ongoing auction, and the changes take effect immediately. This can cause bidders' transactions to fail or alter their expectations, potentially leading to unintended outcomes like instant settlement or price changes.

__141345__ Follow

Originally disclosed on Code4rena

Submitted by 141345, also found by pauliax, rbserver, rvierdiiev, and sorrynotsorry

Auction.sol#L307-L335

The auction parameters can be changed anytime, even during ongoing auctions, and take effect immediately. Users may need time to react to the changes. The impacts maybe followings:

  • some sudden changes may cause bidder’s transaction fail, such as setReservePrice() and setMinimumBidIncrement()
  • some changes may change users expectation about the auction, such as setDuration() and setTimeBuffer(), with different time parameters, bidders will use different strategy

Proof of Concept

src/auction/Auction.sol

    function setDuration(uint256 _duration) external onlyOwner {
        settings.duration = SafeCast.toUint40(_duration);

        emit DurationUpdated(_duration);
    }

    function setReservePrice(uint256 _reservePrice) external onlyOwner {
        settings.reservePrice = _reservePrice;

        emit ReservePriceUpdated(_reservePrice);
    }

    function setTimeBuffer(uint256 _timeBuffer) external onlyOwner {
        settings.timeBuffer = SafeCast.toUint40(_timeBuffer);

        emit TimeBufferUpdated(_timeBuffer);
    }

    function setMinimumBidIncrement(uint256 _percentage) external onlyOwner {
        settings.minBidIncrement = SafeCast.toUint8(_percentage);

        emit MinBidIncrementPercentageUpdated(_percentage);
    }

Recommended Mitigation Steps

  • Do not apply changed parameters on ongoing auctions
  • Add a timelock for the changes

Alex the Entreprenerd (judge) commented:

The Warden has shown how settings can be changed mid-auction, this can create undefined behaviour (insta-settlement, change of price).

While max loss is one token or the inability to settle the auction, because this could create a “social accident”, I believe that Medium Severity is appropriate.

Changes should either be cached in the Auction Parameters, or should be applied to the next auction to avoid any unexpected surprise

kulkarohan (Nouns Builder) confirmed


The original report as published on Code4rena, by __141345__. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

Bidders' transactions may fail or their expectations may be altered, potentially causing a 'social accident' such as instant settlement or unexpected price changes, though the maximum loss is one token or the inability to settle the auction.

What the attacker needed

Owner privileges; ongoing auction

The fix

The changes should either be cached in the auction parameters or applied only to the next auction, and a timelock could be added.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

In an auction, the rules like how long it lasts or the minimum price should stay the same until it ends. Here, the person in charge can change those rules in the middle of the auction, which can confuse bidders or make their bids fail. This is a problem because people expect the rules to be stable once the auction starts.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by __141345__

View all

18 more disclosed reports, best first.

More from Nouns Builder contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.