File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -187,12 +187,16 @@ contract MultiBlockHarvester is BaseHarvester {
187
187
188
188
if (asset == USDC || asset == USDM || asset == EURC) {
189
189
// Assume 1:1 ratio between stablecoins
190
- uint256 slippage = ((amountIn - amountOut) * 1e9 ) / amountIn;
191
- if (slippage > maxSlippage) revert SlippageTooHigh ();
190
+ unchecked {
191
+ uint256 slippage = ((amountIn - amountOut) * 1e9 ) / amountIn;
192
+ if (slippage > maxSlippage) revert SlippageTooHigh ();
193
+ }
192
194
} else if (asset == XEVT) {
193
195
// Assume 1:1 ratio between the underlying asset of the vault
194
- uint256 slippage = ((IPool (depositAddress).convertToAssets (amountIn) - amountOut) * 1e9 ) / amountIn;
195
- if (slippage > maxSlippage) revert SlippageTooHigh ();
196
+ unchecked {
197
+ uint256 slippage = ((IPool (depositAddress).convertToAssets (amountIn) - amountOut) * 1e9 ) / amountIn;
198
+ if (slippage > maxSlippage) revert SlippageTooHigh ();
199
+ }
196
200
} else revert InvalidParam ();
197
201
}
198
202
}
You can’t perform that action at this time.
0 commit comments