# Pod DoS if the LEAVE_AS_PAIRED_LP_TOKEN option is enabled

Peapods TokenRewards reverts when depositing paired LP tokens with zero stakers, permanently bricking bond/debond/stake and trapping user funds.

- Payout: Audit contest
- Severity: high
- Program: Peapods Finance
- Found by: TessKimy
- Disclosed: 2025-01-08
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2025-01-peapods-finance-judging/issues/175
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-01-peapods-finance%3AH-3
- Tags: area:web3 domain:web3 impact:dos impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:business-logic vuln:dos

**Target:** TokenRewards / DecentralizedIndex fee processing
**Root cause:** When LEAVE_AS_PAIRED_LP_TOKEN is enabled, depositFromPairedLpToken deposits PAIRED_LP_TOKEN without swapping; _depositRewards requires the deposited token to equal rewardsToken unless totalShares>0, so it reverts when no stakers exist.
**Steps:**
1. Enable LEAVE_AS_PAIRED_LP_TOKEN with PAIRED_LP_TOKEN != lpRewardsToken.
2. Users bond so pod accrues fees (balance>0).
3. A user adds liquidity so pool balance>0.
4. Any debond or stake call triggers _processPreSwapFeesAndSwap -> depositFromPairedLpToken -> _depositRewards, which reverts with 'R' since totalShares==0.
5. Removing all liquidity still leaves dead shares minted by V2 pool, so the revert persists permanently.
**How found:** Code review of TokenRewards deposit path: noticed the LEAVE_AS_PAIRED_LP_TOKEN branch skips the swap and hits the _depositRewards requirement that reverts for non-reward tokens when totalShares==0, then confirmed via PoC that debond/stake brick permanently.
**Exploitation:** No attacker action needed; the misconfiguration plus normal user activity (bond, add liquidity) locks the pod: every debond/stake reverts, trapping bonded funds with no recovery path.
**Insight:** When a config flag bypasses a swap/normalization step, check downstream invariants that assume the normalized token; a zero-staker/zero-supply guard can turn a benign config into a permanent DoS because V2 dead shares prevent full liquidity drain.

