# Shared cooldown or limit blocks all users

Per-caller cooldown, cap or interval on a shared contract address that one actor can exhaust for everyone

_Area: Smart contract access control and control flow. Seen in 2 disclosed reports; latest 2023-01-27. Updated 2026-11-09._

## How it works
A limit is written as if each user were a separate caller, but the integrating contract aggregates many users under one address. The upstream protocol enforces the limit per caller (per contract address), so the limit becomes a single shared lock: any one action through the aggregator consumes the window for every user behind it. The broken assumption is "caller == user"; when caller is a shared contract, a per-user restriction is really a global one, and anyone who can trigger the restricted action can hold it shut.

## Where it shows up
- Your contract calls an external protocol that enforces cooldown, rate limit, or interval per address (unstake cooldowns, withdrawal delays, per-block quote limits).
- A public or permissionless function writes a timestamp/block number into a shared slot that a later `require` compares against another entry.
- State derived from any single user action (e.g. a "largest tier claimed" marker) that gates a liveness mechanism like keeper/bot claiming.
- Caps or intervals checked against `msg.sender` where `msg.sender` is your contract, not the end user.

## How to review
Identify every external limit your contract is subject to and ask: is the unit of that limit the end user or my contract address? The invariant that must hold: no single actor's action may make another user's legitimate call revert or become unprofitable. Concretely, check that (a) per-caller limits upstream are not shared across your users, or that the restricted path cannot be triggered cheaply by a third party; (b) any `require` comparing two stored timestamps/blocks cannot be forced to compare equal values within one block; (c) state that gates a liveness-dependent mechanism cannot be pinned open or closed by one cheap action. Estimate the cost to an attacker of blocking one user's action versus the harm.

## How finders spotted it
- Read the upstream protocol's cooldown logic, then noticed the integrating contract aggregates many users under one address, turning a per-user cooldown into a shared global lock; modeled failure probability and griefing cost from gas history [E1](https://bugbountylibrary.com/r/c4%3A2022-11-redactedcartel%3AH-01.md).
- Reasoned about how a single claim sets a tier marker, how tier closing interacts with a fee auction, and whether one cheap claim could pin the tier open and starve bots [E2](https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md).
- Code reading: saw a public function writes `blockProduced=block.number`, traced the interval `require` up through the call chain, and asked whether two calls in one block make the subtraction zero [E3](https://bugbountylibrary.com/r/c4%3A2022-01-behodler%3AM-07.md).

## Variants seen
- Upstream per-caller cooldown shared by an aggregator contract, blocking all redeem calls [E1](https://bugbountylibrary.com/r/c4%3A2022-11-redactedcartel%3AH-01.md).
- Single user action pinning derived state open, suppressing keeper/bot liveness [E2](https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md).
- Public function writing a block number twice in one block, making an interval check fail and blocking migration [E3](https://bugbountylibrary.com/r/c4%3A2022-01-behodler%3AM-07.md).

## Impact and severity
Denial of service on core user functions: redemption blocked for all users at low griefing cost [E1](https://bugbountylibrary.com/r/c4%3A2022-11-redactedcartel%3AH-01.md); prize claiming suppressed and users denied prizes [E2](https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md); migrations fully blocked [E3](https://bugbountylibrary.com/r/c4%3A2022-01-behodler%3AM-07.md). Impact rises when the block is cheap, permissionless, and hits a liveness-dependent path; organic volume alone can trigger it [E1](https://bugbountylibrary.com/r/c4%3A2022-11-redactedcartel%3AH-01.md).

## Evidence
- E1: https://bugbountylibrary.com/r/c4%3A2022-11-redactedcartel%3AH-01.md
- E2: https://bugbountylibrary.com/r/c4%3A2023-07-pooltogether%3AM-15.md
- E3: https://bugbountylibrary.com/r/c4%3A2022-01-behodler%3AM-07.md
