```\nFile: wfCashLogic.sol\n    function _lendLegacy(\nFile: wfCashLogic.sol\n        // If deposit amount external is in excess of the cost to purchase fCash amount (often the case),\n        // then we need to return the difference between postTradeCash - preTradeCash. This is done because\n        // the encoded trade does not automatically withdraw the entire cash balance in case the wrapper\n        // is holding a cash balance.\n        uint256 preTradeCash = getCashBalance();\n\n        BalanceActionWithTrades[] memory action = EncodeDecode.encodeLegacyLendTrade(\n            currencyId,\n            getMarketIndex(),\n            depositAmountExternal,\n            fCashAmount,\n            minImpliedRate\n        );\n        // Notional will return any residual ETH as the native token. When we _sendTokensToReceiver those\n        // native ETH tokens will be wrapped back to WETH.\n        NotionalV2.batchBalanceAndTradeAction{value: msgValue}(address(this), action); \n\n        uint256 postTradeCash = getCashBalance(); \n\n        if (preTradeCash != postTradeCash) { \n            // If ETH, then redeem to WETH (redeemToUnderlying == false)\n            NotionalV2.withdraw(currencyId, _safeUint88(postTradeCash - preTradeCash), !isETH);\n        }\n    }\n```\n