{
    "Function": "expected",
    "File": "contracts/v3/converters/StablesConverter.sol",
    "Parent Contracts": [
        "contracts/v3/interfaces/IConverter.sol"
    ],
    "High-Level Calls": [
        "ICurve3Pool",
        "ICurve3Pool",
        "ICurve3Pool"
    ],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function expected(\n        address _input,\n        address _output,\n        uint256 _inputAmount\n    )\n        external\n        override\n        view\n        returns (uint256)\n    {\n        if (_output == address(token3CRV)) { // convert to 3CRV\n            uint256[3] memory amounts;\n            for (uint8 i = 0; i < 3; i++) {\n                if (_input == address(tokens[i])) {\n                    amounts[i] = _inputAmount;\n                    return stableSwap3Pool.calc_token_amount(amounts, true);\n                }\n            }\n        } else if (_input == address(token3CRV)) { // convert from 3CRV\n            for (uint8 i = 0; i < 3; i++) {\n                if (_output == address(tokens[i])) {\n                    // @dev this is for UI reference only, the actual share price\n                    // (stable/CRV) will be re-calculated on-chain when we do convert()\n                    return stableSwap3Pool.calc_withdraw_one_coin(_inputAmount, i);\n                }\n            }\n        } else {\n            return stableSwap3Pool.get_dy(indices[_input], indices[_output], _inputAmount);\n        }\n        return 0;\n    }"
}