In the emergency withdrawal mechanism in the veRAACToken contract once the emergencyWithdrawDelay is set by the enableEmergencyWithdraw function, it remains active indefinitely. This means that users can continue to withdraw their locked tokens even after the emergency situation has been resolved, as there is no mechanism to reset or disable the emergencyWithdrawDelay. This could lead to unintended withdrawals and potential loss of protocol integrity.
The enableEmergencyWithdraw function sets the emergencyWithdrawDelay to block.timestamp + EMERGENCY_DELAY, allowing users to withdraw their locked tokens after the delay has passed. However, once this delay is set, it is never reset or disabled, meaning the emergency withdrawal functionality remains active forever. This is problematic because:
The contract does not provide a way to disable the emergency withdrawal mechanism once it is enabled.
Users can continue to withdraw their tokens even after the emergency situation has been resolved, potentially leading to a loss of locked tokens and protocol stability.
The protocol owner has no way to revoke the emergency withdrawal functionality, reducing their control over the contract.
The emergencyWithdrawDelay is set but never reset, allowing the emergencyWithdraw function to remain active indefinitely:
Enable Emergency Withdrawal: The owner calls enableEmergencyWithdraw, setting emergencyWithdrawDelay to block.timestamp + EMERGENCY_DELAY.
Wait for Delay: After the delay has passed, users can call emergencyWithdraw to withdraw their tokens.
Indefinite Access: Even after the emergency is resolved, users can continue to withdraw their tokens indefinitely because emergencyWithdrawDelay is never reset.
The protocol owner cannot disable the emergency withdrawal mechanism, reducing their ability to manage the contract effectively.
Manual Review
Introduce a function that allows the owner to reset or disable the emergencyWithdrawDelay, Ensure the emergency withdrawal mechanism is only active for a specific period and automatically disables itself after the emergency is resolved.
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.