# Lender group members can be prevented from burning their shares forever

Zero-value transferFrom triggers _afterTokenTransfer hook, resetting a lender's withdrawal countdown and locking their shares indefinitely.

- Payout: Audit contest
- Severity: high
- Program: Teller
- Found by: KupiaSec
- Disclosed: 2024-11-16
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2024-11-teller-finance-update-judging/issues/24
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-11-teller-finance-update%3AH-1
- 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:** LenderCommitmentGroupShares ERC20 share token / burn withdrawal delay
**Root cause:** _afterTokenTransfer unconditionally resets poolSharesPreparedToWithdrawForLender and poolSharesPreparedTimestamp for `from`, and OZ ERC20 transferFrom permits 0-value transfers, so anyone can reset a victim's prepared-burn state.
**Steps:**
1. Victim calls `prepareSharesForBurn` to start the withdrawDelayTimeSeconds countdown.
2. Attacker calls `transferFrom(victim, attacker, 0)` shortly before the delay expires.
3. `_afterTokenTransfer` fires and zeroes `poolSharesPreparedToWithdrawForLender[victim]` and resets `poolSharesPreparedTimestamp[victim]`.
4. Victim's `burnSharesToWithdrawEarnings` reverts on `poolSharesPreparedToWithdrawForLender >= _amount`; repeat to keep funds locked.
**How found:** Reading the burn delay logic and noticing _afterTokenTransfer resets state on any transfer, combined with OZ 4.8 ERC20 lacking zero-value checks, enabling griefing via 0-value transferFrom.
**Exploitation:** Attacker repeatedly sends 0-value transferFrom from the victim's address just before the cooldown elapses, perpetually resetting the prepared state so the victim can never satisfy the burn delay check, locking their shares/earnings until a bribe is paid.
**Insight:** When a hook resets per-user state on transfer, check whether zero-value transfers (allowed by OZ ERC20) can be used by third parties to grief users' time-locked actions.

