Quant · 2026 · Live
Polymarket Insider Detection
A scheduled task that runs every two hours. It pulls fresh Polymarket trades, scores them for insider-trading patterns, and hands the results to Claude — who reads the report, decides whether anything is real, and messages me only when something looks credible.
What it is
Polymarket lets people bet on real-world events — election outcomes, court rulings, news. Sometimes someone trades on a market clearly knowing more than they should: a fresh wallet appears, places a big position on the less obvious side of a news-sensitive contract, and after the news drops the funds vanish back to where they came from. Both the trades and the wallets are public on the blockchain, so the pattern is visible if you look.
I have a scheduled task running on Claude every two hours. It runs the detection script, sends the report into Claude, and Claude decides whether there's anything worth flagging. If yes, it messages me directly. If no, it stays quiet. I just read the alerts.
How it works
A four-phase Python pipeline runs each tick:
- Trade firehose. Pull the last window of Polymarket trades via the CLOB API; enrich each with on-chain context from Etherscan and Polygonscan.
- Behaviour scoring. Wallet age, funding path, micro-test-then-burst timing, contra-consensus direction. No single feature is decisive; together they're suggestive.
- Funding-source clustering. Graph traversal over the funding paths links wallets that share a common ancestor within N hops.
- Severity classification. P2 (noteworthy), P1 (credible), P0 (act now), based on how many flags co-occur.
Then Claude reads the result. The prompt asks it to be a sceptical second pair of eyes — discount the obvious false positives, surface only the cases where the wallet behaviour is genuinely unusual, and write me a short message if anything qualifies. If nothing does, no message. That second filter is what keeps the inbox from drowning.
Where it's at
Live and running on the 2-hour schedule. P0/P1 alerts arrive via direct message; the run logs and a
worked retrospective example sit in the repo at maduro_report_v2.md. The pipeline is
conservative by design — a P0 means "go look at this market," not "this is insider trading."
It's an early-warning system for me, not an enforcement product.