The LiquidityPool::closeLiquidation
function allows a user to exit liquidation only if their debt has been fully repaid within the grace period. However, a race condition exists:
A user repays their debt in one transaction.
Then, they attempt to close liquidation in a separate transaction.
If the block timestamp increases beyond the grace period in between, the second transaction fails.
If a user repays their debt just before the grace period expires, they might not have enough time to execute closeLiquidation
before the deadline.
Unrecoverable liquidation: Users could lose their collateral even after full repayment.
Mnual review
Merge repayment and liquidation closure into a single function
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.