Hadrien Croubois 2 years ago
parent
commit
06baea7fa8
1 changed files with 6 additions and 0 deletions
  1. 6 0
      certora/specs/GovernorStates.spec

+ 6 - 0
certora/specs/GovernorStates.spec

@@ -143,8 +143,14 @@ rule onlyVoteCanChangeQuorumReached(uint256 pId, env e, method f, calldataarg ar
 
     bool quorumReachedBefore = quorumReached(pId);
 
+    uint256 snapshot    = proposalSnapshot(pId);
+    uint256 totalSupply = token_getPastTotalSupply(snapshot);
+
     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 => (
         !quorumReachedBefore &&
         votingAll(f)