diff --git a/src/Governance.sol b/src/Governance.sol index c0534672..e0ef25a9 100644 --- a/src/Governance.sol +++ b/src/Governance.sol @@ -18,6 +18,7 @@ import {Multicall} from "./utils/Multicall.sol"; import {WAD, PermitParams} from "./utils/Types.sol"; import {safeCallWithMinGas} from "./utils/SafeCallMinGas.sol"; + /// @title Governance: Modular Initiative based Governance contract Governance is Multicall, UserProxyFactory, ReentrancyGuard, IGovernance { using SafeERC20 for IERC20; @@ -502,8 +503,8 @@ contract Governance is Multicall, UserProxyFactory, ReentrancyGuard, IGovernance // Must be below, else we cannot reset" // Makes cast safe /// @audit INVARIANT: property_ensure_user_alloc_cannot_dos - assert(alloc.voteLQTY < uint88(type(int88).max)); - assert(alloc.vetoLQTY < uint88(type(int88).max)); + assert(alloc.voteLQTY <= uint88(type(int88).max)); + assert(alloc.vetoLQTY <= uint88(type(int88).max)); // Cache, used to enforce limits later cachedData[i] = ResetInitiativeData({ diff --git a/test/recon/CryticToFoundry.sol b/test/recon/CryticToFoundry.sol index a21acc23..4f334913 100644 --- a/test/recon/CryticToFoundry.sol +++ b/test/recon/CryticToFoundry.sol @@ -71,12 +71,27 @@ contract CryticToFoundry is Test, TargetFunctions, FoundryAsserts { property_BI04(); } + +// forge test --match-test test_property_resetting_never_reverts_0 -vv + function test_property_resetting_never_reverts_0() public { + + vm.roll(block.number + 1); + vm.warp(block.timestamp + 193521); + governance_depositLQTY(155989603725201422915398867); + + vm.roll(block.number + 1); + vm.warp(block.timestamp + 411452); + governance_allocateLQTY_clamped_single_initiative(0,0,154742504910672534362390527); + + property_resetting_never_reverts(); + + } + // forge test --match-test test_property_BI11_3 -vv function test_property_BI11_3() public { vm.roll(block.number + 1); vm.warp(block.timestamp + 461046); - vm.prank(0x0000000000000000000000000000000000030000); governance_depositLQTY(2); vm.roll(block.number + 1);