{
    "Function": "_updateYieldRewardsSum",
    "File": "contracts/src/StabilityPool.sol",
    "Parent Contracts": [
        "contracts/src/Interfaces/IStabilityPoolEvents.sol",
        "contracts/src/Interfaces/IStabilityPool.sol",
        "contracts/src/Interfaces/IBoldRewardsReceiver.sol",
        "contracts/src/Dependencies/LiquityBase.sol",
        "contracts/src/Interfaces/ILiquityBase.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _updateYieldRewardsSum(uint256 _newYield) internal {\n        uint256 accumulatedYieldGains = yieldGainsPending + _newYield;\n        if (accumulatedYieldGains == 0) return;\n\n        // When total deposits is very small, B is not updated. In this case, the BOLD issued is held\n        // until the total deposits reach 1 BOLD (remains in the balance of the SP).\n        if (totalBoldDeposits < MIN_BOLD_IN_SP) {\n            yieldGainsPending = accumulatedYieldGains;\n            return;\n        }\n\n        yieldGainsOwed += accumulatedYieldGains;\n        yieldGainsPending = 0;\n\n        scaleToB[currentScale] += (P * accumulatedYieldGains) / totalBoldDeposits;\n        emit B_Updated(scaleToB[currentScale], currentScale);\n    }"
}