In the startAuction
function of the SpiceAuction
contract, the end time of the auction is set incorrectly. The current implementation sets the endTime
using block.timestamp
instead of the startTime
calculated earlier in the function.
This results in the auction end time being shorter than expected. Specifically, the end time is not appropriately extended by the startCooldown
period, which means the auction could close prematurely, leading to potential issues for participants who expect the auction to run for the full intended duration.
Manual, Foundry
To ensure the auction runs for the correct duration starting from the startTime
, the endTime
should be calculated using the startTime
plus the configured duration.
Corrected Code:
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.