The cast function in the Governance
contract currently permits users to vote on proposals that have been either cancelled or executed. This oversight can lead to governance manipulation and inconsistencies within the contract's state.
Issue: The function lacks checks to determine whether a proposal has been cancelled or executed before allowing a vote.
Missing Validations:
Cancelled Proposals: There is no condition to prevent voting on proposals that have been cancelled.
Executed Proposals: Similarly, the function does not check if a proposal has already been executed.
Governance Manipulation: Allowing votes on cancelled or executed proposals can lead to unauthorized influence over governance decisions.
State Inconsistency: Voting on such proposals may result in discrepancies within the contract's state, affecting its integrity.
Manual Review
Implement additional checks within the castVote
function to ensure that only active proposals can be voted upon.
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.