Core Contracts

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

veRAACToken::increase() will never work as `maxLockAmount` will be 0 in LockManager

Summary

The increase() function in veRAACToken will always revert. A check on maxLockAmount in LockManager will always fail as maxLockAmount is never set, so equal to 0.

Vulnerability Details

LockManager::LockState.maxLockAmount = 0 as it's never set during initialization.

increase() calls increaseLock that will revert all the time as if (lock.amount + additionalAmount > state.maxLockAmount) revert AmountExceedsLimit(); will always be true.

Impact

Dos of veRAACToken::increase() functions.

Tools Used

Manual

Recommendations

Initialize maxLockAmount value in LockManager

A good practice is to check either maxAmount in veRAACToken or LockManager, but not in both to avoid any inconsistencies between maxAmount in both contracts.

Updates

Lead Judging Commences

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

Support

FAQs

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