# FTokens are burned after `quorumVotes` are recorded making a portion of the shares unclaimable

CollectionShutdown.execute records quorumVotes before sunsetCollection burns Locker's fTokens, inflating quorum and shrinking every voter's ETH claim.

- Payout: Audit contest
- Severity: medium
- Program: Flayer
- Found by: g
- Disclosed: 2024-08-06
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-08-flayer-judging/issues/610
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-08-flayer%3AM-22
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:reward-distribution

**Target:** CollectionShutdown.execute / Locker.sunsetCollection (Solidity)
**Root cause:** execute() computes params.quorumVotes from collectionToken.totalSupply() before calling locker.sunsetCollection(), which burns the Locker's fTokens and lowers totalSupply; the stale, larger quorumVotes is used as the claim denominator.
**Steps:**
1. Reach shutdown state: >=50% of holders vote, no listings for the collection.
2. Admin calls `CollectionShutdown::execute()`; it sets `params.quorumVotes = totalSupply() * SHUTDOWN_QUORUM_PERCENT / 100` while Locker still holds fTokens.
3. execute() then calls `locker.sunsetCollection(_collection)`, burning Locker's fTokens and reducing totalSupply.
4. Claim uses `availableClaim * claimableVotes / params.quorumVotes * 2`; inflated quorumVotes lowers each voter's payout, leaving ETH unclaimable.
**How found:** Code reading of execute(): noticed sunsetCollection() burns Locker tokens after quorumVotes is snapshotted, so the denominator no longer matches the post-burn supply used for claims.
**Exploitation:** Not attacker-triggered; occurs on every execute() call. Voters receive proportionally less ETH and the residual stays stuck in the contract.
**Insight:** When a share/claim denominator is snapshotted from totalSupply(), check whether any burn/mint in the same transaction happens after the snapshot; ordering of supply-mutating calls vs. ratio capture is a recurring accounting bug.

