Normal behavior: Stratax uses 1inch to swap borrowed tokens to collateral during position opening and collateral to debt tokens during unwinding, with user-provided minReturnAmount for slippage protection.
Issue: The unwind flow applies a hardcoded 5% slippage buffer in calculateUnwindParams and ignores the user-provided minReturnAmount, while both createLeveragedPosition and unwindPosition are onlyOwner, so users cannot control slippage tolerance, leading to potential failed swaps and unrecoverable flash loans.// Root cause in the codebase with @> marks to highlight the relevant section
Likelihood:
The owner controls all position operations and can set minReturnAmount arbitrarily low; unwind calculations use a fixed 5% buffer that may be insufficient during high volatility, causing swaps to return less than expected and fail the minReturnAmount check
Impact:
Failed swaps prevent flash loan repayment, causing the entire transaction to revert and leaving positions in an inconsistent state; owner-set minReturnAmount can be exploited to force failures or extract value.
Owner calls createLeveragedPosition with a very low minReturnAmount, allowing swaps to execute with excessive slippage
During unwind, calculateUnwindParams adds only 5% to collateralToWithdraw regardless of market conditions
If market volatility exceeds 5%, the 1inch swap returns less than minReturnAmount, causing _call1InchSwap to revert and the flash loan to fail repayment
The unwind transaction reverts, leaving the position unchanged and potentially locking user funds.
Remove onlyOwner from createLeveragedPosition and unwindPosition so users control their own positions and slippage tolerance Stratax.sol:314-322 .
Add _slippageBps parameter to calculateUnwindParams to replace the hardcoded 5% buffer, defaulting to 5% when zero Stratax.sol:467-469 .
Add unwindPositionWithSlippage helper that includes a deadline check to prevent stale 1inch calldata execution.
The swap check in _call1InchSwap remains to enforce the user-provided minReturnAmount Stratax.sol:628-629 .
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.