The protocol should prevent users from opening positions that are immediately at the liquidation boundary. In lending and overcollateralized stablecoin systems, the borrow LTV is normally lower than the liquidation threshold so users have a safety buffer before liquidation.
DSCEngine uses LIQUIDATION_THRESHOLD as both the minting limit and the liquidation threshold. A user can mint until their health factor is exactly MIN_HEALTH_FACTOR, so even a tiny oracle price decrease makes the position liquidatable and exposes the user to liquidation bonus loss.
Likelihood:
This occurs whenever a user mints the maximum amount accepted by _revert_if_health_factor_is_broken.
Normal market movement or a small oracle price decrease immediately pushes the position below MIN_HEALTH_FACTOR.
Impact:
Users can open protocol-approved positions that become liquidatable after a tiny price movement.
Liquidators can capture the liquidation bonus from users who had no borrow buffer, causing avoidable collateral loss and poor protocol safety.
Use MAX_MINT_LTV when validating new debt creation in _mint_dsc, and keep LIQUIDATION_THRESHOLD for liquidation eligibility and health factor checks.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.