In bid function doesnt have check if amount is 0.
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.
Wasted Gas Fees: Users who unknowingly or maliciously place 0 bids will still incur gas costs, leading to wasted funds.
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.