https://github.com/Cyfrin/2024-07-zaros/blob/main/src/perpetuals/branches/LiquidationBranch.sol#L105-L223
Lack of proper locking in liquidateAccounts
can lead to race conditions if multiple liquidators try to liquidate the same accounts simultaneously.
The function liquidateAccounts
does not lock the state while processing accounts, leading to potential race conditions where multiple transactions might interfere with each other, causing inconsistent state updates.
Race Conditions: Multiple liquidators might interfere with each other, causing inconsistent state updates.
Data Integrity Issues: Without proper locking, the state might become inconsistent or corrupted.
Manual
Implement Locking Mechanism: Ensure that only one liquidator can process a given account at a time to avoid race conditions.
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.