Core Contracts

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

Uninitialized Proposal Snapshots Prevent Voting Power Retrieval in veRAACToken Contract

Description

The veRAACToken::getVotingPowerForProposal function relies on proposalPowerSnapshots mapping to get the snapshot block for a proposal, but this mapping is never initialized in the contract. This means the function will always revert with InvalidProposal as proposalPowerSnapshots[proposalId] will always return 0.

function getVotingPowerForProposal(address account, uint256 proposalId) external view returns (uint256) {
@> uint256 snapshotBlock = proposalPowerSnapshots[proposalId]; // Always returns 0
@> if (snapshotBlock == 0) revert InvalidProposal(); // Always reverts
return getPastVotes(account, snapshotBlock);
}

Risk

Likelihood: High

  • Will consistently fail for all calls

Impact: Low

  • Voting power cannot be retrieved for any proposal

Recommended Mitigation

Add function to set snapshot blocks for proposals

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
inallhonesty Lead Judge 10 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!