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

# Concepts

> Core domain model, contract scaling, cash settlement, and position lifecycles in SOS-SDK.

## Option Series and Option Identity

An **Option Series** is a single tradable contract definition on Solana. Every order and lookup identifies a series using its four-field **Option Identity**:

<table>
  <colgroup>
    <col width="18%" />

    <col width="22%" />

    <col width="60%" />
  </colgroup>

  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`underlyingAsset`</td>
      <td>`AddressLike`</td>
      <td>Mint address of the underlying asset.</td>
    </tr>

    <tr>
      <td>`optionType`</td>
      <td>`OptionType`</td>
      <td>`OptionType.Call` or `OptionType.Put`.</td>
    </tr>

    <tr>
      <td>`strikePrice`</td>
      <td>`number`</td>
      <td>Strike price in USD (stored onchain as micro-USD).</td>
    </tr>

    <tr>
      <td>`expirationDate`</td>
      <td>`bigint | number`</td>
      <td>Expiration Unix timestamp in seconds.</td>
    </tr>
  </tbody>
</table>

SOS-SDK derives the `OptionAccount`, `OptionPool`, `CollateralPool`, and token mint PDAs directly from these four fields.

## Contract Units and Scaling

Onchain instructions use integer base units rather than floating-point numbers:

* **Contract quantities**: Pass quantities to builders in base units. One contract equals `1_000_000n` (`QUANTITY_UNITS_PER_CONTRACT`). Use `contractsToBaseUnits` and `baseUnitsToContracts` to convert.
* **Underlying multiplier**: One listed contract covers `100` units of the underlying (`UNDERLYING_UNITS_PER_CONTRACT`).
* **Strike prices**: Pass `strikePrice` in USD dollars to high-level builders. Internally the program stores micro-USD (`1e6`), which you can convert with `usdToMicroUsd` and `microUsdToUsd`.
* **Collateral amounts**: Pass token amounts in the Collateral Mint's base units (for example, `1e6` for 6-decimal USDC).

```ts theme={"dark"}
import {
  contractsToBaseUnits,
  usdToMicroUsd,
  QUANTITY_UNITS_PER_CONTRACT,
} from "@epicentral/sos-sdk";

const twoContracts = contractsToBaseUnits(2); // 2_000_000n
const oneContract = QUANTITY_UNITS_PER_CONTRACT; // 1_000_000n
const strikeMicroUsd = usdToMicroUsd(150); // 150_000_000n
```

## Cash Settlement and Collateral Mint

All Option Series on this program settle in cash. The **Collateral Mint** is a dollar-denominated SPL token mint (such as USDC) with at most 9 decimals, distinct from the underlying asset.

A new Option Series can be initialized only when its Collateral Mint is on the program allowlist. Both premiums and payouts move in the Collateral Mint.

## Market Participants

* **Long**: Buys contracts from an `OptionPool` by paying premium in the Collateral Mint. A Long can sell contracts back to the pool before expiration or hold until expiry settlement.
* **Short (Writer)**: Mints contracts into an `OptionPool` against collateral. The Writer earns premium when Longs buy those contracts.
* **Unsold Size**: The portion of a Writer's minted contracts not currently held by Longs. A Writer can unwind only Unsold Size. Sold contracts return to Unsold Size when Longs close back to the pool.
* **OMLP (Option Margin Liquidity Pool)**: A per-Collateral-Mint lending vault. Lenders deposit liquidity into the OMLP vault to earn interest. Writers borrow from the OMLP to collateralize leveraged Shorts.

> [!NOTE]
>
> Multi-leg net margin (`init_strategy_margin`) is disabled on the current program and returns `StrategyMarginDisabled` (`6168`). Post collateral per leg instead.

## Expiration Settlement

Expired positions settle onchain directly into each user's token account. There is no user-submitted claim transaction for expiry. A trading client reads the settled balances and account state after expiration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.