Core Contracts

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

Attacker can steal RAAC rewards using flashloan

Vulnerability Details

RAACMinter mints RAAC rewards for every block based on the emission rate, this is supposed to withdrawn by people who stake RToken amount through StabilityPool::deposit.

The problem is that we are accouting how much raac rewards each user should get based on the amount of RToken they have deposited and for how much time, when a user withdraws their deposited amount we are calculating the amount raac rewards a user is eligible for through calculateRaacRewards.

The problem lies in this function as attacker can inflate his deposit amount by using flashloan to get CrvUSD, convert those CrvUSD to RTokens though LendingPool and then deposit it in the StabilityPool for a single transaction and get almost all of the raacRewards.

Impact

Attacker can steal raacRewards from innocent users who deposited RTokens from the start of the interval

Tools Used

Manual Review

Recommendations

Users should get raacRewards based on the amount and duration of deposited RToken

Updates

Lead Judging Commences

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

StabilityPool::calculateRaacRewards is vulnerable to just in time deposits

Support

FAQs

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