Core Contracts

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

Inconsistent Lock Existence Validation in veRAACToken::getLockPosition Function

Description

The veRAACToken::getLockPosition function returns lock data without validating if the lock position exists.

// No existence check
function getLockPosition(address account) external view returns (LockPosition memory) {
@> LockManager.Lock memory userLock = _lockState.getLock(account); // Could be non-existent
return LockPosition({
amount: userLock.amount, // Returns 0 for non-existent lock
end: userLock.end, // Returns 0 for non-existent lock
power: balanceOf(account) // Returns 0 for non-existent lock
});
}

Risk

Likelihood: Low

  • Affects only view function

  • No direct state changes

Impact: Low

  • Could lead to UI confusion

  • External integrations might misinterpret data

  • No financial impact

Recommended Mitigation

+ error LockNotFound();
function getLockPosition(address account) external view returns (LockPosition memory) {
LockManager.Lock memory userLock = _lockState.getLock(account);
+ if (!userLock.exists) revert LockNotFound();
return LockPosition({
amount: userLock.amount,
end: userLock.end,
power: balanceOf(account)
});
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 2 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 2 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.