{
    "Function": "updatePool",
    "File": "contracts/RocketJoeStaking.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"
    ],
    "High-Level Calls": [
        "RocketJoeToken",
        "IERC20Upgradeable"
    ],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function updatePool() public {\n        if (block.timestamp <= lastRewardTimestamp) {\n            return;\n        }\n        uint256 joeSupply = joe.balanceOf(address(this));\n        if (joeSupply == 0) {\n            lastRewardTimestamp = block.timestamp;\n            return;\n        }\n        uint256 multiplier = block.timestamp - lastRewardTimestamp;\n        uint256 rJoeReward = multiplier * rJoePerSec;\n        accRJoePerShare =\n            accRJoePerShare +\n            (rJoeReward * PRECISION) /\n            joeSupply;\n        lastRewardTimestamp = block.timestamp;\n\n        rJoe.mint(address(this), rJoeReward);\n    }"
}