The constructor of the Auction contract lacks essential input validation checks. Specifically, it does not validate that the auction's start time is earlier than the end time, nor does it ensure that critical address parameters (such as the ZENO token, USDC token, business address, and initial owner) are non-zero. Without these checks, the contract can be deployed in a misconfigured state, which can lead to malfunctioning auctions, misdirected token transfers, or loss of control over the contract.
Affected Code:
The Auction contract's constructor:
Issues Identified:
Time Validation:
The contract does not check that the auction's start time is less than the end time. This could lead to an auction that either never starts or ends immediately, which would render the auction process ineffective or malfunctioning.
Zero Address Checks:
Critical parameters such as _zenoAddress, _usdcAddress, _businessAddress, and _initialOwner are not checked to ensure that they are not zero addresses. If any of these addresses are set to zero, token transfers (such as USDC payments or ZENO token minting) could be misdirected or fail altogether, leading to loss of funds or contract malfunction.
Auction Malfunction:
Without validating that the start time is earlier than the end time, the auction may not function as expected. For example, it could end immediately, causing the auction to be ineffective, or it could start after the end time, which doesn't make sense in the context of an auction.
Manual Code Review
Validate Time Parameters:
Ensure that the auction start time is earlier than the end time to avoid a non-functional auction:
Validate Critical Addresses:
Add checks to ensure that critical address parameters are not set to the zero address. This is essential for ensuring that token transfers and minting functions operate as intended:
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.