# darrnhard/polymarket-smart-money architecture

> Architecture diagram of the GitHub repository darrnhard/polymarket-smart-money, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/darrnhard/polymarket-smart-money
- Repository: https://github.com/darrnhard/polymarket-smart-money

## Overview

This repository is a Polymarket smart-money research pipeline: it fetches wallet activity, stores it for reuse, then analyzes trading behavior and evaluates copy signals. The README documents adaptive pagination, checkpointing, deduplication, data validation, resolve logic, strategy analysis, cross-wallet comparison, and visual findings. Notebook source was not provided, so the workflow links below reflect README statements rather than inspected calls; generated data is gitignored and is not present in the tree.

Main entry points: [`notebooks/02_analysis.ipynb`](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb) (Data validation), [`notebooks/01_fetch.ipynb`](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/01_fetch.ipynb) (Wallet fetch), [`plots`](https://github.com/darrnhard/polymarket-smart-money/tree/main/plots) (Research visualizations), [`docs/EXECUTIVE_SUMMARY.md`](https://github.com/darrnhard/polymarket-smart-money/blob/main/docs/EXECUTIVE_SUMMARY.md) (Research findings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data ingestion"]
  node_fetch["Wallet fetch<br/>[01_fetch.ipynb]"]
  node_adaptive["Adaptive pagination<br/>[01_fetch.ipynb]"]
  node_checkpoints["Fetch checkpoints<br/>[01_fetch.ipynb]"]
  node_activity[("Activity dataset")]
end

subgraph group_analysis["Behavioral analysis"]
  node_validation["Data validation<br/>[02_analysis.ipynb]"]
  node_event_types["Event type analysis<br/>[02_analysis.ipynb]"]
  node_resolve["Resolve logic<br/>[02_analysis.ipynb]"]
  node_behavior["Behavior analysis<br/>[02_analysis.ipynb]"]
  node_strategy["Strategy analysis<br/>[02_analysis.ipynb]"]
  node_comparison["Copy signal evaluation<br/>[02_analysis.ipynb]"]
end

subgraph group_outputs["Research outputs"]
  node_visuals["Research visualizations"]
  node_findings["Research findings"]
  node_analyst["Analysis results<br/>[02_analysis.md]"]
end

node_researcher(("Researcher"))
node_data_api["Polymarket Data API"]
node_gamma_api["Polymarket Gamma API"]

node_fetch -->|"fetches activity"| node_data_api
node_fetch -->|"uses pagination"| node_adaptive
node_fetch -->|"records progress"| node_checkpoints
node_fetch -->|"writes parquet"| node_activity
node_researcher -->|"runs notebook"| node_fetch
node_researcher -->|"runs analysis"| node_validation
node_activity -->|"reads dataset"| node_validation
node_validation -->|"validates before"| node_event_types
node_validation -->|"validates before"| node_resolve
node_validation -->|"validates before"| node_behavior
node_validation -->|"validates before"| node_strategy
node_validation -->|"validates before"| node_comparison
node_comparison -.->|"requires resolutions"| node_gamma_api
node_behavior -->|"produces charts"| node_visuals
node_comparison -->|"summarized in"| node_findings
node_comparison -->|"rendered as"| node_analyst

click node_fetch "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/01_fetch.ipynb"
click node_adaptive "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/01_fetch.ipynb"
click node_checkpoints "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/01_fetch.ipynb"
click node_validation "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb"
click node_event_types "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb"
click node_resolve "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb"
click node_behavior "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb"
click node_strategy "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb"
click node_comparison "https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb"
click node_visuals "https://github.com/darrnhard/polymarket-smart-money/tree/main/plots"
click node_findings "https://github.com/darrnhard/polymarket-smart-money/blob/main/docs/EXECUTIVE_SUMMARY.md"
click node_analyst "https://github.com/darrnhard/polymarket-smart-money/blob/main/docs/02_analysis.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fetch,node_adaptive,node_checkpoints,node_activity toneBlue
class node_validation,node_event_types,node_resolve,node_behavior,node_strategy,node_comparison toneAmber
class node_visuals,node_findings,node_analyst,node_data_api,node_gamma_api toneMint
class node_researcher toneIndigo
```

## Components

### Data ingestion

- [Wallet fetch](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/01_fetch.ipynb): `notebooks/01_fetch.ipynb`
- [Adaptive pagination](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/01_fetch.ipynb): `notebooks/01_fetch.ipynb`
- [Fetch checkpoints](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/01_fetch.ipynb): `notebooks/01_fetch.ipynb`
- **Activity dataset**

### Behavioral analysis

- [Data validation](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb): `notebooks/02_analysis.ipynb`
- [Event type analysis](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb): `notebooks/02_analysis.ipynb`
- [Resolve logic](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb): `notebooks/02_analysis.ipynb`
- [Behavior analysis](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb): `notebooks/02_analysis.ipynb`
- [Strategy analysis](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb): `notebooks/02_analysis.ipynb`
- [Copy signal evaluation](https://github.com/darrnhard/polymarket-smart-money/blob/main/notebooks/02_analysis.ipynb): `notebooks/02_analysis.ipynb`

### Research outputs

- [Research visualizations](https://github.com/darrnhard/polymarket-smart-money/tree/main/plots): `plots`
- [Research findings](https://github.com/darrnhard/polymarket-smart-money/blob/main/docs/EXECUTIVE_SUMMARY.md): `docs/EXECUTIVE_SUMMARY.md`
- [Analysis results](https://github.com/darrnhard/polymarket-smart-money/blob/main/docs/02_analysis.md): `docs/02_analysis.md`

### Other components

- **Researcher**
- **Polymarket Data API**
- **Polymarket Gamma API**

## Connections

- Wallet fetch → Polymarket Data API: fetches activity (evidence: `README.md`)
- Wallet fetch → Adaptive pagination: uses pagination (evidence: `README.md`)
- Wallet fetch → Fetch checkpoints: records progress (evidence: `README.md`)
- Wallet fetch → Activity dataset: writes parquet (evidence: `README.md`)
- Researcher → Wallet fetch: runs notebook (evidence: `README.md`)
- Researcher → Data validation: runs analysis (evidence: `README.md`)
- Activity dataset → Data validation: reads dataset (evidence: `README.md`)
- Data validation → Event type analysis: validates before (evidence: `README.md`)
- Data validation → Resolve logic: validates before (evidence: `README.md`)
- Data validation → Behavior analysis: validates before (evidence: `README.md`)
- Data validation → Strategy analysis: validates before (evidence: `README.md`)
- Data validation → Copy signal evaluation: validates before (evidence: `README.md`)
- Copy signal evaluation → Polymarket Gamma API: requires resolutions (evidence: `README.md`)
- Behavior analysis → Research visualizations: produces charts (evidence: `README.md`)
- Copy signal evaluation → Research findings: summarized in (evidence: `README.md`)
- Copy signal evaluation → Analysis results: rendered as (evidence: `README.md`)
