GPT-5 finding
Missing preflight validation before submitting transactions (market status and minimum amount) leads to avoidable reverts and gas loss
- agenticbets/scripts/agenticbets.py:215-249
- agenticbets/references/agent-usage.md:46-49
- agenticbets/references/agent-usage.md:100-101
The CLI submits approval and bet without checking if the market is still open or if the amount satisfies the on-chain minimum of 1 USDC. This can lead to reverted transactions and wasted gas. The usage guide recommends confirming the market is open before betting and notes BelowMinBet for <1 USDC.
Recommendation
- Validate market['status'] == 'open' and market.get('secondsToLock', 0) > 10s (or configurable threshold) before submitting. - Enforce amount >= 1.0 USDC in CLI and fail fast with a clear message. - Optionally prompt the user to confirm when secondsToLock is very low.