The function initiateLiquidation
lacks slippage protection, exposing it to potential exploitation due to rapid fluctuations in the health factor.
1. Lack of Slippage Protection
The function does not have safeguards against sudden changes in the health factor.
Attackers could manipulate asset prices or liquidity conditions to artificially trigger liquidation under unfair circumstances.
This can lead to unintended or premature liquidations at non-optimal prices.
The NatSpec states this: "if a user's health factor is below threshold", but it does not clarify the behavior when the health factor is above the threshold.
The actual check:
This suggests that liquidation is only allowed if the health factor is below the threshold, which is not reflected in the documentation.
Unfair Liquidations: Attackers can manipulate market conditions to trigger liquidations at non-optimal prices.
NatSpec Confusion: Developers and auditors may misunderstand the function's intended behavior, leading to improper integration or missed security concerns.
Pending Liquidation State: Liquidations may remain open indefinitely, potentially causing inefficiencies in fund recovery and protocol operations.
Manual review
Introduce Slippage Protection:
Implement min and max thresholds to prevent execution in cases where the health factor fluctuates too rapidly.
Consider integrating oracle-based pricing verification to ensure fair liquidation conditions.
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.