<!-- canonical: https://0xsimao.com/findings/maple-finance-iii-accidentally-lock-middle-redeeming -->

# Pool Delegates can accidentally lock out of their funds LPs in the middle of redeeming.

Medium · Three Sigma · Institutional lending · 10th April, 2024

Finding 3S-MAPLE-M08 of the Maple Finance security review.

- Protocol: https://maple.finance/
- Report: /reports/maple-finance-iii-2024
- Source: https://cdn.sanity.io/files/qoqld077/production/36dbe5ca76da3d2392bcee581548067705b8bd36.pdf

---

### Description

Pool delegates are allowed to change the withdrawal manager address at any time using
the setWithdrawalManager() function. Changing this address, even with good intentions in
mind, poses the problem of locking out of their shares the LPs in the process of
redeeming. This happens since the storage mappings: exitCycleId and lockedShares, as
well as the ERC-20 tokens (shares) of the LPs waiting for their withdrawal window will not
have migrated to the new address, and will now be locked in the previous
withdrawalManager proxy contract.

### Recommendation

Remove the setWithdrawalManager() function or pause it by default.

### Status

Addressed in the following PR:
https://github.com/maple-labs/pool-v2-private/pull/272

---

Related findings:

- [Users redeeming early will withdraw `Ra` without decreasing the amount locked, which will lead to stolen funds when withdrawing after expiry](https://0xsimao.com/findings/cork-protocol-redeeming-withdraw-locked-stolen): Cork Protocol
- [Attackers can include other users nullifiers to make their funds stuck when adding liquidity to curve](https://0xsimao.com/findings/singularity-include-nullifiers-stuck-curve): Singularity
- [Users will steal excess funds from the Vault due to `VaultPoolLib::redeem()` not always decreasing `self.withdrawalPool.raBalance` and `self.withdrawalPool.paBalance`](https://0xsimao.com/findings/cork-protocol-steal-excess-redeem-withdrawal): Cork Protocol
- [A malicious user may unlock instantly all the funds from the `FluidLocker` when no one is staking in the Tax pool](https://0xsimao.com/findings/superfluid-locker-system-unlock-instantly-staking-tax): Superfluid Locker System
