{
    "Function": "handleExecutedCollectRedeem",
    "File": "src/InvestmentManager.sol",
    "Parent Contracts": [
        "src/util/Auth.sol"
    ],
    "High-Level Calls": [
        "PoolManagerLike",
        "PoolManagerLike",
        "LiquidityPoolLike",
        "UserEscrowLike"
    ],
    "Internal Calls": [
        "_updateLiquidityPoolPrice",
        "onlyGateway",
        "require(bool,string)",
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function handleExecutedCollectRedeem(\n        uint64 poolId,\n        bytes16 trancheId,\n        address recipient,\n        uint128 currency,\n        uint128 currencyPayout,\n        uint128 trancheTokensPayout\n    ) public onlyGateway {\n        require(trancheTokensPayout != 0, \"InvestmentManager/zero-redeem\");\n        address _currency = poolManager.currencyIdToAddress(currency);\n        address liquidityPool = poolManager.getLiquidityPool(poolId, trancheId, _currency);\n        require(liquidityPool != address(0), \"InvestmentManager/tranche-does-not-exist\");\n\n        LPValues storage lpValues = orderbook[recipient][liquidityPool];\n        lpValues.maxWithdraw = lpValues.maxWithdraw + currencyPayout;\n        lpValues.maxRedeem = lpValues.maxRedeem + trancheTokensPayout;\n\n        userEscrow.transferIn(_currency, address(escrow), recipient, currencyPayout);\n        LiquidityPoolLike(liquidityPool).burn(address(escrow), trancheTokensPayout); // burned redeemed tokens from escrow\n        _updateLiquidityPoolPrice(liquidityPool, currencyPayout, trancheTokensPayout);\n    }"
}