Opus finding
cmd_bet accepts unknown direction strings as DOWN, silently misrouting bets
- agenticbets/scripts/agenticbets.py:196-199
The direction argument is validated only against {'up','bull'}. Any other value — including a typo like 'don', 'd', 'downn', or even 'up ' with whitespace — is silently treated as DOWN (position=1). For a financial action that costs USDC + gas, this is a serious contract gap: the user gets the opposite of what they typed without any error. The CLI usage string says '<up|down>' but only 'up'/'bull' is whitelisted and 'down'/'bear' is implicit fallthrough.
Recommendation
Explicitly validate direction against the set {up, bull, down, bear} (case-insensitive) and sys.exit with an error message otherwise. Strip whitespace before comparing.