# Possible to fully block PublicVault.processEpoch function. No one will be able to receive their funds

Attacker deposits 1 wei into WithdrawProxy to inflate its totalSupply, making processEpoch burn more shares than PublicVault holds, reverting and locking LP funds.

- Payout: Contest reward
- Severity: high
- Program: Astaria
- Credited: TurnipBoy
- Disclosed: 2022-11-07
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2022-10-astaria-judging/issues/88
- Library page: https://bugbountylibrary.com/r/sherlock%3A2022-10-astaria%3AH-28
- Tags: domain:web3 impact:dos impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic vuln:dos

**Target:** PublicVault.processEpoch / WithdrawProxy deposit
**Root cause:** processEpoch burns proxySupply shares from PublicVault, but WithdrawProxy.deposit lets anyone mint shares, so proxySupply can exceed PublicVault's balance and the burn reverts.
**Steps:**
1. LP calls redeemFutureEpoch to deploy WithdrawProxy for the epoch and mint 1:1 shares.
2. Attacker transfers 1 wei WETH to WithdrawProxy so totalAssets > 0.
3. Attacker calls `WithdrawProxy.deposit(1, attacker)` to mint extra shares, making totalSupply > PublicVault.balanceOf(PublicVault).
4. At epoch boundary, `processEpoch` computes proxySupply > PublicVault balance and `_burn(address(this), proxySupply)` reverts.
5. Funds never reach WithdrawProxy; LPs cannot redeem.
**How found:** Code reading of processEpoch's burn of proxySupply against PublicVault balance, noticing WithdrawProxy.deposit is externally callable and mints shares 1:1, breaking the invariant proxySupply <= PublicVault balance.
**Exploitation:** Attacker needs only 1 wei to grief. Improved variant: attacker is an LP, initiates redeem for next epoch, deposits enough into the new WithdrawProxy to mint shares, then processEpoch sends the previously blocked epoch's assets to the new proxy, letting attacker capture them.
**Escalation:** Chaining a second redeem into a fresh WithdrawProxy lets the attacker absorb the funds that were stuck in the blocked epoch.
**Insight:** When a contract burns shares it holds on behalf of another contract, verify no external party can mint that share token; any permissionless deposit/mint into the accounting proxy breaks the burn invariant.
