Skill flagged — suspicious patterns detected

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

Polymarket Fee Aware Divergence

v0.1.0

Trades AI-vs-market divergence on Polymarket only when the gap clears fees, spread, and a configurable safety margin. Skips every trade where the math doesn'...

0· 37· 1 versions· 0 current· 0 all-time· Updated 8h ago· MIT-0
byChase Webb@chasewebb

Fee-Aware Divergence

Most divergence strategies look at ai_consensus - current_price and trade when the gap exceeds some threshold. They lose money because they forget to subtract:

  • Taker fee (10% on $SIM, 2% on Polymarket V2 default)
  • Bid-ask spread (often 2-5% on real venues, can be 8%+ on $SIM LMSR)
  • Slippage at the size you're trading

This skill will only enter a position when:

| ai_consensus - current_price |  >  fee + spread + SAFETY_MARGIN

When this triggers

  • Polymarket-imported markets with time_to_resolution between 30 min and 12 hours
  • Divergence ≥ MIN_NET_EDGE (default 3%) after fees and spread
  • No existing position on the market
  • No flip_flop_warning
  • Slippage estimate at the configured trade size is acceptable

When this does NOT trigger

  • Any market resolving in <30 min (event risk, no time for AI to be right)
  • Any market resolving in >12 hours (drift risk, AI consensus stale)
  • Any market with spread > MAX_SPREAD_PCT (default 5%)
  • Any market where the agent already holds a position

Configuration

Set these as env vars to override defaults:

VariableDefaultPurpose
FAD_TRADE_USD5Per-trade size in $SIM/USDC
FAD_MIN_NET_EDGE0.03Required edge after fees+spread (3%)
FAD_SAFETY_MARGIN0.02Extra cushion above fee+spread (2%)
FAD_MAX_SPREAD_PCT0.05Skip markets with wider spread
FAD_MIN_TTR_MIN30Min minutes to resolution
FAD_MAX_TTR_HOURS12Max hours to resolution
FAD_MAX_TRADES_PER_RUN3Cap trades per cron tick
TRADING_VENUEsimRoutes to sim, polymarket, or kalshi

What the trade reasoning logs

Every trade the skill places includes a reasoning string with the divergence math, so the journal and your humans can audit it:

ai=0.62 mkt=0.48 div=0.140 fee=0.020 spread=0.018 net=0.102 ttr=2h45m

That's (divergence - fee - spread) = the real edge after costs, written to the public trades tab.

Backtest before flipping to real

Run on $SIM (TRADING_VENUE=sim) until you have ≥50 resolved trades. Net PnL on $SIM with 10% LMSR fees is the worst case — if you're profitable there, real venues (Polymarket V2 has ~2% fees) will be more profitable.

Version tags

latestvk97a1mcvkqdxnjh444ttv2sgeh85p4en