DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Missing input validation on `createAuction` function parameters can lead to loss of value

Summary

There are some problems with the input validation in createAuction, more specifically related to the timestamp values.

we can set the biddingTime to any value.

Those possibilities should all be mitigated, as they can lead to the initial reserves and/or the bids being stuck in the protocol forever.

Vulnerability Details

// Transfer the auction tokens from the msg.sender to the new auction contract
function createAuction(
address auctionToken,
uint256 biddingTime,
uint256 totalTokens,
bytes32 salt
) external onlyOwner {
address auctionAddress = address(
@>new FjordAuction{ salt: salt }(fjordPoints, auctionToken, biddingTime, totalTokens)
);
IERC20(auctionToken).transferFrom(msg.sender, auctionAddress, totalTokens);
emit AuctionCreated(auctionAddress);

Impact

it can lead to stuck funds

Tools Used

Recommendations

Use a minimal biddingTime value, for example 1 day, as well as a max value, for example 20 days. Make sure auction does not start more than X days after it has been created as well.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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