Core Contracts

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

in `veRAACToken::lock` MAX_LOCK_AMOUNT can be exceeded

Summary

The veRAACToken::lock checks that amount isnt greater than the cap. The issue here is the amount being checked is the new amount, the funtion doesnt check the total amount the user has with the new amount, this means that the cap can be passed.
A malicious user can simply break their deposit into smaller parts to passs the cap because the check is only against the new amount, and not the cumulative state.

Vulnerability Details

path

function lock(
uint256 amount,
uint256 duration
) external nonReentrant whenNotPaused {
if (amount == 0) revert InvalidAmount();
==> if (amount > MAX_LOCK_AMOUNT) revert AmountExceedsLimit();
if (totalSupply() + amount > MAX_TOTAL_SUPPLY)
revert TotalSupplyLimitExceeded();

only checks the new amount not the cumulative one.

Impact

the attacker can accumulate an outsized amount of votes, allowing them to:

Manipulate Governance Decisions – The attacker could pass or reject proposals unfairly.

Tools Used

manual review

Recommendations

check user cumulative amount + new amount against the cap

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Validated
Assigned finding tags:

`veRAACToken::lock` function doesn't check MAX_TOTAL_LOCKED_AMOUNT

Support

FAQs

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