{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/governance/YaxisVotePower.sol",
    "Parent Contracts": [
        "contracts/governance/interfaces/IVoteProxy.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract YaxisVotePower is IVoteProxy {\n    using SafeMath for uint256;\n\n    // solhint-disable-next-line const-name-snakecase\n    uint8 public constant override decimals = uint8(18);\n\n    IUniswapV2Pair public immutable yaxisEthUniswapV2Pair;\n    IERC20 public immutable yaxis;\n    IRewards public immutable rewardsYaxis;\n    IRewards public immutable rewardsYaxisEth;\n\n    constructor(\n        address _yaxis,\n        address _rewardsYaxis,\n        address _rewardsYaxisEth,\n        address _yaxisEthUniswapV2Pair\n    )\n        public\n    {\n        yaxis = IERC20(_yaxis);\n        rewardsYaxis = IRewards(_rewardsYaxis);\n        rewardsYaxisEth = IRewards(_rewardsYaxisEth);\n        yaxisEthUniswapV2Pair = IUniswapV2Pair(_yaxisEthUniswapV2Pair);\n    }\n\n    function totalSupply()\n        external\n        view\n        override\n        returns (uint256)\n    {\n        return sqrt(yaxis.totalSupply());\n    }\n\n    function balanceOf(\n        address _voter\n    )\n        external\n        view\n        override\n        returns (uint256 _balance)\n    {\n        uint256 _stakeAmount = rewardsYaxisEth.balanceOf(_voter);\n        (uint256 _yaxReserves,,) = yaxisEthUniswapV2Pair.getReserves();\n        uint256 _supply = yaxisEthUniswapV2Pair.totalSupply();\n        _supply = _supply == 0\n            ? 1e18\n            : _supply;\n        uint256 _lpStakingYax = _yaxReserves\n            .mul(_stakeAmount)\n            .div(_supply)\n            .add(rewardsYaxisEth.earned(_voter));\n        uint256 _rewardsYaxisAmount = rewardsYaxis.balanceOf(_voter)\n            .add(rewardsYaxis.earned(_voter));\n        _balance = sqrt(\n            yaxis.balanceOf(_voter)\n                .add(_lpStakingYax)\n                .add(_rewardsYaxisAmount)\n        );\n    }\n\n    function sqrt(\n        uint256 x\n    )\n        private\n        pure\n        returns (uint256 y)\n    {\n        uint256 z = (x + 1) / 2;\n        y = x;\n        while (z < y) {\n            y = z;\n            z = (x / z + z) / 2;\n        }\n        y = y * (10 ** 9);\n    }\n}"
}