A leveraged position protocol should enforce a safety buffer above liquidation, not merely “HF > 1”. Healthy systems set a configurable minimum health factor (e.g., 1.05–1.15) and/or derive it from conservative borrow sizing so small adverse price moves or oracle updates cannot instantly liquidate positions.
Stratax only checks healthFactor > 1e18 once in the open path and uses no buffer nor configurability:
It permits barely‑healthy positions (e.g., HF = 1.0001) that are one oracle tick from liquidation.
There is no min‑HF guard in unwind (partial unwinds could leave a knife‑edge HF).
Combined with user‑supplied _borrowAmount and lenient _minReturnAmount, operators can open positions right at LTV (see a related bug), and this check won’t stop it as long as HF is just above 1.
Likelihood: Medium
Routine market volatility and small price oracle updates occur every block. A position opened at HF ≈ 1.00–1.03 is very likely to be liquidatable in the next update.
Off‑chain bots/integrations often optimize for capital efficiency; without a firm on‑chain minimum, they’ll tend to push HF near 1.0.
Impact: Medium
Instant liquidation risk / user losses: Positions can be liquidated immediately after opening due to tiny adverse moves or oracle updates.
Operational fragility: Strategies that appear “successful” on one block may revert/lose funds on the next due to minimal safety margin.
Conceptual pseudocode:
Enforce a configurable minimum HF (default ≥ 1.05)
Introduce a state variable (e.g., minHealthFactorWad) and require it at the end of open and (optionally) after partial unwinds:
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.
The contest is complete and the rewards are being distributed.