# Guard overreach freezes unrelated state

Guards keyed on shared token/id/flag that block transfers or exits they should not

_Area: Smart contract access control and control flow. Seen in 3 disclosed reports; latest 2024-05-23. Updated 2026-11-17._

## How it works
A guard or block is meant to protect one thing (a rented token, a locked position, a tier) but is keyed on a shared identifier — token address, token ID, a single global flag, or a single user action. The check cannot tell the protected units from unrelated ones sharing that identifier, so it blocks or freezes state it was never meant to touch. The broken assumption is that "same token/id/flag" means "same restricted thing." When the restriction is coarser than the actual protected set, everything sharing the key inherits the block.

## Where it shows up
- Guard/allowlist checks keyed on `(token, tokenId)` or `(from, to)` with no per-unit or per-rental accounting [E2](https://bugbountylibrary.com/r/c4%3A2024-01-renft%3AM-01.md)
- Transfer blocks that fire on any active rental of an ID, not on the specific rented units [E2](https://bugbountylibrary.com/r/c4%3A2024-01-renft%3AM-01.md)
- Exit/reset paths that depend on a token or approval the user can destroy or revoke independently (burn, revoke) [E1](https://bugbountylibrary.com/r/c4%3A2024-02-tapioca%3AM-11.md)
- State derived from any single user action (e.g. `largestTierClaimed` set by one claim) that pins a global condition [E3](https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md)
- Receiver hooks (ERC1155/ERC721/ERC777) controlled by a counterparty inside a guarded path [E2](https://bugbountylibrary.com/r/c4%3A2024-01-renft%3AM-01.md)

## How to review
Identify the exact set the guard is supposed to protect, then check the key it actually uses. The invariant: the guard must block only the specific protected units, and no unrelated unit sharing the key may be blocked. For each guard, ask: can a party who controls the key (a token ID, a rental, a flag) cause a block on state they do not own? For exit paths, check whether the unwind depends on a token/approval the user can burn or revoke first [E1](https://bugbountylibrary.com/r/c4%3A2024-02-tapioca%3AM-11.md). For derived global state, check whether one cheap action can pin it and starve a liveness mechanism [E3](https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md).

## How finders spotted it
- Read the ERC1155 branch of Guard.sol, saw `_revertSelectorOnActiveRental` keyed only on `(from, to, tokenId)` with no per-rental accounting, then traced Stop's Reclaimer using `safeTransferFrom` to see finalization held hostage by the receiver hook [E2](https://bugbountylibrary.com/r/c4%3A2024-01-renft%3AM-01.md)
- Noticed an unrestricted burn on OTAP while the exit path relied on burning the same token; reasoned pre-burning breaks the reset invariant [E1](https://bugbountylibrary.com/r/c4%3A2024-02-tapioca%3AM-11.md)
- Reasoned across `largestTierClaimed`, tier closing, `maxFee` auction and bot profitability; noticed one claim could pin the tier open [E3](https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md)

## Variants seen
- Guard blocks all transfers of a token ID because any rental of that ID is active [E2](https://bugbountylibrary.com/r/c4%3A2024-01-renft%3AM-01.md)
- User destroys a token/approval the exit path needs, breaking the unwind and skewing weights [E1](https://bugbountylibrary.com/r/c4%3A2024-02-tapioca%3AM-11.md)
- One cheap claim pins global tier state, denying others and suppressing bots [E3](https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md)

## Impact and severity
Borrower's own tokens frozen indefinitely [E2](https://bugbountylibrary.com/r/c4%3A2024-01-renft%3AM-01.md); locked tokens unexitable and weights/discounts permanently skewed [E1](https://bugbountylibrary.com/r/c4%3A2024-02-tapioca%3AM-11.md); other users denied prizes and liveness mechanism suppressed [E3](https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md). Impact rises when the blocked party cannot recover without the counterparty, and when the pinned state is global rather than per-user.

## Evidence
- E1: https://bugbountylibrary.com/r/c4%3A2024-02-tapioca%3AM-11.md
- E2: https://bugbountylibrary.com/r/c4%3A2024-01-renft%3AM-01.md
- E3: https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md
