{
    "Function": "getRageQuitAmounts",
    "File": "contracts/staking/InfinityStaker.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol",
        "node_modules/@openzeppelin/contracts/security/Pausable.sol",
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/interfaces/IStaker.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "getVestedAmount",
        "getVestedAmount",
        "require(bool,string)",
        "getVestedAmount"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function getRageQuitAmounts(address user) public view override returns (uint256, uint256) {\n    uint256 noLock = userstakedAmounts[user][Duration.NONE].amount;\n    uint256 threeMonthLock = userstakedAmounts[user][Duration.THREE_MONTHS].amount;\n    uint256 sixMonthLock = userstakedAmounts[user][Duration.SIX_MONTHS].amount;\n    uint256 twelveMonthLock = userstakedAmounts[user][Duration.TWELVE_MONTHS].amount;\n\n    uint256 threeMonthVested = getVestedAmount(user, Duration.THREE_MONTHS);\n    uint256 sixMonthVested = getVestedAmount(user, Duration.SIX_MONTHS);\n    uint256 twelveMonthVested = getVestedAmount(user, Duration.TWELVE_MONTHS);\n\n    uint256 totalVested = noLock + threeMonthVested + sixMonthVested + twelveMonthVested;\n    uint256 totalStaked = noLock + threeMonthLock + sixMonthLock + twelveMonthLock;\n    require(totalStaked >= 0, 'nothing staked to rage quit');\n\n    uint256 totalToUser = totalVested +\n      ((threeMonthLock - threeMonthVested) / THREE_MONTH_PENALTY) +\n      ((sixMonthLock - sixMonthVested) / SIX_MONTH_PENALTY) +\n      ((twelveMonthLock - twelveMonthVested) / TWELVE_MONTH_PENALTY);\n\n    uint256 penalty = totalStaked - totalToUser;\n\n    return (totalToUser, penalty);\n  }"
}