```\nFile: Tranche.sol\n    function issue(\n        address to,\n        uint256 underlyingAmount\n    ) external nonReentrant whenNotPaused notExpired returns (uint256 issued) {\n..SNIP..\n        lscales[to] = _maxscale;\n        delete unclaimedYields[to];\n\n        uint256 yBal = _yt.balanceOf(to);\n        // If recipient has unclaimed interest, claim it and then reinvest it to issue more PT and YT.\n        // Reminder: lscale is the last scale when the YT balance of the user was updated.\n        if (_lscale != 0) {\n            accruedInTarget += _computeAccruedInterestInTarget(_maxscale, _lscale, yBal);\n        }\n..SNIP..\n        uint256 sharesUsed = sharesMinted + accruedInTarget;\n        uint256 fee = sharesUsed.mulDivUp(issuanceFeeBps, MAX_BPS);\n        issued = (sharesUsed - fee).mulWadDown(_maxscale);\n\n        // Accumulate issueance fee in units of target token\n        issuanceFees += fee;\n        // Mint PT and YT to user\n        _mint(to, issued);\n        _yt.mint(to, issued);\n```\n