```\nfunction _executeTrade(\n    address target,\n    uint256 msgValue,\n    bytes memory params,\n    address spender,\n    Trade memory trade\n) private {\n    uint256 preTradeBalance;\n\n    if (trade.sellToken == address(Deployments.WETH) && spender == Deployments.ETH_ADDRESS) {\n        preTradeBalance = address(this).balance;\n        // Curve doesn't support Deployments.WETH (spender == address(0))\n        uint256 withdrawAmount = _isExactIn(trade) ? trade.amount : trade.limit;\n        Deployments.WETH.withdraw(withdrawAmount);\n    } else if (trade.sellToken == Deployments.ETH_ADDRESS && spender != Deployments.ETH_ADDRESS) {\n        preTradeBalance = IERC20(address(Deployments.WETH)).balanceOf(address(this));\n        // UniswapV3 doesn't support ETH (spender != address(0))\n        uint256 depositAmount = _isExactIn(trade) ? trade.amount : trade.limit;\n        Deployments.WETH.deposit{value: depositAmount }();\n    }\n\n    (bool success, bytes memory returnData) = target.call{value: msgValue}(params);\n    if (!success) revert TradeExecution(returnData);\n\n    if (trade.buyToken == address(Deployments.WETH)) {\n        if (address(this).balance > preTradeBalance) {\n            // If the caller specifies that they want to receive Deployments.WETH but we have received ETH,\n            // wrap the ETH to Deployments.WETH.\n            uint256 depositAmount;\n            unchecked { depositAmount = address(this).balance - preTradeBalance; }\n            Deployments.WETH.deposit{value: depositAmount}();\n        }\n    } else if (trade.buyToken == Deployments.ETH_ADDRESS) {\n        uint256 postTradeBalance = IERC20(address(Deployments.WETH)).balanceOf(address(this));\n        if (postTradeBalance > preTradeBalance) {\n            // If the caller specifies that they want to receive ETH but we have received Deployments.WETH,\n            // unwrap the Deployments.WETH to ETH.\n            uint256 withdrawAmount;\n            unchecked { withdrawAmount = postTradeBalance - preTradeBalance; }\n            Deployments.WETH.withdraw(withdrawAmount);\n        }\n    }\n}\n```\n