When opening/unwinding with an Aave flash loan, the contract should use the actual flash‑loan fee charged by Aave for that call. In Aave V3, the true fee is provided to the callback as _premium and may vary by market/upgrade.
Stratax stores a configurable flashLoanFeeBps (default 9) and uses it inside calculateOpenParams to size the borrow such that the 1inch swap will cover flashLoanAmount + fee. However, the actual fee is determined by Aave and passed as _premium in executeOperation. If flashLoanFeeBps is out of sync with Aave’s real fee (e.g., fee changed on the pool, misconfigured by owner, different per‑chain), calculateOpenParams can underestimate the needed return, and the position will revert later in the callback:
Likelihood: Medium
Aave fee schedules can differ across networks/markets or change over time; operationally, owners will forget to update flashLoanFeeBps, or set it incorrectly between deployments.
Integrations that rely on calculateOpenParams to size trades will routinely hit this path.
Impact: Medium
Operational DoS / late revert: Opens (and potentially unwinds) pass pre‑checks but revert in the flash‑loan callback because _premium > computed fee.
Hidden safety gap: If flashLoanFeeBps is set lower than reality, your borrow sizing and minReturnAmount are optimistic, increasing failure probability under load.
Conceptual pseudocode:
A similar flow holds if the owner mistakenly sets flashLoanFeeBps to an outdated or chain‑inappropriate value.
Extend IPool interface to expose the pool’s flash‑loan premium (e.g., FLASHLOAN_PREMIUM_TOTAL() in Aave V3).
In calculateOpenParams, read the current premium bps from the pool instead of using flashLoanFeeBps.
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.