Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Polymarket Auto-Trader

Autonomous Polymarket prediction market trading agent. Scans markets, evaluates probabilities with LLM, sizes positions with Kelly criterion, and executes trades via CLOB API. Use when user wants to trade on Polymarket, set up automated prediction market trading, or build a trading bot. Supports cron-based autonomous operation, P&L tracking, and budget management.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
10 · 2.3k · 13 current installs · 15 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill claims to scan markets, ask an LLM for probability estimates, size positions, and place orders via the Polymarket CLOB API. The required env vars (PRIVATE_KEY for signing trades and LLM_API_KEY for Anthropic calls) and included scripts directly implement that functionality. The only minor mismatch: registry metadata marks LLM_API_KEY as the primary credential even though PRIVATE_KEY is the highest-privilege secret for trading.
Instruction Scope
Runtime instructions are focused on trading: set up a non-US VPS, install Python packages, store PRIVATE_KEY and LLM_API_KEY in /opt/trader/app/.env, run approval and trading scripts, and set a cron job. The instructions explicitly tell you to store the private key on disk and to approve MAX_UINT for several contracts (standard for DeFi but high-risk). There are no hidden network endpoints beyond Polymarket, Gamma API, Anthropic, and the Polygon RPC endpoints.
Install Mechanism
No remote arbitrary downloads are used. setup_vps.sh installs pinned Python packages from PyPI (py-clob-client, web3, python-dotenv, requests). The included setup script and pinned versions make the install path transparent and traceable.
Credentials
Only two environment variables are required (PRIVATE_KEY and LLM_API_KEY), which is proportionate to a trading bot. However, PRIVATE_KEY provides full control of the wallet and must be treated as a highly privileged secret; the skill also designates the LLM key as the primary credential in metadata, which is a minor inconsistency but not malicious.
Persistence & Privilege
The skill is not force-enabled (always:false) and does not request modifications to other skills or global agent settings. It is designed to be run persistently via user-configured cron on a VPS (normal for trading bots).
Assessment
This package appears to do what it says (an autonomous Polymarket trader), but it requires your wallet private key — which if leaked or misused will allow theft of funds. Before installing or running: 1) Create and use a dedicated, funded-with-minimum wallet (do not use your main wallet). 2) Review the contract addresses in references/contract-addresses.md to confirm they are legitimate. 3) Consider alternatives to storing the raw PRIVATE_KEY in plaintext (use a hardware signer or a secure key manager if possible). 4) Test on very small amounts ($5–$10) and monitor cron logs and P&L outputs closely. 5) Understand and accept the risk of approving MAX_UINT allowances (these grant broad spending rights to the contracts). 6) Verify the py-clob-client and web3 package versions and source (PyPI) and inspect create_or_derive_api_creds behavior if you care where derived credentials are stored. 7) If you want less exposure, modify scripts to use a signing service or ephemeral keys and to avoid storing private keys on disk. If you are not comfortable with these steps or with running code that can move funds, do not install or run this skill.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.1
Download zip
latestvk97d2hc83z03n247ctjkcjqc7s80zghf

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

EnvPRIVATE_KEY, LLM_API_KEY
Primary envLLM_API_KEY

SKILL.md

Polymarket Auto-Trader

Fully autonomous prediction market trading agent for Polymarket. Evaluates markets using LLM probability estimation, sizes positions with Kelly criterion, and executes trades via the Polymarket CLOB API from a non-US VPS.

Prerequisites

  • Non-US VPS — Polymarket blocks US IPs. Use DigitalOcean Amsterdam, Hetzner EU, etc.
  • Polygon wallet with USDC.e (bridged USDC, NOT native USDC)
  • MATIC for gas (~0.1 MATIC sufficient for hundreds of trades)
  • Anthropic API key (uses Haiku at ~$0.001/evaluation)

Setup

1. VPS Environment

SSH into your non-US VPS and run:

