#45830 [SC-Medium] Incorrect amount passed to checkMintingCap in self-minting allows bypassing of config minting cap
Description
Vulnerability Details
function checkMintingCap(
uint64 _increaseAMG
)
internal view
{
AssetManagerState.State storage state = AssetManagerState.get();
AssetManagerSettings.Data storage settings = Globals.getSettings();
uint256 mintingCapAMG = settings.mintingCapAMG;
if (mintingCapAMG == 0) return; // minting cap disabled
uint256 totalMintedUBA = IERC20(settings.fAsset).totalSupply();
uint256 totalAMG = state.totalReservedCollateralAMG + Conversion.convertUBAToAmg(totalMintedUBA);
require(totalAMG + _increaseAMG <= mintingCapAMG, "minting cap exceeded");
}Example scenario
Impact
Recommended Mitigations
Proof of Concept
Proof-of-Concept
Steps
Previous#45772 [SC-Insight] NatSpec Mismatch in CoreVault Redemption LogicNext#45813 [SC-Insight] Missing `setAutoClaiming` Function
Was this helpful?