Core Contracts

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

Increasing amount of a position with a remaining duration < MIN_LOCK_DURATION can break lock duration min limit.

Summary

A user can increase the amount of his position with a remaining duration < MIN_LOCK_DURATION. This will break the lock duration min limit.

Vulnerability Details

MIN_LOCK_DURATION is the criteria for lock duration.
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/tokens/veRAACToken.sol#L37-L39

* @notice Minimum lock duration (1 year)
*/
uint256 public constant MIN_LOCK_DURATION = 365 days;

However, there is no check for MIN_LOCK_DURATION in the increase() function for for the remaining duration. As a result, a user can increase the amount of his position with a remaining duration < MIN_LOCK_DURATION. This will break the lock duration min limit.

Consider the following scenario:

  1. Alice a locks minimum amount for MIN_LOCK_DURATION in advance.

  2. After some days(shorter than 1 year), Alice increases the amount of her position.
    As a result, Alice locks her funds with the actual duration(< MIN_LOCK_DURATION).

Impact

Min lock duration limit can be broken.

Recommendations

Increasing amount of a position with a remaining duration < MIN_LOCK_DURATION should not be allowed.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!