DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: medium
Invalid

Incorrect Loop Condition Leading to Potential Skipped Accounts in Liquidation Check

Summary

In LiquidationBranch::checkLiquidatableAccounts there is a potential issue with the loop condition checking if i is greater than or equal to the length of active accounts. The condition should check if i is equal to the length to ensure all active accounts are processed correctly.

Vulnerability Details

Impact

This issue can cause the function to miss processing the last active account, potentially leaving some accounts unchecked for liquidation, impacting the system's accuracy.

Tools Used

Manual

Recommendations

Adjust Loop Condition: Change the condition to ensure the loop processes all active accounts:

if (i >= cachedAccountsIdsWithActivePositionsLength) break;

to:

if (i == cachedAccountsIdsWithActivePositionsLength) break;
Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.