python3 {baseDir}/scripts/setup_vps.sh

Or manually:

apt update && apt install -y python3 python3-venv
python3 -m venv /opt/trader
/opt/trader/bin/pip install py-clob-client python-dotenv web3 requests

2. Configuration

Create /opt/trader/app/.env:

PRIVATE_KEY=<your-polygon-wallet-private-key>
LLM_API_KEY=<your-anthropic-api-key>

3. Blockchain Approvals

Before trading, approve USDC.e and CTF tokens for Polymarket contracts. Run:

python3 {baseDir}/scripts/approve_contracts.py

Required approvals (6 total):

  • USDC.e → CTF Exchange, Neg Risk Exchange, Neg Risk Adapter
  • CTF → CTF Exchange, Neg Risk Exchange, Neg Risk Adapter

4. Deploy Trading Script

cp {baseDir}/scripts/run_trade.py /opt/trader/app/
cp {baseDir}/scripts/pnl_tracker.py /opt/trader/app/

5. Cron Automation

crontab -e
# Add: */10 * * * * cd /opt/trader/app && /opt/trader/bin/python3 run_trade.py >> cron.log 2>&1

How It Works

  1. Market Scan — Fetches active markets from Gamma API, filters by liquidity and time horizon
  2. LLM Evaluation — Asks Claude Haiku to estimate true probability for each market
  3. Edge Detection — Compares LLM fair value vs market price (min 5% edge threshold)
  4. Kelly Sizing — Half-Kelly criterion with 25% max position size cap
  5. Order Execution — Places limit orders via CLOB API with GTC (good-till-cancelled)
  6. Dedup — Tracks all trades in trades.jsonl, skips already-traded markets
  7. Budget Control — Tracks LLM inference costs separately from trading capital

Trading Parameters

Configurable in run_trade.py:

  • EDGE_THRESHOLD — Minimum edge to trade (default: 0.05 = 5%)
  • MIN_SHARES — Minimum order size (Polymarket requires ≥5 shares)
  • Bankroll allocation: 80% usable, 25% max per trade, 30% cap per single position
  • Market horizon: Prioritizes markets ending within 30 days

Monitoring

Check P&L anytime:

python3 /opt/trader/app/pnl_tracker.py

Check recent activity:

tail -50 /opt/trader/app/cron.log

Key Technical Details

  • Wallet type: EOA (signature_type=0), NOT proxy wallet
  • Token: USDC.e (0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174), not native USDC
  • Neg-risk markets (elections, sports leagues) require USDC.e approval for Neg Risk Adapter (0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296)
  • US geoblock — All API calls must originate from non-US IP. VPN insufficient; use actual non-US VPS.

Cost

  • LLM inference: ~$0.001 per market evaluation (Haiku)
  • Typical cycle (40 evals): ~$0.04
  • Gas: negligible on Polygon (~$0.001 per trade)

⚠️ Security Considerations

  • Use a DEDICATED wallet with minimal funds. Never use your main wallet's private key. Create a fresh wallet and fund it only with what you're willing to risk.
  • PRIVATE_KEY is stored on disk in .env. Harden your VPS: strict file permissions (chmod 600 .env), no shared access, firewall, SSH keys only.
  • MAX_UINT approvals are standard in DeFi but grant broad spending rights. The approved contracts are official Polymarket contracts. Review addresses in references/contract-addresses.md before running.
  • Test with tiny amounts first ($5-10) before scaling up.
  • Monitor actively — check cron.log and run pnl_tracker.py regularly.
  • LLM_API_KEY billing — each cycle costs ~$0.04 (Haiku). Set billing alerts on your Anthropic account.
  • This is autonomous trading software. Bugs or market conditions can cause losses. Use at your own risk.

References

  • See references/polymarket-api.md for full CLOB API documentation
  • See references/contract-addresses.md for all Polygon contract addresses

Files

7 total
Select a file
Select a file to preview.

Comments

Loading comments…