```\nfunction \_deposit(uint256 \_amount, address \_tranche) internal returns (uint256 \_minted) {\n  // check that we are not depositing more than the contract available limit\n  \_guarded(\_amount);\n  // set \_lastCallerBlock hash\n  \_updateCallerBlock();\n  // check if strategyPrice decreased\n  \_checkDefault();\n  // interest accrued since last depositXX/withdrawXX/harvest is splitted between AA and BB\n  // according to trancheAPRSplitRatio. NAVs of AA and BB are updated and tranche\n  // prices adjusted accordingly\n  \_updateAccounting();\n  // mint tranche tokens according to the current tranche price\n  \_minted = \_mintShares(\_amount, msg.sender, \_tranche);\n  // get underlyings from sender\n  IERC20Detailed(token).safeTransferFrom(msg.sender, address(this), \_amount);\n}\n```\n