setDeadline FunctionSeverity: High
Description:
The setDeadline function is currently callable by any user, allowing them to arbitrarily reset the deadline for deposits and refunds. This opens the door for malicious actors to disrupt the intended flow of the contract by extending or reducing the deadline to suit their personal interests.
Impact:
Malicious users could potentially block participants from claiming refunds or making deposits, resulting in financial losses and undermining trust in the system.
Proof of Concept:
The following test demonstrates that a non-owner can change the deadline:
Recommended Mitigation:
Restrict access to the setDeadline function by using the onlyHost modifier already defined in the contract. This ensures that only the designated host can modify the deadline:
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.