Extension logic incorrectly extends the auction by an additional amount of existing duration
The auction extension logic added the full existing duration instead of the intended 15-minute buffer when a bid arrived near the end of an auction. This delayed payout of funds and collateral until the wrongly extended auction finished.
Source: https://github.com/sherlock-audit/2022-10-astaria-judging/issues/201
Found by
bin2chen, Prefix, yixxas, 0xRajeev, minhquanym
Summary
Incorrect auction extension logic extends the auction by an additional amount of the previous duration instead of extending it by 15 minutes.
Vulnerability Detail
The calculation of newDuration incorrectly adds duration in the auction extension logic. This causes the new duration to be extended by an additional amount of the existing duration, instead of an additional 15 minutes (timeBuffer), when a bid is created in the last 15 mins of the existing auction duration.
Impact
Delayed payout of funds/collateral upon auction completion only after the newly extended duration.
Code Snippet
Tool used
Manual Review
Recommendation
Change the calculation to uint64 newDuration = uint256(block.timestamp + timeBuffer - firstBidTime).safeCastTo64();
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
Root cause
Likely the new duration was computed by adding the full auction duration to the current time rather than the short time buffer.
Impact
Payout of funds and collateral was delayed until the incorrectly extended auction duration elapsed.
What the attacker needed
A bid placed in the final 15 minutes
The fix
The calculation should be changed so the new duration is the time buffer added to the current timestamp minus the first bid time.
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.
An auction has a set end time, and a late bid is meant to push the end time back by a short fixed window so others can respond. Here the code added the whole original auction length instead, so the auction ran far longer than intended and the seller waited much longer for their money.
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.