Core Contracts

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

If the emergencyWithdraw from veRAACToken is enabled attacker can always still the rewards from the feeCollector with a flashloan

Summary

If the emergencyWithdraw function from veRAACToken is enabled, an attacker can always steal the rewards from the feeCollector using a flash loan. The malicious user would take a flash loan, lock all of his funds to gain voting power, obtain all the shares, then withdraw them and return the flash loan.

Vulnerability Details

When the emergency withdraw is enabled users can lock and unlocked their funds immediately. This is why an attacker can steal all of the rewards.

  1. Creates a flash loan

  2. Lock all of the funds

  3. Having an 99.99% of the voting power

  4. calling ClaimRewards in FeeCollector

  5. Withdrawing his locked funds from the veRAACToken

  6. returning the flash loan

Impact

Stealing all of the rewards

Tools Used

Recommendations

Even if the emergency withdraw is enabled, create at least 10 seconds delay between the lock function and withdraw.

Updates

Lead Judging Commences

inallhonesty Lead Judge 5 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 5 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.