StakeBench / raw /README.md
greenday123's picture
Add StakeBench v1.1.2: raw
7bd46af verified
|
Raw History Blame Contribute Delete
7.96 kB
# StakeBench raw collection files (added in v1.1)
This folder contains the unmodified outputs of the collection scripts, before the cleaning
steps that produce `polymarket/comments_clean.csv`, `polymarket/positions_clean.csv`,
`manifold/comments_clean.csv` and `manifold/positions_clean.csv`. They are released so that
the market-level cleaning and the benchmark instance filters can be audited and re-run under
other thresholds. All files are UTF-8 without BOM. Collection scripts and cleaning scripts
are in the code repository under `collection/`
(https://github.com/PEIYUNHUA/stakebench_code_NeurIPS26).
## Files
| File | Rows | Size | Produced by | Content |
|---|---|---|---|---|
| `polymarket/valid_topics.jsonl` | 22,240 events | 40 MB | `get_polymarket_topics.py` | Every closed Polymarket event with total volume >= $10,000 and event-level comment count >= 100, with its member markets (`market_id`, `slug`, `question`, `condition_id`, `volume`, `clob_token_ids`, `end_date`, `resolution`) and the highest-volume market as `best_market`. `polymarket/topics_summary.csv` in the main folder is the flat summary of this file. |
| `polymarket/comments.csv` | 514,314 | 357 MB | `get_polymarket_comments.py` | Comment crawl output with the commenter's reconstructed position at comment time. Same columns as `comments_clean.csv` plus `category` (always empty; the Gamma API does not return it). Covers 2,070 markets and 24,909 wallets, May 2024 to Mar 2026. |
| `polymarket/user_positions.csv` | 907,375 | 303 MB | `get_polymarket_position.py` | Activity records from `data-api.polymarket.com/activity` for the 12,771 proxy wallets that hold a position in `comments_clean.csv`, restricted to the 2,056 condition IDs of the comment markets. Includes `TRADE`, `REDEEM`, `MERGE` and `SPLIT` records; Jan 2024 to Dec 2025 (Unix timestamps). |
| `manifold/valid_markets.jsonl` | 6,083 markets | 3.6 MB | `get_manifold_topics.py` | Every resolved binary Manifold market with volume >= M$10,000, >= 50 unique bettors and at least one comment. `resolution` is YES (2,380), NO (3,528), CANCEL (137) or MKT (38). `manifold/markets_summary.csv` in the main folder is the flat summary of this file. |
| `manifold/comments.csv` | 119,805 | 55 MB | `get_manifold_comments.py` | Comment crawl output for the 2,926 YES/NO markets that returned at least 10 comments, with each commenter's position at comment time reconstructed from their bets. Original column names (`user_id`, `user_name`, `position_mana`, `likes`); `reply_count` is empty and is back-calculated during cleaning. 6,205 users, Jan 2022 to Mar 2026. |
| `manifold/user_positions.csv` | 590,904 | 168 MB | `get_manifold_position.py` | Bet records from `api.manifold.markets/v0/bets` for the 2,799 users that hold a position in `comments_clean.csv`, restricted to the 191 cleaned markets; includes redemption and cancelled bets (`is_redemption`, `is_cancelled`). Dec 2021 to Mar 2026. |
Row counts exclude the header line. Comment texts contain newlines, so `wc -l` does not give
the row count; use a CSV reader.
## How the cleaned files are derived
| Cleaned file | From | Steps (`collection/clean_*.py`) |
|---|---|---|
| `polymarket/comments_clean.csv` (514,282 rows) | `raw/polymarket/comments.csv` | drop the empty `category` column; drop markets with an empty question or fewer than 10 comments; reorder columns. Applied to the released raw file these steps remove no rows (all 514,314 rows pass, which is the count in Table 1 of the paper). The shipped cleaned file, unchanged in content since v1.0, has 32 fewer rows (two comments in each of 16 markets, mostly Series-pooled MLB game markets that carry the same two comment IDs) and was written with a different encoding; see the encoding note below. |
| `manifold/comments_clean.csv` (46,562 rows, 191 markets) | `raw/manifold/comments.csv` | back-calculate `reply_count` from `parent_comment_id`; rename `user_id -> user_address`, `user_name -> pseudonym`, `position_mana -> position_size`, `likes -> reaction_count`; drop markets with an empty question or fewer than 100 comments. |
| `polymarket/positions_clean.csv` (862,539 rows) | `raw/polymarket/user_positions.csv` | keep `TRADE` records in the comment markets; compute the running position after each trade (`position_side`, `position_shares`, `position_size`, `yes_cum_shares`, `no_cum_shares`, `potential_arbitrage`, `market_price`, `position_market_value`). |
| `manifold/positions_clean.csv` (387,262 rows) | `raw/manifold/user_positions.csv` | keep bets with `is_redemption == False` and `is_cancelled == False` in the cleaned markets; compute the same running-position columns. |
The 2,469 Polymarket markets reported as "comment-crawl input" in the paper are the
`best_market_id` entries of the summary file as it stood when the crawl was run
(`polymarket/progress.json` in the collection output: 2,070 `done`, 399 `skipped` for fewer than
10 comments). All 2,469 have an event-level comment count of at least 5,018. The released
`valid_topics.jsonl` and `topics_summary.csv` are the full 22,240-event list at the documented
thresholds (volume >= $10,000, comments >= 100). For Manifold, the crawl visited the 5,908 YES/NO
markets of `valid_markets.jsonl`; 2,926 returned at least 10 comments and 2,982 were skipped.
## Encoding note for `polymarket/comments_clean.csv`
`raw/polymarket/comments.csv` is UTF-8 and keeps all characters. The cleaned Polymarket file
was originally written in GB18030, and characters outside that code page, mainly emoji, were
written as `?` (13,433 of its rows differ from the raw text for this reason). The Google Drive
release (1.1.1) still carries that GB18030 file; in this Hugging Face release (1.1.2) the file,
like `polymarket/market_attrs.csv`, has been re-encoded to UTF-8 without any other change, so
the `?` substitutions remain. The evaluation code reads the Drive file with `encoding="latin1"`,
so the models saw mojibake for non-ASCII punctuation (for example `he¡¯s` for `he's`) in those
rows; this is the input the reported results were obtained on. For analyses that need the
original text, join `raw/polymarket/comments.csv` on `market_id`, `comment_id` and `created_at`.
## Column reference for files not described in the main README
`polymarket/user_positions.csv`: `proxy_wallet`, `timestamp` (Unix seconds), `conditionId`,
`type` (TRADE / REDEEM / MERGE / SPLIT), `side` (BUY / SELL), `outcome`, `outcomeIndex`,
`size` (shares), `usdcSize` (USD), `price`, `transactionHash`, `title`, `slug`, `eventSlug`.
`manifold/user_positions.csv`: `user_id`, `username`, `bet_id`, `created_at` (ISO 8601),
`contract_id`, `slug`, `question`, `outcome` (YES / NO), `amount` (Mana, signed), `shares`
(signed), `prob_before`, `prob_after`, `is_redemption`, `is_cancelled`, `is_filled`.
`polymarket/valid_topics.jsonl` (one event per line): `event_id`, `event_title`, `series_id`,
`comment_count`, `total_volume`, `market_count`, `markets` (list, see above), `best_market`,
`category` (keyword-assigned at collection time; the benchmark uses `category_validated` from
the comment files instead).
`manifold/valid_markets.jsonl` (one market per line): `market_id`, `slug`, `question`,
`outcome_type`, `category`, `resolution`, `resolution_time`, `close_time`, `created_time`
(Unix milliseconds), `volume`, `unique_bettors`, `total_liquidity`, `last_comment_time`,
`creator_id`, `creator_username`, `url`.
## Sensitive information
The raw files contain the same identifier types as the cleaned files and nothing else:
Polymarket wallet addresses and display names, Manifold user IDs and usernames, market creator
usernames, and on-chain transaction hashes, all publicly visible on the platforms. The raw
Manifold comment file covers more markets and users than the cleaned file (2,926 markets,
6,205 users). The statements in the main README under *Responsible AI Statement* apply
unchanged; do not attempt to de-anonymise users.