AntFleet

Disagreement · cf4e74ac-openai-2

Hardcoded prediction contract routing ignores Markets API predictionContract; docs instruct dynamic routing

mismatch
repo a16d2030·PR #1·reviewed 1 week ago

Primary finding

Hardcoded prediction contract routing ignores Markets API predictionContract; docs instruct dynamic routing

mediummaintainabilityhigh
  • agenticbets/scripts/agenticbets.py:122-126
  • agenticbets/scripts/agenticbets.py:223-224
  • agenticbets/scripts/agenticbets.py:261-262
  • agenticbets/scripts/agenticbets.py:24-27
  • agenticbets/SKILL.md:279
  • agenticbets/references/agent-usage.md:108
The CLI derives the prediction contract via a hardcoded AGBETS token check, ignoring the predictionContract field provided by the Markets API. Documentation explicitly instructs to use the API and avoid hardcoding to future-proof for new versions (e.g., V3/V4) or token address changes. This increases breakage risk and contradicts the docs.

Recommendation

Use market['predictionContract'] from fetch_markets()/find_market for routing, and remove get_prediction_contract/AGBETS_TOKEN. Fall back only if the API lacks the field (with a clear error).

Counterpart finding

cmd_list 'time_left' suppresses zero-second windows and rounds bullPct lossily

lowbugmedium
  • agenticbets/scripts/agenticbets.py:122-128
  • agenticbets/scripts/agenticbets.py:120-121
(1) `secondsToLock and >0` treats 0 as falsy — at exactly t=0 the display shows '-', conflating 'just locked' with 'not open'. The API doc says null means not-open, so the existence check should be `is not None`. (2) `bear = 100 - round(bullPct)` ignores the actual bearPct from the API and can show e.g. UP 50%/DOWN 50% when the real split is 49.4/50.6 due to rounding. For a strategy tool this is misleading; use the real values.

Recommendation

Use `m['secondsToLock'] is not None and m['secondsToLock'] >= 0`. Use real `bearPct` from the API instead of `100 - round(bullPct)`.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →