{
    "Function": "withdraw",
    "File": "contracts/managers/AaveV2Strategy.sol",
    "Parent Contracts": [
        "contracts/managers/Manager.sol",
        "node_modules/@openzeppelin/contracts/security/Pausable.sol",
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/interfaces/managers/IStrategyManager.sol",
        "contracts/interfaces/managers/IManager.sol"
    ],
    "High-Level Calls": [
        "ILendingPool"
    ],
    "Internal Calls": [
        "getLp",
        "revert InvalidArgument()",
        "revert InvalidConditions()",
        "onlySherlockCore"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function withdraw(uint256 _amount) external override onlySherlockCore {\n    // Why do we only check if _amount is equal to the max value?\n    if (_amount == type(uint256).max) revert InvalidArgument();\n\n    ILendingPool lp = getLp();\n    // Withdraws _amount of USDC and sends it to the Sherlock core contract\n    // If the amount withdrawn is not equal to _amount, it reverts\n    if (lp.withdraw(address(want), _amount, msg.sender) != _amount) revert InvalidConditions();\n  }"
}