When entering liquidation, users have a time liquidationGracePeriod
to repay their debts to avoid liquidation.
The problem is that initiateLiquidation
do not store this value when entering liquidation.
A user can think that he has X days to repay, but the admin calls setParameter
and updates the liquidationGracePeriod
, which if lowered can block the user from repaying his debt and closeLiquidation()
Users can be unfairly liquidated.
liquidationGracePeriod = 7 days
UserA has NFTa deposited and borrowed against
market movement, initiateLiquidation(userA)
is called and he is now under liquidation
userA thinks he has 7 days to repay his debt and is gathering the money to pay back to avoid liquidation. He had emergency funds accessible in 3 days in case of those events
2 days pass
setParameter
is called by Owner, and liquidationGracePeriod = 1 days
user cannot call closeLiquidation()
and is liquidated by finalizeLiquidation()
The user is unfairly liquidated as he thought he had 7 days to repay his debts and ended up liquidated sooner than expected. There is no check in setParameter::liquidationGracePeriod
that users are currently ina liquidation state. The value of the grace period should be stored at the time of the initialization of the liquidation
Manual
initiateLiquidation
should store the liquidationGracePeriod
when called:
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.