T09 · Insecure Skill Coding Practices
- Location
trader.py:18- Finding
Declared Minimum-Volume Safeguard Is Not Enforced
- Content
View full analysis
= 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, ) tag = "(sim)" if r.simulated else "(live)" status = "OK" if r.success else f"FAIL:{r.error}" print(f" [trade] {side.upper()} ${size} {tag} {status} — {reasoning[:70]}") if r.success: placed += 1 except Exception as e: print(f" [error] {m.id}: {e}") ``` ### Technical Analysis `MIN_VOLUME` is loaded from the environment and presented as a tunable risk parameter, but neither `compute_signal()` nor the trading loop compares a market's volume against it. Consequently, the configured minimum-volume value has no effect. Liquidity checks are important for prediction-market automation because low-volume markets are more suscepti ...[truncated 1008 chars]- Remediation
View remediation
