Core Contracts

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

[H-3] Incorrect Reward Calculation Causes Permanent Loss for Low Voting Power Users

Description:
The FeeCollector::claimRewards function incorrectly sets userRewards[user] to totalDistributed instead of pendingReward. Since totalDistributed is continuously incremented by shares[0], this results in an inflated value stored in userRewards[user].

Later, when _calculatePendingRewards is called, the function computes share as:

uint256 share = (totalDistributed * userVotingPower) / totalVotingPower;
return share > userRewards[user] ? share - userRewards[user] : 0;

If a user has low voting power compared to the total voting power, their share will always be lower than userRewards[user], causing the function to return zero. This means affected users can never claim rewards again.

Impact:

  • Users with low voting power will permanently lose the ability to claim rewards after their first claim.

  • The function behaves as if they have already received all their future rewards, even though they haven’t.

  • This introduces a severe fairness issue where smaller stakeholders are disproportionately affected.

Proof of Concept:

Scenario:

  1. Alice calls FeeCollector::claimRewards to claim her rewards.
    userRewards[Alice] = totalDistributed is set (incorrectly).

  2. Some time passes, and Alice calls _calculatePendingRewards again.

  3. As Alice has low voting power, her computed share is lower than userRewards[Alice].

  4. The function returns zero, permanently locking her out of future rewards.

Recommended Mitigation:

  • Set userRewards[user] to pendingRewardinstead oftotalDistributed`.

  • Ensure _calculatePendingRewards accounts for past claims properly, without penalizing users with low voting power.

  • Review other areas where totalDistributeds used to prevent similar logical errors.

Updates

Lead Judging Commences

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

FeeCollector::claimRewards sets `userRewards[user]` to `totalDistributed` seriously grieving users from rewards

Support

FAQs

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