In the governance system, veToken holders can vote on active proposals via Governance.sol::castVote(). However, the contract does not properly check if a proposal has already been canceled before allowing users to cast their vote.
As a result, users can still submit votes on proposals that are no longer valid, leading to unnecessary and ineffective voting.
Users can vote on proposals that have already been canceled, resulting in useless voting and unnecessary gas costs.
A governance proposal is created and open for voting.
Some users start voting.
The proposal is later canceled
Despite being canceled, users can still cast votes using castVote().
Manual review
Add check in castVote that ensures the proposal is not canceled.
For example add this code:
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.