# Cannot withdraw RDPX if WETH withdrawn is zero

Dopex PerpetualAtlanticVaultLP redeem reverts when computed WETH assets is zero, locking depositors out of RDPX compensation after collateral is fully settled.

- Payout: Contest reward
- Severity: medium
- Program: Dopex
- Credited: gjaldon
- Disclosed: 2023-12-29
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-08-dopex-findings/issues/750
- Library page: https://bugbountylibrary.com/r/c4%3A2023-08-dopex%3AM-13
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic

**Target:** PerpetualAtlanticVaultLP.sol redeem()
**Root cause:** redeem() requires assets != 0 where assets = shares.mulDivDown(totalCollateral(), supply); when all WETH collateral is converted to RDPX via option settlement, totalCollateral() is 0 so assets is always 0 and redeem reverts, blocking RDPX withdrawal.
**Steps:**
1. Depositors deposit 100_000e18 WETH into VaultLP.
2. RdpxV2Core purchases options locking all WETH as collateral.
3. RDPX price drops; all Put Options settled, replacing WETH with RDPX in VaultLP.
4. totalCollateral() returns 0 WETH.
5. Depositor calls redeem(shares); assets = shares * 0 / supply = 0; `require(assets != 0, "ZERO_ASSETS")` reverts.
6. Depositor cannot withdraw RDPX compensation.
**How found:** Code reading of redeem() and totalCollateral() in PerpetualAtlanticVaultLP, reasoning about the state after full option settlement leaves zero WETH collateral.
**Insight:** When a redeem/withdraw guard checks only one asset's computed amount, consider multi-asset vaults where the primary asset can be fully drained to zero while a secondary asset remains—the zero-check then bricks redemption of the remaining asset.
