{
    "Function": "_setSingleAndGlobalProtocolPremium",
    "File": "contracts/managers/SherlockProtocolManager.sol",
    "Parent Contracts": [
        "contracts/managers/Manager.sol",
        "node_modules/@openzeppelin/contracts/security/Pausable.sol",
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/interfaces/managers/ISherlockProtocolManager.sol",
        "contracts/interfaces/managers/IManager.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "_settleTotalDebt",
        "_setSingleProtocolPremium",
        "_calcGlobalPremiumPerSecForStakers"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _setSingleAndGlobalProtocolPremium(bytes32 _protocol, uint256 _premium) internal {\n    // Sets the individual protocol's premium and returns oldPremiumPerSecond and nonStakerPercentage for gas savings\n    (uint256 oldPremiumPerSecond, uint256 nonStakerPercentage) = _setSingleProtocolPremium(\n      _protocol,\n      _premium\n    );\n    // Settling the total amount of premiums owed to stakers before a new premium per second gets set\n    _settleTotalDebt();\n    // This calculates the new global premium per second that gets paid to stakers\n    // We input the same nonStakerPercentage twice because we simply aren't updating that value in this function\n    allPremiumsPerSecToStakers = _calcGlobalPremiumPerSecForStakers(\n      oldPremiumPerSecond,\n      _premium,\n      nonStakerPercentage,\n      nonStakerPercentage,\n      allPremiumsPerSecToStakers\n    );\n  }"
}