# It is possible to prevent the execution of the `execute()` function, listing only one NFT.

Anyone can list a single NFT of a collection after shutdown quorum is reached, making CollectionShutdown.execute() revert and blocking collection deletion.

- Payout: Audit contest
- Severity: medium
- Program: Flayer
- Found by: Audinarey
- Disclosed: 2024-08-06
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-08-flayer-judging/issues/244
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-08-flayer%3AM-9
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:solidity technique:chained vuln:business-logic vuln:dos

**Target:** CollectionShutdown / Listings contracts
**Root cause:** execute() calls _hasListing() and reverts if any token of the collection is listed; Listings.createListings has no guard against collections pending shutdown, so a single listing blocks execution.
**Steps:**
1. Reach quorum via CollectionShutdown.start() for a collection
2. Attacker calls `listings.createListings(...)` with one tokenId of that collection
3. Owner calls `collectionShutdown.execute(collection, tokenIds)`
4. Reverts at `_hasListing()` check because a listing now exists
**How found:** Code reading of execute()'s _hasListing() precondition and noticing Listings has no shutdown-state guard, enabling a trivial front-run.
**Exploitation:** Attacker holding one NFT of the collection front-runs execute() by listing it, permanently blocking the shutdown vote from executing; no value extracted, griefing/DoS only.
**Insight:** When a privileged action has a precondition like 'no active listings', check whether an unprivileged user can cheaply create that state to grief the action; look for missing cross-contract state guards between shutdown/listing modules.

