Skip to content

Commit ae43179

Browse files
committed
Remove redundant minAmountIn check
1 parent 24146b7 commit ae43179

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/libraries/UniswapV3Lib.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ library UniswapV3Lib {
9696
uint256 startingBalance = IERC20(params.tokenIn).balanceOf(address(context.proxy));
9797
amountOut = _callSwap(context, params, cache);
9898
uint256 endingBalance = IERC20(params.tokenIn).balanceOf(address(context.proxy));
99-
require(params.minAmountOut >= amountOut * params.maxSlippage / 1e18 , "UniswapV3Lib/min-amount-not-met");
10099

101100
// Clear approvals of dust
102101
ERC20Lib.approve(context.proxy, params.tokenIn, address(params.router), 0);

test/grove-mainnet-fork/UniswapV3.t.sol

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -338,22 +338,6 @@ contract MainnetControllerSwapUniswapV3FailureTests is UniswapV3TestBase {
338338
vm.stopPrank();
339339
}
340340

341-
function test_swapUniswapV3_minAmountNotMet() public {
342-
uint256 amountIn = 100_000e6;
343-
_fundProxy(amountIn, 0);
344-
345-
vm.startPrank(relayer);
346-
vm.expectRevert("UniswapV3Lib/min-amount-not-met");
347-
mainnetController.swapUniswapV3(
348-
_getPool(),
349-
address(token0),
350-
amountIn,
351-
0,
352-
200
353-
);
354-
vm.stopPrank();
355-
}
356-
357341
function test_swapUniswapV3_zeroTwapSeconds() public {
358342
uint256 amountIn = 100_000e6;
359343
_fundProxy(amountIn, 0);

0 commit comments

Comments
 (0)