Skip to content
Business logic Audit finding Intermediate

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.

bin2chen Follow with Prefix, yixxas and 2 others

Originally disclosed on Sherlock

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

  1. https://github.com/sherlock-audit/2022-10-astaria/blob/main/lib/astaria-gpl/src/AuctionHouse.sol#L135-L137

Tool used

Manual Review

Recommendation

Change the calculation to uint64 newDuration = uint256(block.timestamp + timeBuffer - firstBidTime).safeCastTo64();

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

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.

More by bin2chen

View all

139 more disclosed reports, best first.

More from Astaria

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.