# Payouts and Pricing Intuition

### Max Payout (bounded structures)

```
Max Payout = Strike Width × Number of Contracts
```

#### Strike Width by Type

* **Spreads (2 strikes):**

  ```ts
  const [k1, k2] = order.strikes.map(s => s / 1e8);
  const width = Math.abs(k2 - k1);
  ```
* **Butterflies (3 strikes):**

  ```ts
  const [lo, mid, hi] = order.strikes.map(s => s / 1e8);
  const width = mid - lo; // symmetric
  ```
* **Condors (4 strikes):**

  ```ts
  const k = order.strikes.map(s => s / 1e8);
  const width = k[1] - k[0]; // simplified
  ```

### Payout at Settlement (simplified, untested)

```ts
function payoutAtPrice(order, numContracts, S) {
  const K = order.strikes.map(s => s / 1e8);
  const isCall = order.isCall;

  if (K.length === 2) { // spreads
    const [L, U] = K;
    if (isCall) {
      if (S <= L) return 0;
      if (S >= U) return (U - L) * numContracts;
      return (S - L) * numContracts;
    } else {
      if (S >= U) return 0;
      if (S <= L) return (U - L) * numContracts;
      return (U - S) * numContracts;
    }
  }

  if (K.length === 3) { // butterflies
    const [L, M, U] = K; const w = M - L;
    if (S <= L || S >= U) return 0;
    if (S === M) return w * numContracts;
    return (S < M)
      ? ((S - L) / w) * w * numContracts
      : ((U - S) / w) * w * numContracts;
  }

  if (K.length === 4) { // condors
    const [K1, K2, K3, K4] = K;
    const max = (K2 - K1) * numContracts; // simplified
    if (S <= K1 || S >= K4) return 0;
    if (S >= K2 && S <= K3) return max;
    if (S < K2) return ((S - K1) / (K2 - K1)) * max;
    return ((K4 - S) / (K4 - K3)) * max;
  }

  return 0;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thetanuts.finance/for-builders/payouts-and-pricing-intuition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
