diff --git a/test/recon/CryticToFoundry.sol b/test/recon/CryticToFoundry.sol index 37e5946b..59a9ff0f 100644 --- a/test/recon/CryticToFoundry.sol +++ b/test/recon/CryticToFoundry.sol @@ -16,38 +16,46 @@ contract CryticToFoundry is Test, TargetFunctions, FoundryAsserts { } -// forge test --match-test test_property_sum_of_initatives_matches_total_votes_strict_0 -vv - function test_property_sum_of_initatives_matches_total_votes_strict_0() public { + // forge test --match-test test_optimize_max_claim_underpay_assertion_0 -vv + function test_optimize_max_claim_underpay_assertion_0() public { - vm.warp(block.timestamp + 162964); + helper_accrueBold(1001125329789697909641); - vm.roll(block.number + 1); + check_warmup_unregisterable_consistency(0); - governance_depositLQTY(2); + optimize_max_claim_underpay_assertion(); - vm.warp(block.timestamp + 471948); + } + +// forge test --match-test test_property_sum_of_initatives_matches_total_votes_insolvency_assertion_mid_0 -vv + function test_property_sum_of_initatives_matches_total_votes_insolvency_assertion_mid_0() public { - vm.roll(block.number + 1); + governance_depositLQTY_2(1439490298322854874); - governance_allocateLQTY_clamped_single_initiative(0,2,0); + vm.roll(block.number + 1); + vm.warp(block.timestamp + 313704); + governance_depositLQTY(1); - vm.warp(block.timestamp + 344203); + vm.warp(block.timestamp + 413441); vm.roll(block.number + 1); - governance_depositLQTY_2(2); + governance_allocateLQTY_clamped_single_initiative(0,1,0); + + vm.warp(block.timestamp + 173473); + + vm.roll(block.number + 1); helper_deployInitiative(); governance_registerInitiative(1); - vm.warp(block.timestamp + 232088); - vm.roll(block.number + 1); + vm.warp(block.timestamp + 315415); + governance_allocateLQTY_clamped_single_initiative_2nd_user(1,1293868687551209131,0); - governance_allocateLQTY_clamped_single_initiative_2nd_user(1,268004076687567,0); - - property_sum_of_initatives_matches_total_votes_strict(); + property_sum_of_initatives_matches_total_votes_insolvency_assertion_mid(); } + } diff --git a/test/recon/properties/OptimizationProperties.sol b/test/recon/properties/OptimizationProperties.sol index 8a571bae..75735180 100644 --- a/test/recon/properties/OptimizationProperties.sol +++ b/test/recon/properties/OptimizationProperties.sol @@ -8,6 +8,7 @@ import {MockStakingV1} from "test/mocks/MockStakingV1.sol"; import {vm} from "@chimera/Hevm.sol"; import {IUserProxy} from "src/interfaces/IUserProxy.sol"; import {GovernanceProperties} from "./GovernanceProperties.sol"; +import {console} from "forge-std/console.sol"; // NOTE: These run only if you use `optimization` mode and set the correct prefix // See echidna.yaml @@ -148,8 +149,15 @@ abstract contract OptimizationProperties is GovernanceProperties { if(votedPowerSum > govPower) { delta = votedPowerSum - govPower; + + console.log("votedPowerSum * 1e18 / govPower", votedPowerSum * 1e18 / govPower); } + console.log("votedPowerSum", votedPowerSum); + console.log("govPower", govPower); + console.log("delta", delta); + + t(delta < 1e18, "Delta is too big"); }