createLeveragedPosition validates that _collateralAmount > 0 but applies no equivalent check to _borrowAmount or _flashLoanAmount. Both can be zero, bypassing the core economic invariants of the leveraged position mechanism.
When both are zero, the protocol initiates a zero-amount Aave flash loan, supplies user collateral without taking leverage, and the swap checks pass trivially — creating an unlevered Aave deposit that still costs the user gas and flash loan fees.
Likelihood:
Off-chain tooling (frontend, bots) can pass zero values by mistake or as a result of calculation errors; without on-chain guards the contract accepts them silently
An operator misconfiguring the borrow calculation could deploy positions with zero leverage while paying flash loan fees
Impact:
A zero flash loan with zero borrow creates an Aave supply-only position at gas cost plus any flash loan fee, with no leverage benefit — the user's capital is locked in Aave with no corresponding position created
The protocol's event LeveragePositionCreated is emitted with borrowAmount = 0, corrupting off-chain accounting
Add explicit non-zero checks at the entry point of createLeveragedPosition:
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.