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

Inconsistency on the status with `block.timestamp == auctionEndTime`

Summary

For bid/unbid block.timestamp == auctionEndTime is considered as not ended
For auctionEnd block.timestamp == auctionEndTime is considered as ended

An inconsistency issue was raised.

Vulnerability Details

  • bid and unbid Functions:

    • These functions allow actions to be performed if block.timestamp <= auctionEndTime. This means that bids and unbids can still be made at the exact moment when block.timestamp == auctionEndTime.

if (block.timestamp > auctionEndTime) {
revert AuctionAlreadyEnded();
}
  • auctionEnd Function:

    • This function allows the auction to be ended if block.timestamp >= auctionEndTime. This means that the auction can be ended at the exact moment when block.timestamp == auctionEndTime.

if (block.timestamp < auctionEndTime) {
revert AuctionNotYetEnded();
}

Impact

At the exact moment when block.timestamp == auctionEndTime, both bidding/unbidding and ending the auction are allowed.

Tools Used

Manual

Recommendations

Handling block.timestamp == auctionEndTimeas ended or not ended in the validations above.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

If no bids are placed during the auction, the `auctionToken` will be permanently locked within the `AuctionFactory`

An auction with 0 bids will get the `totalTokens` stuck inside the contract. Impact: High - Tokens are forever lost Likelihood - Low - Super small chances of happening, but not impossible

Appeal created

0xbrivan2 Judge
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

If no bids are placed during the auction, the `auctionToken` will be permanently locked within the `AuctionFactory`

An auction with 0 bids will get the `totalTokens` stuck inside the contract. Impact: High - Tokens are forever lost Likelihood - Low - Super small chances of happening, but not impossible

Support

FAQs

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