{
    "Function": "_getUpdatedBaseRateFromRedemption",
    "File": "contracts/src/CollateralRegistry.sol",
    "Parent Contracts": [
        "contracts/src/Interfaces/ICollateralRegistry.sol",
        "contracts/src/Dependencies/Owned.sol",
        "contracts/src/Interfaces/IOwned.sol"
    ],
    "High-Level Calls": [
        "LiquityMath"
    ],
    "Internal Calls": [
        "_calcDecayedBaseRate"
    ],
    "Library Calls": [
        "_min"
    ],
    "Low-Level Calls": [],
    "Code": "function _getUpdatedBaseRateFromRedemption(\n        uint256 _redeemAmount,\n        uint256 _totalBoldSupply\n    ) internal view returns (uint256) {\n        // decay the base rate\n        uint256 decayedBaseRate = _calcDecayedBaseRate();\n\n        // get the fraction of total supply that was redeemed\n        uint256 redeemedBoldFraction = (_redeemAmount * DECIMAL_PRECISION) / _totalBoldSupply;\n\n        uint256 newBaseRate = decayedBaseRate + redeemedBoldFraction / REDEMPTION_BETA;\n        newBaseRate = LiquityMath._min(newBaseRate, DECIMAL_PRECISION); // cap baseRate at a maximum of 100%\n\n        return newBaseRate;\n    }"
}