T09 · Insecure Skill Coding Practices
- Location
trader.py:359- Finding
Minimum Market Volume Safeguard Is Declared but Never Enforced
- Content
View full analysis
= MAX_POSITIONS: break side, size, reasoning = compute_signal(m, stale_side, divergence) if not side: safe_print(f" [skip] {reasoning}") continue ok, why = context_ok(client, m.id) if not ok: safe_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, ) tag = "(sim)" if r.simulated else "(live)" status = "OK" if r.success else f"FAIL:{r.error}" safe_print(f" [trade] {side.upper()} ${size} {tag} {status} -- {reasoning[:70]}") if r.success: placed += 1 except Exception as e: safe_print(f" [error] {m.id}: {e}") ``` ### Technical Analysis `MIN_VOLUME` is presented as a risk parameter and is reloaded after skill configuration, but it is not referenced by market discovery, signal computation, or the final order-processing loop. Consequently, a market can reach `client.trade()` regardless of whether its volume is below the configured threshold. Low-volume prediction markets are more susceptible to wide effective execution costs, price manipulation, unreliab ...[truncated 1323 chars]- Remediation
View remediation
