Core Contracts

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

RAAC Token Rewards Exploitation

Summary

The RaccToken Reward mechanism in StabilityPool.sol could be exploited.

Vulnerability Details

A vulnerability has been identified in https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/StabilityPool/StabilityPool.sol smart contract that allows malicious users to exploit the RAAC rewards distribution mechanism. The vulnerability enables attackers to perform quick deposit-withdraw cycles to unfairly claim RAAC rewards without maintaining a meaningful stake in the pool.

Affected Function

function calculateRaacRewards(address user) public view returns (uint256) {
uint256 userDeposit = userDeposits\[user];
uint256 totalDeposits = deToken.totalSupply();
uint256 totalRewards = raacToken.balanceOf(address(this));
if (totalDeposits < 1e6) return 0;
return (totalRewards * userDeposit) / totalDeposits;

}

Impact

  • Diminished rewards for legitimate long-term stakers

  • Potential economic damage to the protocol

  • Undermining of the intended staking incentive mechanism

Tools Used

manual review

Recommendations

  1. You can Implement minimum staking duration.

  2. Implement time-weighted reward distribution

  3. Implement withdrawal TimeLock

Updates

Lead Judging Commences

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