{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/AuraStakingProxy.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract AuraStakingProxy {\n    using SafeERC20 for IERC20;\n    using Address for address;\n    using SafeMath for uint256;\n\n    //tokens\n    address public immutable crv;\n    address public immutable cvx;\n    address public immutable cvxCrv;\n\n    address public keeper;\n    address public crvDepositorWrapper;\n    uint256 public outputBps;\n    uint256 public constant denominator = 10000;\n\n    address public rewards;\n\n    address public owner;\n    address public pendingOwner;\n    uint256 public callIncentive = 25;\n\n    event RewardsDistributed(address indexed token, uint256 amount);\n    event CallIncentiveChanged(uint256 incentive);\n\n    /* ========== CONSTRUCTOR ========== */\n\n    /**\n     * @param _rewards       vlCVX\n     * @param _crv           CRV token\n     * @param _cvx           CVX token\n     * @param _cvxCrv        cvxCRV token\n     * @param _crvDepositorWrapper    Wrapper that converts CRV to CRVBPT and deposits\n     * @param _outputBps     Configurable output bps where 100% == 10000\n     */\n    constructor(\n        address _rewards,\n        address _crv,\n        address _cvx,\n        address _cvxCrv,\n        address _crvDepositorWrapper,\n        uint256 _outputBps\n    ) {\n        rewards = _rewards;\n        owner = msg.sender;\n        crv = _crv;\n        cvx = _cvx;\n        cvxCrv = _cvxCrv;\n        crvDepositorWrapper = _crvDepositorWrapper;\n        outputBps = _outputBps;\n    }\n\n    /**\n     * @notice Set CrvDepositorWrapper\n     * @param   _crvDepositorWrapper CrvDepositorWrapper address\n     * @param   _outputBps Min output base points\n     */\n    function setCrvDepositorWrapper(address _crvDepositorWrapper, uint256 _outputBps) external {\n        require(msg.sender == owner, \"!auth\");\n        require(_outputBps > 9000 && _outputBps < 10000, \"Invalid output bps\");\n\n        crvDepositorWrapper = _crvDepositorWrapper;\n        outputBps = _outputBps;\n    }\n\n    /**\n     * @notice Set keeper\n     */\n    function setKeeper(address _keeper) external {\n        require(msg.sender == owner, \"!auth\");\n        keeper = _keeper;\n    }\n\n    /**\n     * @notice Set pending owner\n     */\n    function setPendingOwner(address _po) external {\n        require(msg.sender == owner, \"!auth\");\n        pendingOwner = _po;\n    }\n\n    /**\n     * @notice Apply pending owner\n     */\n    function applyPendingOwner() external {\n        require(msg.sender == owner, \"!auth\");\n        require(pendingOwner != address(0), \"invalid owner\");\n\n        owner = pendingOwner;\n        pendingOwner = address(0);\n    }\n\n    /**\n     * @notice Set call incentive\n     * @param _incentive Incentive base points\n     */\n    function setCallIncentive(uint256 _incentive) external {\n        require(msg.sender == owner, \"!auth\");\n        require(_incentive <= 100, \"too high\");\n        callIncentive = _incentive;\n        emit CallIncentiveChanged(_incentive);\n    }\n\n    /**\n     * @notice Set reward address\n     */\n    function setRewards(address _rewards) external {\n        require(msg.sender == owner, \"!auth\");\n        rewards = _rewards;\n    }\n\n    /**\n     * @notice  Approve crvDepositorWrapper to transfer contract CRV\n     *          and rewards to transfer cvxCrv\n     */\n    function setApprovals() external {\n        IERC20(crv).safeApprove(crvDepositorWrapper, 0);\n        IERC20(crv).safeApprove(crvDepositorWrapper, type(uint256).max);\n\n        IERC20(cvxCrv).safeApprove(rewards, 0);\n        IERC20(cvxCrv).safeApprove(rewards, type(uint256).max);\n    }\n\n    /**\n     * @notice Transfer stuck ERC20 tokens to `_to`\n     */\n    function rescueToken(address _token, address _to) external {\n        require(msg.sender == owner, \"!auth\");\n        require(_token != crv && _token != cvx && _token != cvxCrv, \"not allowed\");\n\n        uint256 bal = IERC20(_token).balanceOf(address(this));\n        IERC20(_token).safeTransfer(_to, bal);\n    }\n\n    /**\n     * @dev Collects cvxCRV rewards from cvxRewardPool, converts any CRV deposited directly from\n     *      the booster, and then applies the rewards to the cvxLocker, rewarding the caller in the process.\n     */\n    function distribute() external {\n        // If keeper enabled, require\n        if (keeper != address(0)) {\n            require(msg.sender == keeper, \"!auth\");\n        }\n\n        //convert crv to cvxCrv\n        uint256 crvBal = IERC20(crv).balanceOf(address(this));\n        if (crvBal > 0) {\n            uint256 minOut = ICrvDepositorWrapper(crvDepositorWrapper).getMinOut(crvBal, outputBps);\n            ICrvDepositorWrapper(crvDepositorWrapper).deposit(crvBal, minOut, true, address(0));\n        }\n\n        //distribute cvxcrv\n        uint256 cvxCrvBal = IERC20(cvxCrv).balanceOf(address(this));\n\n        if (cvxCrvBal > 0) {\n            uint256 incentiveAmount = cvxCrvBal.mul(callIncentive).div(denominator);\n            cvxCrvBal = cvxCrvBal.sub(incentiveAmount);\n\n            //send incentives\n            IERC20(cvxCrv).safeTransfer(msg.sender, incentiveAmount);\n\n            //update rewards\n            IAuraLocker(rewards).queueNewRewards(cvxCrvBal);\n\n            emit RewardsDistributed(cvxCrv, cvxCrvBal);\n        }\n    }\n\n    /**\n     * @notice Allow generic token distribution in case a new reward is ever added\n     */\n    function distributeOther(IERC20 _token) external {\n        require(address(_token) != crv && address(_token) != cvxCrv, \"not allowed\");\n\n        uint256 bal = _token.balanceOf(address(this));\n\n        if (bal > 0) {\n            uint256 incentiveAmount = bal.mul(callIncentive).div(denominator);\n            bal = bal.sub(incentiveAmount);\n\n            //send incentives\n            _token.safeTransfer(msg.sender, incentiveAmount);\n\n            //approve\n            _token.safeApprove(rewards, 0);\n            _token.safeApprove(rewards, type(uint256).max);\n\n            //update rewards\n            IAuraLocker(rewards).notifyRewardAmount(address(_token), bal);\n\n            emit RewardsDistributed(address(_token), bal);\n        }\n    }\n}"
}