The veRAACToken::enableEmergencyWithdraw function adds an unnecessary second delay period of EMERGENCY_DELAY (3 days) after the initial delay enforced by the veRAACToken::withEmergencyDelay modifier. This results in a total delay of 6 days instead of the intended 3 days, violating the protocol’s emergency response design and causing user funds to remain locked longer than expected during emergencies.
Code Context:
Explanation:
The withEmergencyDelay modifier ensures that enableEmergencyWithdraw can only execute after a 3-day delay from the time the emergency action was scheduled (scheduleTime + EMERGENCY_DELAY).
However, the function itself sets emergencyWithdrawDelay = block.timestamp + EMERGENCY_DELAY, adding another 3-day delay before users can call emergencyWithdraw().
This results in a total delay of 6 days (3 days from the modifier + 3 days from the function).
Severity: High
Critical Functionality Failure:
The emergency withdrawal mechanism is a core safety feature of the protocol. Misalignment between documented and actual behavior constitutes a critical failure in protocol logic, regardless of who triggers it.
Example: If the protocol markets "3-day emergency withdrawals" to users, the double delay breaches trust and contractual expectations.
Indirect Financial Impact:
Users may incur losses due to market conditions during the extra 3-day delay (e.g., token price collapse, missed opportunities).
Example: A user expects to withdraw during a market crash at day 3 but is forced to wait until day 6, resulting in deeper losses.
Reputational and Legal Risks:
Misleading functionality could lead to regulatory scrutiny (e.g., false advertising claims) or mass user exits due to distrust.
Manual code review.
Fix: Remove the redundant delay in enableEmergencyWithdraw:
Verification:
Ensure the total delay for emergency withdrawals is exactly EMERGENCY_DELAY (3 days) from the time the action is scheduled, not doubled.
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.