Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Valid

Double Emergency Delay in veRAACToken Emergency Withdrawal System

Description

The veRAACToken contract implements an emergency withdrawal system with a security delay. However, the EMERGENCY_DELAY (3 days) is applied twice: once in the veRAACToken::withEmergencyDelay modifier and once in the veRAACToken::enableEmergencyWithdraw function, resulting in a total delay of 6 days before users can withdraw their funds.

modifier withEmergencyDelay(bytes32 actionId) {
uint256 scheduleTime = _emergencyTimelock[actionId];
if (scheduleTime == 0) revert EmergencyActionNotScheduled();
// First 3-day delay
@> if (block.timestamp < scheduleTime + EMERGENCY_DELAY) revert EmergencyDelayNotMet();
_;
delete _emergencyTimelock[actionId];
}
function enableEmergencyWithdraw() external onlyOwner withEmergencyDelay(EMERGENCY_WITHDRAW_ACTION) {
// Second 3-day delay
@> emergencyWithdrawDelay = block.timestamp + EMERGENCY_DELAY;
emit EmergencyWithdrawEnabled(emergencyWithdrawDelay);
}

Risk

Likelihood: Low

  • Only occurs during emergency situations which are rare events

Impact: Medium

  • Users cannot withdraw funds for 6 days instead of 3 days during emergencies

Recommended Mitigation

Remove delay from modifier:

modifier withEmergencyDelay(bytes32 actionId) {
uint256 scheduleTime = _emergencyTimelock[actionId];
if (scheduleTime == 0) revert EmergencyActionNotScheduled();
- if (block.timestamp < scheduleTime + EMERGENCY_DELAY) revert EmergencyDelayNotMet();
+ if (block.timestamp < scheduleTime) revert EmergencyDelayNotMet();
_;
delete _emergencyTimelock[actionId];
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

veRAACToken implements two consecutive 3-day emergency delays (totaling 6 days), hindering timely emergency response when funds need to be withdrawn quickly

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.