> ## 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.

# How Options Work

> Understand European calls and puts on prediction market YES tokens — strikes, payoffs, collateral, and option token mechanics.

Convallax issues **European cash-settled options** on the YES outcome price of a Polymarket binary market. Each option gives the holder exposure to whether a market's implied probability finishes above (call) or below (put) a chosen strike price at expiry.

## The Underlying

The underlying asset is the **YES token price** of a Polymarket binary market, denoted **S**. This price represents the market's implied probability of the event occurring:

* **S = 0** means the market prices the event at 0% probability (NO wins)
* **S = 1** means the market prices the event at 100% probability (YES wins)
* **S = 0.65** means the market prices the event at 65% probability

Convallax options settle against this price at expiry, either as a binary outcome (0 or 100) or as a continuous TWAP price.

## Calls and Puts

| Type     | You profit when...              | Payoff at expiry |
| -------- | ------------------------------- | ---------------- |
| **Call** | YES finishes **above** strike K | `max(0, S − K)`  |
| **Put**  | YES finishes **below** strike K | `max(0, K − S)`  |

<Tabs>
  <Tab title="Call option">
    A **call option** at strike K = 50¢ pays out if the YES price finishes above 50¢ at expiry.

    * If YES resolves at 80¢ → payoff = **30¢ per option** (0.80 − 0.50)
    * If YES resolves at 50¢ or below → payoff = **0** (option expires worthless)
    * If YES wins outright (S = \$1.00) → payoff = **50¢ per option** (maximum)

    **Use case:** You believe a prediction market outcome is more likely than the current price implies.
  </Tab>

  <Tab title="Put option">
    A **put option** at strike K = 60¢ pays out if the YES price finishes below 60¢ at expiry.

    * If YES resolves at 30¢ → payoff = **30¢ per option** (0.60 − 0.30)
    * If YES resolves at 60¢ or above → payoff = **0** (option expires worthless)
    * If NO wins outright (S = \$0.00) → payoff = **60¢ per option** (maximum)

    **Use case:** You believe a prediction market outcome is less likely than the current price implies.
  </Tab>
</Tabs>

## Strikes

Strikes are quoted in cents and available in **5¢ increments** from 5¢ to 95¢:

```
5¢, 10¢, 15¢, 20¢, 25¢, 30¢, ... , 85¢, 90¢, 95¢
```

On-chain, strikes are stored as \*\*basis points of $1** (`strikeBps`), where 50 bps = $0.50. The full strike grid gives traders granular control over their risk/reward profile.

## Long vs Short

| Position           | Action                           | Risk                                    | Reward                         |
| ------------------ | -------------------------------- | --------------------------------------- | ------------------------------ |
| **Long** (buyer)   | Pay premium upfront              | Limited to premium paid                 | Up to max payoff minus premium |
| **Short** (writer) | Receive premium, post collateral | Up to max payoff minus premium received | Limited to premium received    |

* **Buying** options gives leveraged exposure with capped downside — you can never lose more than the premium.
* **Writing** (selling) options earns premium income but requires posting USDC collateral to cover the worst-case payout.

## Option Tokens (ERC-1155)

Each option series is represented as an **ERC-1155 token** on Polygon with 6 decimal places (matching USDC precision). The token ID equals the series ID, which is derived deterministically:

```solidity theme={null}
seriesId = uint256(keccak256(abi.encode(conditionId, yesClobTokenId, strikeBps, expiry, optionType)))
```

| Parameter        | Description                                          |
| ---------------- | ---------------------------------------------------- |
| `conditionId`    | Polymarket market condition ID (bytes32)             |
| `yesClobTokenId` | Polymarket YES CLOB token ID (uint256)               |
| `strikeBps`      | Strike price in basis points of $1 (e.g. 50 = $0.50) |
| `expiry`         | Unix timestamp of option expiry                      |
| `optionType`     | 0 = Call, 1 = Put                                    |

Only the `ConvallaxCore` contract can mint and burn option tokens. Tokens are freely transferable via standard ERC-1155 transfers.

## Collateral

The **writer** is whoever posts collateral when a trade fills — the maker on a long trade, the taker on a short trade. Collateral is locked atomically at fill time via `ConvallaxCore.mintFor`; there is no pre-minting or held inventory. The writer must post USDC collateral equal to the **maximum possible holder payout** for the options minted. The on-chain formula (in `OptionMath.requiredCollateral`):

```
Call:  collateral = amount × (100 − strikeBps) / 100
Put:   collateral = amount × strikeBps / 100
```

Where `amount` is in 6-decimal raw units (matching USDC precision).

| Type     | Collateral per whole option                                        |
| -------- | ------------------------------------------------------------------ |
| **Call** | `(100 − strikeBps) / 100` USDC — the max call payoff if S = \$1.00 |
| **Put**  | `strikeBps / 100` USDC — the max put payoff if S = \$0.00          |

<Accordion title="Worked example: 10 call options at K = 50¢">
  * Strike: 50¢ (strikeBps = 50)
  * Collateral per option: (100 − 50) / 100 = **\$0.50**
  * Raw amount: 10 × 1,000,000 = 10,000,000
  * Raw collateral: 10,000,000 × 50 / 100 = **5,000,000** (= 5.00 USDC)

  At fill, the writer's 5 USDC is locked in `ConvallaxCore` and 10 call option tokens (ERC-1155) are minted to the holder.
</Accordion>

<Accordion title="Worked example: 5 put options at K = 60¢">
  * Strike: 60¢ (strikeBps = 60)
  * Collateral per option: 60 / 100 = **\$0.60**
  * Raw amount: 5 × 1,000,000 = 5,000,000
  * Raw collateral: 5,000,000 × 60 / 100 = **3,000,000** (= 3.00 USDC)

  At fill, the writer's 3 USDC is locked and 5 put option tokens are minted to the holder.
</Accordion>

## Premium Bounds

The premium (price) of an option is bounded by the maximum payoff:

* **Call premium** must be ≤ `1 − K` (the max call payoff)
* **Put premium** must be ≤ `K` (the max put payoff)

This ensures no-arbitrage: you never pay more for an option than the most it could ever pay out.

## Units and Decimals

| Quantity            | Decimals            | Example                          |
| ------------------- | ------------------- | -------------------------------- |
| USDC                | 6                   | `1,000,000` raw = 1.00 USDC      |
| Option tokens       | 6                   | `1,000,000` raw = 1 whole option |
| Strike / resolution | basis points of \$1 | `50` = \$0.50                    |
