Core Contracts

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

Reward Manipulation Through Vote-Lock Timing in FeeCollector

Summary:

The FeeCollector contract's reward calculation mechanism is vulnerable to manipulation because it calculates rewards based on current voting power without considering the duration of token lock-up. This allows users to maximize rewards by briefly locking tokens, claiming rewards, and immediately unlocking, effectively stealing rewards from long-term token lockers.

Vulnerability Details:

In the _calculatePendingRewards function:

function _calculatePendingRewards(address user) internal view returns (uint256) {
uint256 userVotingPower = veRAACToken.getVotingPower(user);
if (userVotingPower == 0) return 0;
uint256 totalVotingPower = veRAACToken.getTotalVotingPower();
if (totalVotingPower == 0) return 0;
uint256 share = (totalDistributed * userVotingPower) / totalVotingPower; //does not account for the time the user has had the veRAAC token
return share > userRewards[user] ? share - userRewards[user] : 0;
}

The vulnerability exists because:

  1. Rewards are calculated using current voting power snapshot

  2. No consideration of when the voting power was acquired

  3. No minimum lock period requirement

  4. No reward vesting or distribution over time

Attack Path:

  1. Wait for significant rewards to accumulate in the contract

  2. Lock tokens for maximum voting power

  3. Claim rewards immediately

  4. Unlock tokens

  5. Repeat with next reward cycle

Impact:

  • Unfair reward distribution favoring tactical short-term lockers

  • Diminished rewards for legitimate long-term stakers

  • Undermines the incentive mechanism for long-term protocol alignment

  • Potential drain of protocol rewards through repeated exploitation

Tools Used:

Manual code review.

Recommendations:

  1. Implement reward tracking per epoch.

  2. Add minimum lock time requirement.

  3. Implement reward vesting.

  4. Use time-weighted voting power.

Updates

Lead Judging Commences

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

Time-Weighted Average Logic is Not Applied to Reward Distribution in `FeeCollector`

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

Time-Weighted Average Logic is Not Applied to Reward Distribution in `FeeCollector`

Support

FAQs

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

Give us feedback!