The recordVote function in the veRAACToken contract does not check the msg.sender, allowing anyone to call this function with any voter address. This can lead to unauthorized recording of votes.
The current recordVote function in the veRAACToken contract is:
The function does not check the msg.sender, allowing anyone to call this function with any voter address.
Links:
This bug can lead to unauthorized recording of votes, potentially compromising the integrity of the voting process within the protocol.
Manual code review.
Add an authorization check to ensure that only authorized addresses can call the recordVote function. The corrected function should be:
Additionally, define the onlyAuthorized modifier to restrict access to the function:
This ensures that only authorized addresses can call the recordVote function, maintaining the integrity of the voting process.
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.