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

# User Positions Pnl 🌱

### Table Details

| Property            | Value                                    |
| ------------------- | ---------------------------------------- |
| Table Name          | `polygon.predictions.user_positions_pnl` |
| Table Status        | Beta 🌱                                  |
| Clustering Key(s)   | `user_address`                           |
| Search Optimization | `user_address`, `condition_id`           |

### Table Columns

| Column Name                  | Data Type         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| project                      | VARCHAR(16777216) | Business name of the protocol being used (e.g. `uniswap`, `aave`, `lido`, `paraswap`). Consistent across verticals — every table with a `project` column uses this field to identify the top-level protocol brand.                                                                                                                                                                                                                                                                                           |
| protocol                     | VARCHAR(16777216) | Specific version or variant of the protocol (e.g. `uniswap_v3`, `aave_v2`, `stargate_v2`). Qualifies the `project` field with version information.                                                                                                                                                                                                                                                                                                                                                           |
| user\_address                | VARCHAR(42)       | The user: payer for deposits, payee for withdrawals.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| token\_id                    | VARCHAR(16777216) | Identifier for non-fungible tokens (ERC-721) or semi-fungible tokens (ERC-1155). Each unique token\_id within a collection represents a distinct asset.                                                                                                                                                                                                                                                                                                                                                      |
| condition\_id                | VARCHAR(16777216) | Unique condition identifier for the market                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| token\_outcome               | VARCHAR(16777216) | Token outcome name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| question                     | VARCHAR(16777216) | Market question text                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| category                     | VARCHAR(16777216) | Category or classification label for this record. The specific taxonomy depends on the model context (e.g. token category, transfer category, metric category).                                                                                                                                                                                                                                                                                                                                              |
| sub\_category                | VARCHAR(16777216) | Specific subcategory                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| position\_status             | VARCHAR(16777216) | Lifecycle status - open (unresolved balance), resolved\_unredeemed (resolved balance awaiting redeem), closed (no balance).                                                                                                                                                                                                                                                                                                                                                                                  |
| bought\_usd                  | FLOAT             | Total USD spent buying outcome shares.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| sold\_usd                    | FLOAT             | Total USD received from selling outcome shares.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| bought\_units                | FLOAT             | Total outcome shares bought.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| sold\_units                  | FLOAT             | Total outcome shares sold.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| open\_units                  | FLOAT             | Outcome shares currently held (open position size).                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| open\_value\_usd             | FLOAT             | USD value of the open position at current prices.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| redeem\_payout\_usd          | FLOAT             | Direct CTF/NegRisk redeem payouts plus wrapped (pUSD) auto-redeem payouts.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| position\_pnl\_usd           | FLOAT             | Position pnl with open legs re-marked at the latest hourly price; all other rows identical to the base table.                                                                                                                                                                                                                                                                                                                                                                                                |
| n\_fills                     | NUMBER(38,0)      | Number of order fills.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| n\_orders                    | NUMBER(38,0)      | Number of distinct orders.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| first\_fill\_at              | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the first fill.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| last\_fill\_at               | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the most recent fill.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| wallet\_attribution\_quality | VARCHAR(16777216) | Owning wallet's CURRENT attribution\_quality (see flag timing caveat in the model header). Whether the pnl NUMBER is trustworthy. 'suspect' = the buy-skew + phantom-loss signature of maker-side-only fill attribution (imbalance\_ratio > 0.3 AND total\_pnl\_usd \< -\$500): a two-sided market maker whose offsetting fills executed as taker has its sell leg uncredited, so the loss is an artifact of measurement, not trading. The pnl stays populated; downstream consumers may null or exclude it. |
| wallet\_activity\_tier       | VARCHAR(16777216) | Owning wallet's CURRENT activity\_tier (see flag timing caveat in the model header). Wallet activity segmentation: casual (500). Segmentation only, never an exclusion: roughly a third of lifetime-profitable wallets exceed 500 fills, so high fill count indicates activity, not measurement error.                                                                                                                                                                                                       |
| wallet\_is\_mm\_or\_bot      | BOOLEAN           | Whether the wallet is classified as a market maker or bot.                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| wallet\_total\_pnl\_usd      | FLOAT             | Total profit and loss in USD across all the wallet's positions.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \_created\_at                | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database.                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| \_updated\_at                | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
