The protocol assumes that the amount transferred via transferFrom equals the amount received by the contract. This holds for standard ERC20 tokens but fails for fee-on-transfer tokens, which charge a fee on each transfer so the receiver gets less than the sent amount.
When opening a leveraged position, the contract computes totalCollateral = _amount + flashParams.collateralAmount and supplies it to Aave. The collateralAmount is the value passed by the caller, not the actual amount received. With fee-on-transfer tokens, the contract receives less than collateralAmount, so it does not hold enough tokens to supply totalCollateral. The supply call reverts due to insufficient balance.
Likelihood (low):
Aave reserves and typical leverage flows use standard tokens (USDC, WETH) that are not fee-on-transfer.
Protocol expansion or integration with staking/reward tokens (e.g. some PAXG, deflationary tokens) would expose this.
Impact (low):
createLeveragedPosition reverts when the collateral token is fee-on-transfer.
No fund loss; operations fail with "insufficient balance" or similar revert.
Severity (low):
Option A — Measure actual received amount and use it in accounting:
Option B — Document and enforce: explicitly disallow fee-on-transfer tokens in supported token list; add validation or whitelist if such tokens must be excluded.
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.