{
    "Function": "withdraw",
    "File": "contracts/v3/strategies/BaseStrategy.sol",
    "Parent Contracts": [
        "contracts/v3/interfaces/IStrategy.sol"
    ],
    "High-Level Calls": [
        "SafeMath",
        "SafeMath",
        "SafeERC20"
    ],
    "Internal Calls": [
        "onlyController",
        "_withdrawSome",
        "balanceOfWant"
    ],
    "Library Calls": [
        "add",
        "safeTransfer",
        "sub"
    ],
    "Low-Level Calls": [],
    "Code": "function withdraw(\n        uint256 _amount\n    )\n        external\n        override\n        onlyController\n    {\n        uint256 _balance = balanceOfWant();\n        if (_balance < _amount) {\n            _amount = _withdrawSome(_amount.sub(_balance));\n            _amount = _amount.add(_balance);\n        }\n\n        IERC20(want).safeTransfer(controller, _amount);\n    }"
}