```\nFile: wfCashLogic.sol\n    /// @dev Sells an fCash share back on the Notional AMM\n    function _sellfCash(\n        address receiver,\n        uint256 fCashToSell,\n        uint32 maxImpliedRate\n    ) private returns (uint256 tokensTransferred) {\n        (IERC20 token, bool isETH) = getToken(true); \n        uint256 balanceBefore = isETH ? WETH.balanceOf(address(this)) : token.balanceOf(address(this)); \n        uint16 currencyId = getCurrencyId(); \n\n        (uint256 initialCashBalance, uint256 fCashBalance) = getBalances(); \n        bool hasInsufficientfCash = fCashBalance < fCashToSell; \n\n        uint256 primeCashToWithdraw; \n        if (hasInsufficientfCash) {\n            // If there is insufficient fCash, calculate how much prime cash would be purchased if the\n            // given fCash amount would be sold and that will be how much the wrapper will withdraw and\n            // send to the receiver. Since fCash always sells at a discount to underlying prior to maturity,\n            // the wrapper is guaranteed to have sufficient cash to send to the account.\n            (/* */, primeCashToWithdraw, /* */, /* */) = NotionalV2.getPrincipalFromfCashBorrow( \n                currencyId,\n                fCashToSell, \n                getMaturity(),\n                0, \n                block.timestamp\n            ); \n            // If this is zero then it signifies that the trade will fail.\n            require(primeCashToWithdraw > 0, "Redeem Failed"); \n\n            // Re-write the fCash to sell to the entire fCash balance.\n            fCashToSell = fCashBalance;\n        }\n```\n