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

Missing check for 0 amount in bid function

Summary

In bid function doesnt have check if amount is 0.

Vulnerability Details

In the bid function, users are allowed to place a bid without any restrictions on the amount they can bid. However, there is no check in place to prevent a user from bidding an amount of 0. This can lead to a few issues:

Unnecessary Transactions: A user could submit a bid with a 0 amount, which would result in a transaction that consumes gas without contributing any value to the auction. These transactions are not only wasteful but could also clutter the blockchain with irrelevant data.

Skewed Auction Data: The bids mapping and totalBids variable would be updated even though the bid amount is 0. This could result in misleading data, making it appear as though more bids have been placed than have actually contributed value to the auction.

Impact

Wasted Gas Fees: Users who unknowingly or maliciously place 0 bids will still incur gas costs, leading to wasted funds.

Tools Used

Recommendations

To address this issue, it is recommended to add a validation check at the beginning of the bid function to ensure that the amount is greater than zero.

Updates

Lead Judging Commences

inallhonesty Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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