The LiquidationBranch::liquidateAccounts
function may revert due to block gas limits when processing accounts with numerous positions. This is caused by nested loops and extensive computations within the function.
The vulnerability lies in the liquidateAccounts
function of the LiquidationBranch contract, where nested loops are used to iterate through accounts, active markets, and positions for liquidation. This structure can potentially lead to hitting the block gas limit, especially when accounts hold multiple positions across various markets.
Gas Limit Reverts: Processing accounts with many positions can exceed the block gas limit, causing the transaction to revert.
Transaction Reverts: Liquidation of accounts with many positions may fail due to gas limit reverts.
Incomplete Liquidations: Accounts that should be liquidated might not be processed, leading to potential financial risks.
Tools Used
Manual Review
Implement batch processing for liquidating positions across multiple markets to prevent hitting the gas limit.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.