# Incorrect parameters passed to UniV3 may cause funds stuck in the vault

GeVault passes zero amount0Min/amount1Min to UniV3 decreaseLiquidity; tiny liquidity returns 0,0 and collect(0,0) reverts, blocking all vault deposits/withdrawals.

- Payout: Contest reward
- Severity: medium
- Program: Good Entry
- Credited: libratus
- Disclosed: 2023-10-02
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-08-goodentry-findings/issues/397
- Library page: https://bugbountylibrary.com/r/c4%3A2023-08-goodentry%3AM-02
- Tags: domain:web3 impact:dos kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:regression technique:source-review vuln:accounting-error vuln:dos

**Target:** GeVault / TokenisableRange UniV3 LP withdrawal path
**Root cause:** removeFromTick calls tr.withdraw(aBal,0,0); for very small liquidity decreaseLiquidity returns removed0=removed1=0, and NonfungiblePositionManager.collect reverts when both amount0Max and amount1Max are zero.
**Steps:**
1. Fork Arbitrum at block 118634741.
2. Target GeVault 0xdcc16DEfe27cd4c455e5520550123B4054D1b432 (BTC vault).
3. As a depositor (0x461F5f86026961Ee7098810CC7Ec07874077ACE6) call `vault.withdraw(1e6, 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8)`.
4. Observe revert in `0xC36442b4a4522E871399CD717aBDD847Ab11FE88::collect((697126, vault, 0, 0))`.
**How found:** Auditor traced rebalancing path removeFromTick -> TokenisableRange.withdraw -> decreaseLiquidity -> collect, noticed zeros passed as amount0Min/amount1Min and that collect reverts when both maxes are zero; confirmed on deployed alpha via foundry fork test.
**Exploitation:** Not an attack; the vault naturally reaches a state where a tick has <$1 liquidity and outstanding debt so aBal is tiny (33446), causing decreaseLiquidity to return zeros and collect(0,0) to revert, DoS-ing deposits/withdrawals/rebalancing.
**Insight:** When integrating UniV3, check the periphery's revert conditions on collect/decreaseLiquidity: passing 0 mins and forwarding returned amounts as collect maxes breaks when rounding yields zero amounts for dust liquidity.
