Submitted by __141345__, also found by 0x1f8b, Trust, V_B, and zzzitron
https://github.com/code-423n4/2022-08-olympus/blob/b5e139d732eb4c07102f149fb9426d356af617aa/src/policies/Governance.sol#L205-L262
There is no time lock or delay when activating a proposal, the previous one could be replaced immediately. In vote() call, a user might want to vote for the previous proposal, but if the vote() call and the activateProposal() is very close or even in the same block, it is quite possible that the user actually voted for another proposal without much knowledge of. A worse case is some malicious user watching the mempool, and front run a big vote favor/against the activeProposal, effectively influence the voting result.
These situations are not what the governance intends to deliver, and might also affect the results of 2 proposals.
activateProposal() can take effect right away, replacing the activeProposal. And vote() does not specify which proposalId to vote for, but the activeProposal could be different from last second.
src/policies/Governance.sol
Add time delay when activating a proposal, so that users can be aware of that and vote for the current one within the time window.
fullyallocated (Olympus) disputed and commented:
0xean (judge) commented:
