# Depositors could lose all their deposited tokens (including the hTokens) if their address is blacklisted in one of all the deposited underlyingTokens

BranchBridgeAgent.redeemDeposit sends all deposited tokens to msg.sender only; if blacklisted in one underlying token, the whole atomic redemption reverts and all tokens stay stuck in BranchPort.

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

**Target:** BranchBridgeAgent.redeemDeposit / BranchPort withdraw
**Root cause:** redeemDeposit atomically loops over all deposit tokens and hardcodes recipient to msg.sender; a single reverting transfer (blacklisted recipient) reverts the entire redemption, leaving all tokens in BranchPort.
**Steps:**
1. Deploy a token whose transfer reverts for blacklisted addresses.
2. From a Branch, callOutSignedAndBridgeMultiple depositing multiple tokens (hTokens + underlyingTokens) including the blacklistable token, with gas params causing Root execution to fail.
3. Call retrieveDeposit to move the deposit into redeemable status.
4. Blacklist the depositor address in the blacklistable token.
5. Call redeemDeposit(nonce) — the loop's transfer to msg.sender reverts on the blacklisted token, reverting the whole call; all tokens remain in BranchPort.
**How found:** Code review of redeemDeposit: noticed recipient is hardcoded to msg.sender and redemption is atomic across all tokens, so any single failing transfer blocks the entire withdrawal; confirmed with a fork PoC using a blacklisting mock token.
**Exploitation:** Not an attacker-driven exploit; a depositor blacklisted in one of several deposited tokens cannot redeem any of them, permanently locking all deposited tokens (including hTokens) in the BranchPort.
**Insight:** In multi-asset atomic withdrawal loops, a single reverting transfer (blacklist/pause/fee-on-transfer) bricks the whole batch; check whether recipient is caller-fixed and whether per-token failures are isolated.
