https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/LendingPool/LendingPool.sol#L496
Currently after a liquidation is initiated for a user they can be liquidated if finaliseliquidate is called
The issue with this function is it performs the actual liquidation without making sure if the user should actually be liquidated or they have repaid their debt
to close liquidation there is this check that ensures users debt is > dustThreshold.
if users debt is more then it prevent user from closing meaning the user has to make sure they repay above dust.
But in liquidate function there are no checks to prevent users from being liquidated unfairly. And in the stabilityPool we have a check to make sure we revert if the userDebt is == 0. not factoring in dust
As shown user will only survive if the debt is 0.
unfair liquidations
for as long as userDebt > DUST_THRESHOLD
they should not be liquidated.
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.