The createAuction
function lacks proper input validation for the auctionToken
, biddingTime
, or totalTokens
parameters. If auctionToken
is an invalid address address(0)
or if biddingTime
is set to 0. this will lead to problems when creating the auction contract.
The createAuction
function does not validate the inputs passed to it, the auctionToken
, biddingTime
, and totalTokens
parameters.
auctionToken: If this address is invalid (address(0)
), the auction will fail to function correctly since it won't have a valid token to auction.
biddingTime: If this is set to 0, the auction could end immediately after its creation, preventing any bids from being placed.
totalTokens: If this is set to 0, the auction will distribute no tokens, rendering the auction pointless.
Without input validation, auctions could be created with invalid parameters, leading to failed or malfunctioning auctions. This could result in the loss of auction functionality, wasted gas fees, and potential loss of tokens or funds.
Manual Review
Implement input validation to ensure that:
auctionToken
is a valid non-zero address.
biddingTime
is greater than 0
.
totalTokens
is greater than 0
.
and use custom errors to revert in case the input validation fails.
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.