Skip to content

Commit

Permalink
Audit H6: Unconsumed allowance will break fee updates
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnavigator committed May 3, 2023
1 parent 4a3d2c9 commit e41100b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Swapper.sol
Expand Up @@ -39,7 +39,7 @@ contract Swapper {
);

ERC20(params.tokenIn).safeTransferFrom(msg.sender, address(this), params.amountIn);
ERC20(params.tokenIn).safeApprove(UNISWAP_V3_ROUTER, params.amountIn);
ERC20(params.tokenIn).safeIncreaseAllowance(UNISWAP_V3_ROUTER, params.amountIn);

uint160 sqrtPriceX96 = (params.oracleSeconds == 0)
? Helper.sqrtPriceX96(swapPool)
Expand Down

0 comments on commit e41100b

Please sign in to comment.