Core Contracts

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

Incorrect MAX_LOCK_DURATION constant leads to early lock expiration

Summary

The MAX_LOCK_DURATION constant is set to 1460 days instead of 1461 days for a 4-year period, allowing users to withdraw tokens one day earlier than intended.

Vulnerability Details

In veRAACToken.sol, the MAX_LOCK_DURATION constant is defined as:

uint256 public constant MAX_LOCK_DURATION = 1460 days;

This value is incorrect as it doesn't account for leap years. A 4-year period contains:

  • 3 years × 365 days = 1095 days

  • 1 leap year = 366 days
    Total = 1461 days

The current implementation is off by 1 day, which means locks set for the maximum duration will expire one day earlier than intended.

Impact

  • Users can withdraw their tokens one day earlier than the intended 4-year maximum lock period

  • This slightly reduces the maximum voting power duration

  • Creates inconsistency between documented and actual maximum lock duration

Recommendations

Update constant to correct value

- uint256 public constant MAX_LOCK_DURATION = 1460 days;
+ uint256 public constant MAX_LOCK_DURATION = 1461 days;
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!