> ## Documentation Index
> Fetch the complete documentation index at: https://docs.convallax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# claimWriterCollateral()

> Reclaim remaining USDC collateral after an option series you wrote has been settled.

Reclaim the remaining USDC collateral for options you wrote after the series has been settled. The **writer** is whoever posted collateral when the trade filled — the maker on a long trade (`makerSelling = true`) and the taker on a short trade (`makerSelling = false`). The payout is the writer's original collateral minus the portion allocated to holder payouts.

**Contract:** `ConvallaxCore` — `0x76c41a03e0993F0261bB3B1949320cA693f76faE`

## Function Signature

```solidity theme={null}
function claimWriterCollateral(uint256 seriesId) external
```

## Parameters

<ParamField body="seriesId" type="uint256" required>
  The settled option series ID.
</ParamField>

## Payout Calculation

```
writerPayout = writerCollateral × writerPoolRemaining / totalCollateral
```

Where `writerPoolRemaining = totalCollateral − holderPool` (total collateral minus all holder payouts).

<Warning>
  This is a **one-shot** operation. The writer's recorded collateral is zeroed after claiming. Call it once per series.
</Warning>

## Prerequisites

* The series must be **settled**
* The caller must have posted collateral for this series at fill time (recorded by `ConvallaxCore.mintFor` when the trade executed)
* The caller's recorded collateral must be greater than zero

## Example

```javascript theme={null}
const core = new ethers.Contract(
  '0x76c41a03e0993F0261bB3B1949320cA693f76faE',
  ['function claimWriterCollateral(uint256 seriesId) external'],
  signer
);

const tx = await core.claimWriterCollateral(seriesId);
await tx.wait();
```
