Core Contracts

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

Frontrunning Risk in Emergency Withdrawal and Reward Claiming

Summary

Users can frontrun an emergencyWithdraw call to claim their accumulated RAAC token rewards before their funds are forcefully withdrawn. This allows them to extract rewards that should not be accessible in an emergency state, leading to unfair token distribution.

Vulnerability Details

  • The emergencyWithdraw() function can only be called by an address with the EMERGENCY_ROLE.

  • However, since it does not immediately lock reward claims, a user can monitor for an incoming emergency withdrawal transaction and call claimRewards() before the contract state changes.

  • This results in them claiming rewards they otherwise would not be able to access post-withdrawal.

Impact

Malicious users can extract RAAC token rewards by frontrunning the emergency event.

Tools Used

Manual review

Recommendations

In emergencyWithdraw(), forcefully distribute pending rewards and reset balances before executing the withdrawal.

Updates

Lead Judging Commences

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

FeeCollector::emergencyWithdraw sends all tokens to treasury without resetting collectedFees, breaking rewards and future distributions

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

FeeCollector::emergencyWithdraw sends all tokens to treasury without resetting collectedFees, breaking rewards and future distributions

Support

FAQs

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