diff --git a/evm/src/CatalystVaultVolatile.sol b/evm/src/CatalystVaultVolatile.sol index 86d9cf2b..ec353b04 100644 --- a/evm/src/CatalystVaultVolatile.sol +++ b/evm/src/CatalystVaultVolatile.sol @@ -232,6 +232,9 @@ contract CatalystVaultVolatile is CatalystVaultCommon, IntegralsVolatile { // If the weight has already been reached, skip the mathematics. if (currentWeight == targetWeight) { wsum += targetWeight; + unchecked { + ++it; + } continue; } diff --git a/evm/test/CatalystVault/1Volatile/VolatileOneVault.t.sol b/evm/test/CatalystVault/1Volatile/VolatileOneVault.t.sol index 569bce1b..8fd688ff 100644 --- a/evm/test/CatalystVault/1Volatile/VolatileOneVault.t.sol +++ b/evm/test/CatalystVault/1Volatile/VolatileOneVault.t.sol @@ -30,7 +30,7 @@ import { TestSecurityLimitLiquiditySwap } from "../SecurityLimit.ReceiveLiquidit import { TestWithdrawEverything } from "../Withdraw/WithdrawEverything.t.sol"; import {Token} from "../../mocks/token.sol"; -contract TestVolatileInvariant is TestInvariant, TestLocalswap, TestCrossChainInterfaceOnly, TestLocalswapMinout, TestPoolTokenInterface, TestSetup, TestSetupFinish, TestSetVaultFee, TestSetGovernanceFee, TestSetWeights, TestLocalswapFees, TestSwapWorthlessTokenLocal, TestEscrow, TestWithdrawInvariant, TestWithdrawComparison, TestCompareDepositWithWithdraw, TestWithdrawNothing, TestWithdrawUnbalanced, TestSelfSwap, TestVaultConnections, TestSecurityLimitAssetSwap, TestSecurityLimitLiquiditySwap, TestWithdrawEverything { //,TestEvilRouterExploitVolatile { +contract TestVolatileInvariant is TestInvariant, TestLocalswap, TestCrossChainInterfaceOnly, TestLocalswapMinout, TestPoolTokenInterface, TestSetup, TestSetupFinish, TestSetVaultFee, TestSetGovernanceFee, TestLocalswapFees, TestSwapWorthlessTokenLocal, TestEscrow, TestWithdrawInvariant, TestWithdrawComparison, TestCompareDepositWithWithdraw, TestWithdrawNothing, TestWithdrawUnbalanced, TestSelfSwap, TestVaultConnections, TestSecurityLimitAssetSwap, TestSecurityLimitLiquiditySwap, TestWithdrawEverything, TestSetWeights { // TestEvilRouterExploitVolatile { address[] _vaults;