> ## 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 Pnl 🌱

### Table Details

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

### 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.                                                                                                                                                                                                                                                                                                                                                              |
| creation\_type                  | VARCHAR(16777216) | Type of wallet creation (MagicLink or GnosisSafe)                                                                                                                                                                                                                                                                                                                                                                 |
| owner\_eoa                      | VARCHAR(42)       | Controlling externally-owned account (EOA) of the Polymarket proxy, from the deterministic ProxyCreation event (1:1). Null for MagicLink wallets, which have no on-chain owner event.                                                                                                                                                                                                                             |
| owner\_source                   | VARCHAR(16777216) | Method used to resolve the proxy wallet to its owner EOA.                                                                                                                                                                                                                                                                                                                                                         |
| first\_funder\_eoa              | VARCHAR(42)       | First EOA that funded this wallet.                                                                                                                                                                                                                                                                                                                                                                                |
| funder\_entity                  | VARCHAR(16777216) | Entity attribution of the wallet's first funder.                                                                                                                                                                                                                                                                                                                                                                  |
| funder\_label                   | VARCHAR(16777216) | Label of the wallet's first funder.                                                                                                                                                                                                                                                                                                                                                                               |
| total\_pnl\_usd                 | FLOAT             | Lifetime profit/loss in USD by the unified share-flow method: SUM(position pnl) + merge inflow - split outflow + wrapped auto-redeem payouts. Open positions are included at their latest snapshot mark.                                                                                                                                                                                                          |
| trade\_buy\_usd                 | FLOAT             | USD paid buying outcome tokens (maker-side fills).                                                                                                                                                                                                                                                                                                                                                                |
| trade\_sell\_usd                | FLOAT             | USD received selling outcome tokens (maker-side fills).                                                                                                                                                                                                                                                                                                                                                           |
| redeem\_payout\_usd             | FLOAT             | Direct CTF/NegRisk redeem payouts plus wrapped (pUSD) auto-redeem payouts.                                                                                                                                                                                                                                                                                                                                        |
| merge\_inflow\_usd              | FLOAT             | Collateral received from merging full outcome-token sets.                                                                                                                                                                                                                                                                                                                                                         |
| split\_outflow\_usd             | FLOAT             | Collateral spent splitting into full outcome-token sets.                                                                                                                                                                                                                                                                                                                                                          |
| residual\_portfolio\_value\_usd | FLOAT             | Open positions marked to the latest daily snapshot price (resolved winners at $1, losers at $0).                                                                                                                                                                                                                                                                                                                  |
| turnover\_usd                   | FLOAT             | trade\_buy\_usd + trade\_sell\_usd.                                                                                                                                                                                                                                                                                                                                                                               |
| imbalance\_ratio                | FLOAT             | /trade\_buy\_usd - trade\_sell\_usd/ / (trade\_buy\_usd + trade\_sell\_usd). Values near 1 with large negative pnl are the maker-side attribution artifact flagged by attribution\_quality.                                                                                                                                                                                                                       |
| total\_fills                    | NUMBER(38,0)      | Lifetime maker-side OrderFilled fills across all markets.                                                                                                                                                                                                                                                                                                                                                         |
| total\_orders                   | NUMBER(38,0)      | Distinct order hashes behind those fills.                                                                                                                                                                                                                                                                                                                                                                         |
| legs                            | NUMBER(38,0)      | Number of distinct wallet x token positions (one row in the positions layer) the wallet has ever held via fills.                                                                                                                                                                                                                                                                                                  |
| markets                         | NUMBER(38,0)      | Distinct markets (condition\_ids) ever traded.                                                                                                                                                                                                                                                                                                                                                                    |
| open\_legs                      | NUMBER(38,0)      | Positions currently open (unresolved, balance > 0).                                                                                                                                                                                                                                                                                                                                                               |
| unredeemed\_legs                | NUMBER(38,0)      | Positions resolved but not yet redeemed (balance > 0).                                                                                                                                                                                                                                                                                                                                                            |
| attribution\_quality            | VARCHAR(16777216) | 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. |
| activity\_tier                  | VARCHAR(16777216) | 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.                                                                                                                                                                                                 |
| is\_mm\_or\_bot                 | BOOLEAN           | True = the wallet matches the market-maker / bot signature, in one predicate: total\_fills > 500 OR (imbalance\_ratio > 0.3 AND total\_pnl\_usd \< -\$500). total\_pnl\_usd is low confidence for these wallets - exclude them for retail-only or leaderboard-style analysis. Composed from attribution\_quality and activity\_tier.                                                                              |
| two\_sided\_conditions          | NUMBER(38,0)      | Count of distinct conditions in which the wallet traded more than one outcome token (both trade legs). A market-maker signal: high counts indicate two-sided MM activity that maker-side attribution mis-prices. Surfaced for filtering; does not gate total\_pnl\_usd (is\_mm\_or\_bot remains the reliability gate).                                                                                            |
| first\_trade\_at                | TIMESTAMP\_NTZ(9) | Timestamp of the wallet's first fill.                                                                                                                                                                                                                                                                                                                                                                             |
| last\_trade\_at                 | TIMESTAMP\_NTZ(9) | Timestamp of the wallet's last fill.                                                                                                                                                                                                                                                                                                                                                                              |
| \_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.                                                                                                                                                                                                                                                                                                                                                     |
