{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/v3/Manager.sol",
    "Parent Contracts": [
        "contracts/v3/interfaces/IManager.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract Manager is IManager {\n    using SafeMath for uint256;\n    using SafeERC20 for IERC20;\n\n    uint256 public constant PENDING_STRATEGIST_TIMELOCK = 7 days;\n    uint256 public constant MAX_TOKENS = 256;\n\n    address public immutable override yaxis;\n\n    bool public override halted;\n\n    address public override governance;\n    address public override harvester;\n    address public override insurancePool;\n    address public override stakingPool;\n    address public override strategist;\n    address public override pendingStrategist;\n    address public override treasury;\n\n    // The following fees are all mutable.\n    // They are updated by governance (community vote).\n    uint256 public override insuranceFee;\n    uint256 public override insurancePoolFee;\n    uint256 public override stakingPoolShareFee;\n    uint256 public override treasuryFee;\n    uint256 public override withdrawalProtectionFee;\n\n\n    uint256 private setPendingStrategistTime;\n\n    // Governance must first allow the following properties before\n    // the strategist can make use of them\n    mapping(address => bool) public override allowedControllers;\n    mapping(address => bool) public override allowedConverters;\n    mapping(address => bool) public override allowedStrategies;\n    mapping(address => bool) public override allowedVaults;\n\n    // vault => controller\n    mapping(address => address) public override controllers;\n    // vault => token\n    mapping(address => address) internal tokens;\n\n    event AllowedController(\n        address indexed _controller,\n        bool _allowed\n    );\n    event AllowedConverter(\n        address indexed _converter,\n        bool _allowed\n    );\n    event AllowedStrategy(\n        address indexed _strategy,\n        bool _allowed\n    );\n    event AllowedVault(\n        address indexed _vault,\n        bool _allowed\n    );\n    event Halted();\n    event SetController(\n        address indexed _vault,\n        address indexed _controller\n    );\n    event SetGovernance(\n        address indexed _governance\n    );\n    event SetPendingStrategist(\n        address indexed _strategist\n    );\n    event SetStrategist(\n        address indexed _strategist\n    );\n    event VaultAdded(\n        address indexed _vault,\n        address indexed _token\n    );\n    event VaultRemoved(\n        address indexed _vault\n    );\n\n    /**\n     * @param _yaxis The address of the YAX token\n     */\n    constructor(\n        address _yaxis\n    )\n        public\n    {\n        require(_yaxis != address(0), \"!_yaxis\");\n        yaxis = _yaxis;\n        governance = msg.sender;\n        strategist = msg.sender;\n        harvester = msg.sender;\n        treasury = msg.sender;\n        stakingPoolShareFee = 2000;\n        treasuryFee = 500;\n        withdrawalProtectionFee = 10;\n    }\n\n    /**\n     * GOVERNANCE-ONLY FUNCTIONS\n     */\n\n    /**\n     * @notice Sets the permission for the given controller\n     * @param _controller The address of the controller\n     * @param _allowed The status of if it is allowed\n     */\n    function setAllowedController(\n        address _controller,\n        bool _allowed\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(address(IController(_controller).manager()) == address(this), \"!manager\");\n        allowedControllers[_controller] = _allowed;\n        emit AllowedController(_controller, _allowed);\n    }\n\n    /**\n     * @notice Sets the permission for the given converter\n     * @param _converter The address of the converter\n     * @param _allowed The status of if it is allowed\n     */\n    function setAllowedConverter(\n        address _converter,\n        bool _allowed\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(address(IConverter(_converter).manager()) == address(this), \"!manager\");\n        allowedConverters[_converter] = _allowed;\n        emit AllowedConverter(_converter, _allowed);\n    }\n\n    /**\n     * @notice Sets the permission for the given strategy\n     * @param _strategy The address of the strategy\n     * @param _allowed The status of if it is allowed\n     */\n    function setAllowedStrategy(\n        address _strategy,\n        bool _allowed\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(address(IStrategy(_strategy).manager()) == address(this), \"!manager\");\n        allowedStrategies[_strategy] = _allowed;\n        emit AllowedStrategy(_strategy, _allowed);\n    }\n\n    /**\n     * @notice Sets the permission for the given vault\n     * @param _vault The address of the vault\n     * @param _allowed The status of if it is allowed\n     */\n    function setAllowedVault(\n        address _vault,\n        bool _allowed\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(address(IVault(_vault).manager()) == address(this), \"!manager\");\n        allowedVaults[_vault] = _allowed;\n        emit AllowedVault(_vault, _allowed);\n    }\n\n    /**\n     * @notice Sets the governance address\n     * @param _governance The address of the governance\n     */\n    function setGovernance(\n        address _governance\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        governance = _governance;\n        emit SetGovernance(_governance);\n    }\n\n    /**\n     * @notice Sets the harvester address\n     * @param _harvester The address of the harvester\n     */\n    function setHarvester(\n        address _harvester\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(address(IHarvester(_harvester).manager()) == address(this), \"!manager\");\n        harvester = _harvester;\n    }\n\n    /**\n     * @notice Sets the insurance fee\n     * @dev Throws if setting fee over 1%\n     * @param _insuranceFee The value for the insurance fee\n     */\n    function setInsuranceFee(\n        uint256 _insuranceFee\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(_insuranceFee <= 100, \"_insuranceFee over 1%\");\n        insuranceFee = _insuranceFee;\n    }\n\n    /**\n     * @notice Sets the insurance pool address\n     * @param _insurancePool The address of the insurance pool\n     */\n    function setInsurancePool(\n        address _insurancePool\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        insurancePool = _insurancePool;\n    }\n\n    /**\n     * @notice Sets the insurance pool fee\n     * @dev Throws if setting fee over 20%\n     * @param _insurancePoolFee The value for the insurance pool fee\n     */\n    function setInsurancePoolFee(\n        uint256 _insurancePoolFee\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(_insurancePoolFee <= 2000, \"_insurancePoolFee over 20%\");\n        insurancePoolFee = _insurancePoolFee;\n    }\n\n    /**\n     * @notice Sets the staking pool address\n     * @param _stakingPool The address of the staking pool\n     */\n    function setStakingPool(\n        address _stakingPool\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        stakingPool = _stakingPool;\n    }\n\n    /**\n     * @notice Sets the staking pool share fee\n     * @dev Throws if setting fee over 50%\n     * @param _stakingPoolShareFee The value for the staking pool fee\n     */\n    function setStakingPoolShareFee(\n        uint256 _stakingPoolShareFee\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(_stakingPoolShareFee <= 5000, \"_stakingPoolShareFee over 50%\");\n        stakingPoolShareFee = _stakingPoolShareFee;\n    }\n\n    /**\n     * @notice Sets the pending strategist and the timestamp\n     * @param _strategist The address of the strategist\n     */\n    function setStrategist(\n        address _strategist\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(_strategist != address(0), \"!_strategist\");\n        pendingStrategist = _strategist;\n        // solhint-disable-next-line not-rely-on-time\n        setPendingStrategistTime = block.timestamp;\n        emit SetPendingStrategist(_strategist);\n    }\n\n    /**\n     * @notice Sets the treasury address\n     * @param _treasury The address of the treasury\n     */\n    function setTreasury(\n        address _treasury\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(_treasury != address(0), \"!_treasury\");\n        treasury = _treasury;\n    }\n\n    /**\n     * @notice Sets the treasury fee\n     * @dev Throws if setting fee over 20%\n     * @param _treasuryFee The value for the treasury fee\n     */\n    function setTreasuryFee(\n        uint256 _treasuryFee\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(_treasuryFee <= 2000, \"_treasuryFee over 20%\");\n        treasuryFee = _treasuryFee;\n    }\n\n    /**\n     * @notice Sets the withdrawal protection fee\n     * @dev Throws if setting fee over 1%\n     * @param _withdrawalProtectionFee The value for the withdrawal protection fee\n     */\n    function setWithdrawalProtectionFee(\n        uint256 _withdrawalProtectionFee\n    )\n        external\n        notHalted\n        onlyGovernance\n    {\n        require(_withdrawalProtectionFee <= 100, \"_withdrawalProtectionFee over 1%\");\n        withdrawalProtectionFee = _withdrawalProtectionFee;\n    }\n\n    /**\n     * STRATEGIST-ONLY FUNCTIONS\n     */\n\n    /**\n     * @notice Updates the strategist to the pending strategist\n     * @dev This can only be called after the pending strategist timelock (7 days)\n     */\n    function acceptStrategist()\n        external\n        notHalted\n    {\n        require(msg.sender == pendingStrategist, \"!pendingStrategist\");\n        // solhint-disable-next-line not-rely-on-time\n        require(block.timestamp > setPendingStrategistTime.add(PENDING_STRATEGIST_TIMELOCK), \"PENDING_STRATEGIST_TIMELOCK\");\n        delete pendingStrategist;\n        delete setPendingStrategistTime;\n        strategist = msg.sender;\n        emit SetStrategist(msg.sender);\n    }\n\n    /**\n     * @notice Adds a token to be able to be deposited for a given vault\n     * @param _vault The address of the vault\n     */\n    function addVault(\n        address _vault\n    )\n        external\n        override\n        notHalted\n        onlyStrategist\n    {\n        require(allowedVaults[_vault], \"!allowedVaults\");\n        require(tokens[_vault] == address(0), \"!_vault\");\n        address _token = IVault(_vault).getToken();\n        tokens[_vault] = _token;\n        emit VaultAdded(_vault, _token);\n    }\n\n    /**\n     * @notice Allows the strategist to pull tokens out of this contract\n     * @dev This contract should never hold tokens\n     * @param _token The address of the token\n     * @param _amount The amount to withdraw\n     * @param _to The address to send to\n     */\n    function recoverToken(\n        IERC20 _token,\n        uint256 _amount,\n        address _to\n    )\n        external\n        notHalted\n        onlyStrategist\n    {\n        _token.safeTransfer(_to, _amount);\n    }\n\n    /**\n     * @notice Removes a token from being able to be deposited for a given vault\n     * @param _vault The address of the vault\n     */\n    function removeVault(\n        address _vault\n    )\n        external\n        override\n        notHalted\n        onlyStrategist\n    {\n        require(tokens[_vault] != address(0), \"!_vault\");\n        delete tokens[_vault];\n        delete allowedVaults[_vault];\n        emit VaultRemoved(_vault);\n    }\n\n    /**\n     * @notice Sets the vault address for a controller\n     * @param _vault The address of the vault\n     * @param _controller The address of the controller\n     */\n    function setController(\n        address _vault,\n        address _controller\n    )\n        external\n        notHalted\n        onlyStrategist\n    {\n        require(allowedVaults[_vault], \"!_vault\");\n        require(allowedControllers[_controller], \"!_controller\");\n        controllers[_vault] = _controller;\n        emit SetController(_vault, _controller);\n    }\n\n    /**\n     * @notice Sets the protocol as halted, disallowing all deposits forever\n     * @dev Withdraws will still work, allowing users to exit the protocol\n     */\n    function setHalted()\n        external\n        notHalted\n        onlyStrategist\n    {\n        halted = true;\n        emit Halted();\n    }\n\n    /**\n     * EXTERNAL VIEW FUNCTIONS\n     */\n\n    /**\n     * @notice Returns an array of token addresses for a given vault\n     * @param _vault The address of the vault\n     */\n    function getToken(\n        address _vault\n    )\n        external\n        view\n        override\n        returns (address)\n    {\n        return tokens[_vault];\n    }\n\n    /**\n     * @notice Returns a tuple of:\n     *     YAXIS token address,\n     *     Treasury address,\n     *     Treasury fee\n     */\n    function getHarvestFeeInfo()\n        external\n        view\n        override\n        returns (\n            address,\n            address,\n            uint256\n        )\n    {\n        return (\n            yaxis,\n            treasury,\n            treasuryFee\n        );\n    }\n\n    modifier notHalted() {\n        require(!halted, \"halted\");\n        _;\n    }\n\n    modifier onlyGovernance() {\n        require(msg.sender == governance, \"!governance\");\n        _;\n    }\n\n    modifier onlyStrategist() {\n        require(msg.sender == strategist, \"!strategist\");\n        _;\n    }\n}"
}