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

# polymarket_polygon.combo_details

> Polymarket Combos metadata — one row per combo outcome token with expanded legs, generated names, and resolution status.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

The `polymarket_polygon.combo_details` table is the dimension table for Polymarket **Combos** (multi-leg parlays): one row per combo outcome token — a YES and a NO row per combo, the same grain as `market_details`, so any token ID joins either dimension the same way. Left join it onto `combo_trades` / positions on `token_id`.

The YES token pays out only if every leg wins. Legs are expanded and labeled inline: `combo_name` / `leg_names` are generated from the legs' questions and outcomes and stay NULL unless every leg is labeled. Per share, the YES side pays the product of the legs' payout fractions and NO pays 1 minus that — so the combo is decided as soon as any leg loses, and NO holders can redeem before the remaining legs resolve.

## Table Schema

| Column                    | Type             | Description                                                                                                                                                                          |
| ------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `token_id`                | `UINT256`        | v3 PositionManager token ID of this side of the combo (combo condition × 256 + outcome index); joins `combo_trades.asset_id`                                                         |
| `outcome_index`           | `INTEGER`        | Side of this row: 0 = YES, 1 = NO                                                                                                                                                    |
| `token_outcome`           | `VARCHAR`        | Side of this row as label: `Yes` (pays out only if every leg wins) or `No`                                                                                                           |
| `combo_condition_id`      | `VARBINARY`      | Combo condition ID (bytes31); two rows share it (YES and NO)                                                                                                                         |
| `combo_condition_id_uint` | `UINT256`        | Combo condition ID as uint256 (= `token_id / 256`)                                                                                                                                   |
| `combo_name`              | `VARCHAR`        | Generated name: `question: outcome AND question: outcome ...` in leg order; NULL unless every leg has question and outcome labels                                                    |
| `token_outcome_name`      | `VARCHAR`        | `Yes-`/`No-` + `combo_name`, mirroring `market_details.token_outcome_name`; NULL until every leg is labeled                                                                          |
| `leg_names`               | `ARRAY(VARCHAR)` | Per-leg labels (`question: outcome`) in leg order; entries are NULL for unlabeled legs (v3-native or API-lagged markets)                                                             |
| `legs`                    | `ARRAY(UINT256)` | Ordered on-chain legs array (leg position IDs)                                                                                                                                       |
| `leg_count`               | `BIGINT`         | Number of legs                                                                                                                                                                       |
| `labeled_leg_count`       | `BIGINT`         | Number of legs with question and outcome labels; `combo_name` is NULL unless this equals `leg_count`                                                                                 |
| `legs_resolved_count`     | `BIGINT`         | Number of legs whose underlying condition has resolved on-chain                                                                                                                      |
| `lost_leg_count`          | `BIGINT`         | Number of legs that resolved against the combo; a single lost leg decides the combo as `no`                                                                                          |
| `is_resolved`             | `BOOLEAN`        | TRUE once the combo's outcome is known: any leg lost, or every leg resolved                                                                                                          |
| `combo_outcome`           | `VARCHAR`        | How the combo resolved (same on both rows): `yes` when every leg won, `no` when any leg lost, `partial` when a 50/50-resolved leg leaves the payout fractional; NULL while undecided |
| `settlement_value`        | `DOUBLE`         | What THIS side settled at per share: the YES row pays the product of the legs' payout fractions, the NO row pays 1 minus that. NULL while undecided                                  |
| `resolved_at`             | `TIMESTAMP`      | Time the outcome became known: the first lost leg's resolution, or the last leg's resolution when all legs resolved; NULL while undecided                                            |
| `created_at`              | `TIMESTAMP`      | Block time the combo was registered on-chain                                                                                                                                         |
| `block_number`            | `BIGINT`         | Block number the combo was registered in                                                                                                                                             |
| `evt_index`               | `INTEGER`        | Event index of the registration event                                                                                                                                                |
| `tx_hash`                 | `VARBINARY`      | Transaction that registered the combo                                                                                                                                                |
| `_updated_at`             | `TIMESTAMP`      | Time this row was last (re)computed                                                                                                                                                  |

## Table sample

<TableSample tableSchema="polymarket_polygon" tableName="combo_details" />

## Example query

```sql theme={null}
-- Most-traded labeled combos, with legs
SELECT
  d.combo_name,
  d.leg_count,
  SUM(t.amount) AS volume_usd
FROM polymarket_polygon.combo_trades t
JOIN polymarket_polygon.combo_details d
  ON t.asset_id = d.token_id
WHERE t.is_taker_side
  AND d.combo_name IS NOT NULL
GROUP BY 1, 2
ORDER BY 3 DESC
LIMIT 20
```
