# `MultiInvoker`, `Manager` and `Account` unexpected reverts in certain conditions due to AAVE reverting on deposits and withdrawals with 0 amount

AaveV3FiatReserve passes 0-amount deposits/withdrawals to AAVE v3, which reverts, blocking full USDC withdrawals and interface-fee unwraps in Perennial.

- Payout: Audit contest
- Severity: medium
- Program: Perennial
- Found by: panprog
- Disclosed: 2024-08-17
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-08-perennial-v2-update-3-judging/issues/18
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-08-perennial-v2-update-3%3AM-2
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:dos

**Target:** AaveV3FiatReserve strategy in Perennial reserve
**Root cause:** _update compares UFixed18 collateral vs target and calls aave.deposit/withdraw with UFixed6 conversion; when abs(collateral-target)<1e12 the converted amount is 0, and AAVE v3 reverts on zero-amount supply/withdraw.
**Steps:**
1. Reserve uses AAVE strategy with allocation != 0.
2. target = unallocated.add(allocated).sub(amount).mul(allocation) is generally not divisible by 1e12.
3. Account: user has USDC, no DSU, calls `Account.withdraw(UFixed6Lib.MAX, true)`.
4. collateral-target < 1e12, UFixed6 conversion yields 0, `aave.withdraw(fiat, 0, ...)` reverts INVALID_AMOUNT.
5. MultiInvoker/Manager: interfaceFee.unwrap=true triggers reserve conversion which reverts on 0 amount, reverting whole tx.
**How found:** Code-reading: noticed AAVE v3 validateSupply requires amount != 0, then traced UFixed18->UFixed6 truncation in _update and reasoned target from 6-decimal inputs times allocation is rarely divisible by 1e12, making zero-amount calls likely.
**Insight:** When a strategy converts between token decimals and a math target, check whether truncation can produce zero before calling external protocols that reject zero amounts; full-balance withdrawals (MAX) are the highest-probability trigger.

