T09 · Insecure Skill Coding Practices
- Location
trader.py:58- Finding
Minimum-volume risk control is declared but never enforced
- Content
View full analysis
list: """Find active markets via broad keyword sweep, deduplicated.""" seen, unique = set(), [] for kw in KEYWORDS: try: for m in client.find_markets(query=kw): if m.id not in seen: seen.add(m.id) unique.append(m) except Exception as e: print(f"[search] {kw!r}: {e}") return unique ``` The execution loop then evaluates and trades those markets without checking their volume: ```python for m in markets: if placed >= MAX_POSITIONS: break side, size, reasoning = compute_signal(m) if not side: print(f" [skip] {reasoning}") continue ok, why = context_ok(client, m.id) if not ok: print(f" [skip] {why}") continue try: r = client.trade( market_id=m.id, side=side, amount=size, source=TRADE_SOURCE, skill_slug=SKILL_SLUG, reasoning=reasoning, ) ``` ### Technical Analysis `SIMMER_MIN_VOLUME` is documented as a liquidity safeguard, loaded from the environment, exposed as a tunable, and refreshed in `get_client()`. However, it is never referenced by market discovery, signal generation, or trade execution. The configured threshold therefore has no effect. A market can pass the probability, spread, resolution-date, flip-flop, and slippage checks even when its trading volume is below the declared minimum. This is a fail-open implementation of a financial risk control. ### Attack Path 1. ...[truncated 1247 chars]- Remediation
View remediation
