#45574 [SC-Insight] Redundant Per‑Item Upper Bound Check in `validateLiquidationFactors`
Description
Brief/Introduction
require(liquidationFactors[i] > SafePct.MAX_BIPS, "factor not above 1");Optimization Details
for (uint256 i = 0; i < liquidationFactors.length; i++) {
require(liquidationFactors[i] > SafePct.MAX_BIPS, "factor not above 1");
require(vaultCollateralFactors[i] <= liquidationFactors[i], "vault collateral factor higher than total");
require(i == 0 || liquidationFactors[i] > liquidationFactors[i - 1], "factors not increasing");
}Recommendation
Impact (Insight)
Proof of Concept
Proof of Concept
Previous#45550 [SC-Medium] [H-01] `illegalPaymentChallenge` is vulnerable to frontrunning by external challengers stealing the rewardNext#45665 [SC-Medium] [H-02] Minting Cap Bypass via Pool Fee Exclusion during Self Mint
Was this helpful?