57460 sc high protocol fails to subtract fee from total locked when burning and repaying
Description
Brief/Intro
Vulnerability Details
uint256 toFree = convertDebtTokensToYield(amount) * minimumCollateralization / FIXED_POINT_SCALAR;
uint256 lockedCollateral = convertDebtTokensToYield(account.debt) * minimumCollateralization / FIXED_POINT_SCALAR;
// For cases when someone above minimum LTV gets liquidated.
if (toFree > _totalLocked) {
toFree = _totalLocked;
}
// @audit :missing fee
account.debt -= amount;
totalDebt -= amount;
_totalLocked -= toFree;Impact Details
Recommended Mitigation
References
Proof of Concept
Proof of Concept
Previous57585 sc high alchemistv3 does not properly update cdp collateralbalance when redemptions exceed totallocked which enables some cdps to over withdraw collateral on account of othersNext58555 sc low alchemistcurator 2 step ownership transfer is implemented incorrectly
Was this helpful?