Core Contracts

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

unused _updateLastClaimTime in FeeCollector.sol

Contract: FeeCollector

Function: _updateLastClaimTime

Severity: Informational / low

Description:

The _updateLastClaimTime function, which is intended to record the timestamp of a user's last reward claim, is currently not used anywhere within the FeeCollector contract. This means that the intended functionality of tracking the last claim time is not being implemented.

Code:

function _updateLastClaimTime(address user) internal {
lastClaimTime[user] = block.timestamp;
}

Impact:

  • The lack of utilization of the _updateLastClaimTime function does not directly cause any immediate security vulnerabilities.

  • It represents a potential issue in the context of desired contract behavior.

Recommendation:

  • Option 1 (If Tracking Is Necessary): If tracking the last claim time is a required functionality, implement the _updateLastClaimTime function in the claimRewards function so the last time the user claim reward tracked.

  • Option 2 (If Tracking Is Unnecessary): If tracking the last claim time is no longer necessary, remove the unused _updateLastClaimTime function to keep the contract concise.

Updates

Lead Judging Commences

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