Core Contracts

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

Unused _updateLastClaimTime Function and lastClaimTime[] Mapping

Summary

During the review of the contract, I noticed that the _updateLastClaimTime function and the lastClaimTime[user] mapping are implemented but not used anywhere in the contract. This suggests that the last claim time for users is not being tracked, which could lead to incorrect reward calculations and potential issues with the reward mechanism.

Vulnerability Details

Impact

  • Users may receive incorrect rewards, leading to dissatisfaction and loss of trust.

  • The contract does not accurately track claim intervals, which is a critical part of the reward mechanism.

Tools Used

Recommendations

To address this issue, you have two options:

  1. Add _updateLastClaimTime to the claim Function:

    • Modify the claim function to call _updateLastClaimTime after calculating and transferring rewards. This will ensure that the last claim time for each user is updated correctly.

  2. Remove Unused Code:

    • If the functionality to track the last claim time is not needed, remove the _updateLastClaimTime function and the lastClaimTime mapping to avoid confusion and potential bugs.

Updates

Lead Judging Commences

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

_updateLastClaimTime not properly used to track rewards claim time

Support

FAQs

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

Give us feedback!