Solvent Users can be liquidated if the HealthFactorLiquidationThreshold is changed
The function calculateHealthFactor shown below is a function used to calculate a user's health factor by comparing the helath factor to the liquidation threshold.
This function is then used in the function inititateliquidation to determine if a user can be liquidated.
An issue arises in the case that a user was deemed insolvent after an inititateliquidation call. An owner, acting non maliciously, can change the liquidation threshold. When this threshold is changed, a user that was previously insolvent, can become solvent again. However, this change is not reflected as the calculateHealthFactor function is only called through initiateliquidation while other functions throughout the contract only fetches the outdated mapping.
This locks the user out of 2 functions.
the Borrow function as if only fetches the mapping, without recalculating the new healthfactor
The withdrawNFT function for the same reasons
Repay also doesn't change the user 's status
A user who was previously insolvent cannot become solvent if the healthfactor threshold is changed and cannot change their status
Manual Review
Instead of fetching the isUnderLiquidation mapping, call the function calculatehealthfactor
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.