The veRAACToken::recordVote
has no restrictions on which proposal is being passed, which will emit an incorrect event in case of a non-exsistent proposal. Even if we consider this as dead code, the incorrect event spam is inevitable.
The veRAACToken::recordVote
function is primarily used for recording vote using the voting power of the users, the event is emitted showcasing the weightage of the vote.
However, the issue lies in lack of restrictions provided here as any non-exsistent proposal can be passed an voted onto, emitting an incorrect event.
Emits an event which is incorrect as the proposalId
which is being voted here does not even exists.
Even if this code is considered to be dead code, malicious actor can still spam incorrect event multiple times.
Add the following test case inside the veRAACToken.test.js
file:
Manual Review
/
Hardhat
Either restrict proposal votes to only proposals which have been proposed (the whole code has to be re-worked / finished) or if this is dead code, kindly remove to avoid event spams.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.