if (_vars.isInRecoveryMode) {
// BorrowerOps: Collateral withdrawal not permitted Recovery Mode
if (_isCollWithdrawal) revert CollWithdrawPermittedInRM();
if (_isDebtIncrease) _requireICRisAboveCCR(_vars.newICR);
} else {
// if Normal Mode
// check if the individual minimum collateral ratio is met (based on the used coll types)
if (_isCollWithdrawal || _isDebtIncrease) _requireICRisAboveIMCR(_vars.newICR, _vars.newIMCR);
Impact
claimUnassignedAssets
will increase the amount of debt and collateral to a trove by a certain amountResulting in a Coll Increase and a Debt Increase
https://github.com/blkswnStudio/ap/blob/8fab2b32b4f55efd92819bd1d0da9bed4b339e87/packages/contracts/contracts/BorrowerOperations.sol#L614-L665
but it's calling
_finaliseTrove(false, false,
which means that these checks applied when_isDebtIncrease == true
are going to be skippedhttps://github.com/blkswnStudio/ap/blob/8fab2b32b4f55efd92819bd1d0da9bed4b339e87/packages/contracts/contracts/BorrowerOperations.sol#L978-L986
Mitigation
Change the code to