> For the complete documentation index, see [llms.txt](https://docs-v4.nftx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v4.nftx.io/contracts/collection-shutdown.md).

# Collection Shutdown

When a collection has become illiquid — dust-sized token balances spread across many holders — `CollectionShutdown` lets holders vote to liquidate the remaining NFTs through a Sudoswap auction and claim their pro-rata share of the ETH proceeds. It's the graceful exit for a collection that can no longer sustain a market.

The lifecycle is: **start** a shutdown → holders **vote** → once quorum is reached, the owner **executes** the liquidation → holders **claim** their share. Signatures and descriptions below come from the `ICollectionShutdown` interface.

## Voting lifecycle

### `start`

Triggers a shutdown. Validates that the collection is eligible, emits an event so the frontend can flag it as liquidating, and casts the caller's first vote. Quorum must be reached within a set duration or the process must restart.

```solidity
function start(address _collection) external;
```

**Access:** `nonReentrant`, `whenNotPaused`.

| Parameter     | Type      | Description                           |
| ------------- | --------- | ------------------------------------- |
| `_collection` | `address` | The collection to start shutting down |

**Returns:** None.

### `vote`

Adds the caller's vote to an active shutdown, weighted by their token balance.

```solidity
function vote(address _collection) external;
```

**Access:** `nonReentrant`, `whenNotPaused`. Reverts `ShutdownProccessNotStarted` if none is active. A holder with zero balance is removed from the vote, which prevents vote-transfer-vote replay.

| Parameter     | Type      | Description               |
| ------------- | --------- | ------------------------- |
| `_collection` | `address` | The collection to vote on |

**Returns:** None.

### `reclaimVote`

Retracts the caller's vote and returns their token, as long as quorum hasn't already been reached.

```solidity
function reclaimVote(address _collection) external;
```

**Access:** `whenNotPaused`. Reverts if quorum has passed or the caller hasn't voted.

| Parameter     | Type      | Description                           |
| ------------- | --------- | ------------------------------------- |
| `_collection` | `address` | The collection to reclaim a vote from |

**Returns:** None.

## Execution and claims

### `execute`

Once voting has reached quorum, sends the collection's Locker-held NFTs to a Sudoswap liquidation pool (a declining-price auction) and sunsets the collection.

```solidity
function execute(address _collection, uint[] calldata _tokenIds) external;
```

**Access:** `onlyOwner`, `whenNotPaused`. Reverts if quorum hasn't been reached, no token IDs are supplied, or active listings exist.

| Parameter     | Type      | Description                          |
| ------------- | --------- | ------------------------------------ |
| `_collection` | `address` | The collection address               |
| `_tokenIds`   | `uint[]`  | The token IDs to send to liquidation |

**Returns:** None.

### `claim`

Claims a holder's pro-rata share of the liquidated ETH proceeds, burning their tokens. Requires the liquidation to be complete.

```solidity
function claim(address _collection, address payable _claimant) external;
```

**Access:** `nonReentrant`, `whenNotPaused`. Reverts if the claimant has no claimable votes, the sweeper pool isn't set, or the NFTs haven't all sold.

| Parameter     | Type              | Description                                  |
| ------------- | ----------------- | -------------------------------------------- |
| `_collection` | `address`         | The collection address                       |
| `_claimant`   | `address payable` | The address claiming their liquidation share |

**Returns:** None.

### `voteAndClaim`

A gas-efficient combined path for holders who missed the voting window — votes and claims in one call.

```solidity
function voteAndClaim(address _collection) external;
```

**Access:** `whenNotPaused`. Reverts if the sweeper pool isn't set or the NFTs haven't all sold.

| Parameter     | Type      | Description            |
| ------------- | --------- | ---------------------- |
| `_collection` | `address` | The collection address |

**Returns:** None.

## Safeguards and views

### `cancel`

Cancels a shutdown that hasn't executed once the collection's total supply has risen back above the threshold — preventing a collection flagged in its infancy from being executed later, which would rug holders who joined in between.

```solidity
function cancel(address _collection) external;
```

**Access:** `whenNotPaused`. Reverts if quorum has been reached or supply is still at/below `MAX_SHUTDOWN_TOKENS`.

| Parameter     | Type      | Description            |
| ------------- | --------- | ---------------------- |
| `_collection` | `address` | The collection address |

**Returns:** None.

### `preventShutdown`

Lets an approved [Locker Manager](/contracts/supporting.md#lockermanager) flag a collection so it can't be shut down. Can't run while a shutdown is already in progress.

```solidity
function preventShutdown(address _collection, bool _prevent) external;
```

**Access:** Locker managers only.

| Parameter     | Type      | Description                                     |
| ------------- | --------- | ----------------------------------------------- |
| `_collection` | `address` | The collection being flagged                    |
| `_prevent`    | `bool`    | `true` to prevent shutdown, `false` to allow it |

**Returns:** None.

### `collectionLiquidationComplete` / `pause`

```solidity
function collectionLiquidationComplete(address _collection) external view returns (bool);
function pause(bool _paused) external;
```

| Function                        | Parameter                 | Description                                                                               |
| ------------------------------- | ------------------------- | ----------------------------------------------------------------------------------------- |
| `collectionLiquidationComplete` | `_collection` (`address`) | Returns `true` if every NFT assigned to the shutdown has been sold from the Sudoswap pool |
| `pause`                         | `_paused` (`bool`)        | `onlyOwner` — pause (`true`) or unpause (`false`) shutdown activity                       |
