[H-1] DaiGoldAuction::startAuction can be called repeatedly by anyone right after contract deployment, leading to tokens being stuck permanently.
The startAuction() function in DaiGoldAuction can be called repeatedly right after the contract deployment, leading to tokens being stuck permanently. This occurs due to a lack of proper validation checks on the initial state, allowing the function to bypass necessary cooldown periods and start auctions prematurely.
additionally the function lacks an important validation which should have prevented such from happening, for example in SpiceAuction::startAuction
implemented this check that stops such from happening in SpiceAuction if (config.duration == 0) revert CannotStartAuction();
, but in DaiGoldAuction no similar validation was implemented allowing anyone to call the startAuction right after contract deployment.
The startAuction() function does not adequately validate the initial state right after contract deployment, leading to the possibility of starting multiple auctions in quick succession. The function checks if the previous auction has ended , However, these checks can be bypassed right after deployment because the initial state does not have a previous auction, allowing anyone to call startAuction right after contract deployment
Allowing repeated calls to startAuction() immediately after deployment can have severe consequences:
Token Lock-up: Tokens intended for distribution in auctions can become permanently stuck, as multiple auctions start without completing properly.
Contract Usability: The contract's functionality can be compromised, making it unreliable and potentially unusable for its intended purpose.
total disruption of contract functionality
The lack of validation for the initial state allows repeated calls to startAuction() as demonstrated in the following scenario:
Deploy the DaiGoldAuction contract.
Call startAuction() repeatedly without waiting for the cooldown periods.
To prevent repeated calls to startAuction() right after deployment, it is recommended to implement additional validation checks to handle the initial state appropriately. This can include setting up similar validation such as the one in SpiceAuction::startAuction
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.