In governor protocol look at the proposal's votes and decide is it defeated or succeed after proposal.endBlock. If nonWhitelisted user's proposal's forVote>AgainstVote and forVotes>Quorum then proposal's state will be succeed. Protocol gives extra credit to whitelisters and just needed to againstVoteagainstVote>quorum happens, then Whitelisted' proposal will be defetad even though it shouldn't. (Because in forVote>againstVote>quorum situation nonwhitelister proposal will be succeed.
Proof of Concept
Tools Used
Manuel review
Recommended Mitigation Steps
Instead of this
(_whitelisted && _proposal.againstVotes > _proposal.quorumVotes) in line 470 @ GovernorCharlie.sol
add this:
(_whitelisted && _proposal.againstVotes > _proposal.quorumVotes &&_proposal.againstVotes>=_proposal.forVotes)
Lines of code
https://github.com/code-423n4/2023-07-amphora/blob/daae020331404647c661ab534d20093c875483e1/core/solidity/contracts/governance/GovernorCharlie.sol#L469-L473
Vulnerability details
Impact
In governor protocol look at the proposal's votes and decide is it defeated or succeed after proposal.endBlock. If nonWhitelisted user's proposal's forVote>AgainstVote and forVotes>Quorum then proposal's state will be succeed. Protocol gives extra credit to whitelisters and just needed to againstVoteagainstVote>quorum happens, then Whitelisted' proposal will be defetad even though it shouldn't. (Because in forVote>againstVote>quorum situation nonwhitelister proposal will be succeed.
Proof of Concept
Tools Used
Manuel review
Recommended Mitigation Steps
Instead of this (_whitelisted && _proposal.againstVotes > _proposal.quorumVotes) in line 470 @ GovernorCharlie.sol add this: (_whitelisted && _proposal.againstVotes > _proposal.quorumVotes &&_proposal.againstVotes>=_proposal.forVotes)
Assessed type
Invalid Validation