The repay
function allows users to repay their debt even when the liquidation grace period has passed and liquidation is pending finalization. This undermines the liquidation process, enabling users to bypass penalties and potentially exploit the system.
Currently, the repay
function lacks a check to prevent repayments after liquidation has been initiated and the grace period has expired:
When a user becomes eligible for liquidation, a grace period begins.
If the user fails to repay during this grace period, liquidation should proceed.
Issue: Users can still call repay
after the grace period but before finalizeLiquidation
is triggered, negating the liquidation process.
Bypassing Liquidation Penalties: Users avoid penalties by repaying after grace period expiration.
Economic Exploit: Borrowers can exploit this loophole to maintain risky positions without facing consequences.
Integrity Risk: Undermines the protocol’s liquidation process and fairness.
Manual code review.
Add a validation check in the repay
function to prevent repayments after the liquidation grace period expires:
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.