calculateOpenParams fetches oracle prices only when the caller passes zero for collateralTokenPrice or borrowTokenPrice. Any non-zero value supplied by the caller is accepted without cross-checking against the oracle. This allows a caller to use arbitrary prices to size positions — artificially inflating or deflating the computed flashLoanAmount and borrowAmount.
The calculateOpenParams function is a view used to size positions before calling createLeveragedPosition. A caller who supplies an inflated collateralTokenPrice or a deflated borrowTokenPrice receives output parameters (flashLoanAmount, borrowAmount) that differ from what the oracle would compute. The caller then passes those parameters to createLeveragedPosition, which executes the flash loan and borrow without any on-chain oracle validation of its own.
Additionally, the Stratax oracle and the Aave internal oracle are independent systems. Aave's liquidation engine uses its own oracle (from AaveOracle); Stratax uses StrataxOracle. These can diverge. A position sized using Stratax oracle prices may be immediately under- or over-collateralised by Aave's assessment.
Likelihood:
calculateOpenParams is a public view function; any caller can supply arbitrary collateralTokenPrice and borrowTokenPrice values
The function is intended as an off-chain helper, but its outputs are directly used as inputs to createLeveragedPosition — there is no separation enforced
Oracle divergence between StrataxOracle and the Aave oracle is always present in live markets; the gap widens during volatility
Impact:
A caller can pass collateralTokenPrice = 1 (near zero) to maximise borrowAmount in the formula, opening a position with a borrow far exceeding what the oracle would allow
With the inflated borrow, the 1inch swap receives more tokens than expected; the position opens with excess leverage, reducing the health factor below safe margins immediately after creation
An under-priced borrowTokenPrice causes the pre-flight flash-loan-repay check to fail, preventing valid positions from being opened (denial of service for position creation)
The Aave/Stratax oracle divergence means positions calculated as healthy by Stratax may be liquidated by Aave without any on-chain warning
The caller price bypass is demonstrable without a fork. The check if (details.collateralTokenPrice == 0) is the only oracle fetch gate:
Remove the caller-supplied price parameters from calculateOpenParams. Always source prices from the oracle:
For the Aave/Stratax oracle divergence risk, add a configurable maximum acceptable divergence check comparing strataxOracle.getPrice() against IAaveOracle(aavePool.ADDRESSES_PROVIDER().getPriceOracle()).getAssetPrice().
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.