TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: high
Invalid

Auctions can be gamed

Summary

Auctions can be exploited by a large deposit near the end.

Vulnerability Details

Like other auctions, DaiGoldAuction can be gamed by a single large deposit just before the end.

function bid(uint256 amount) external virtual override onlyWhenLive {
if (amount == 0) { revert CommonEventsAndErrors.ExpectedNonZero(); }
bidToken.safeTransferFrom(msg.sender, treasury, amount);
uint256 epochIdCache = _currentEpochId;
depositors[msg.sender][epochIdCache] += amount;

This is done in order for the big depositor to gets his "fixed" token price, where before his bid he can calculate at what price he would get the tokens and decide if it's worth making the bid and if yes - how much should he bid.

Impact

Auctions can be manipulated.

Tools Used

Manual review.

Recommendations

Given the current implementation, I can't recommend an easy fix for this issue.

Updates

Lead Judging Commences

inallhonesty Lead Judge
11 months ago
inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.