This commit is contained in:
Hadrien Croubois
2023-03-15 23:28:50 +01:00
parent 7512b8e171
commit 06baea7fa8

View File

@ -143,8 +143,14 @@ rule onlyVoteCanChangeQuorumReached(uint256 pId, env e, method f, calldataarg ar
bool quorumReachedBefore = quorumReached(pId); bool quorumReachedBefore = quorumReached(pId);
uint256 snapshot = proposalSnapshot(pId);
uint256 totalSupply = token_getPastTotalSupply(snapshot);
f(e, args); f(e, args);
// Needed because the prover doesn't understand the checkpoint properties of the voting token.
require clock(e) > snapshot => token_getPastTotalSupply(snapshot) == cache;
assert quorumReached(pId) != quorumReachedBefore => ( assert quorumReached(pId) != quorumReachedBefore => (
!quorumReachedBefore && !quorumReachedBefore &&
votingAll(f) votingAll(f)