{
    "Function": "handleExecutedDecreaseInvestOrder",
    "File": "src/InvestmentManager.sol",
    "Parent Contracts": [
        "src/util/Auth.sol"
    ],
    "High-Level Calls": [
        "LiquidityPoolLike",
        "PoolManagerLike",
        "SafeTransferLib",
        "PoolManagerLike"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)",
        "onlyGateway"
    ],
    "Library Calls": [
        "safeTransferFrom"
    ],
    "Low-Level Calls": [],
    "Code": "function handleExecutedDecreaseInvestOrder(\n        uint64 poolId,\n        bytes16 trancheId,\n        address user,\n        uint128 currency,\n        uint128 currencyPayout\n    ) public onlyGateway {\n        require(currencyPayout != 0, \"InvestmentManager/zero-payout\");\n\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        require(_currency == LiquidityPoolLike(liquidityPool).asset(), \"InvestmentManager/not-tranche-currency\");\n\n        SafeTransferLib.safeTransferFrom(_currency, address(escrow), user, currencyPayout);\n    }"
}