PayAna — Falsifier Agent for Binance Agent OS

Track A — Binance Agent OS Mini Hackathon

PayAna is an evidence-first market-analysis agent whose defining behavior is simple:

It does not stop after asking “what does the market evidence support?”. It also asks “what would prove this reading wrong?”

The project combines a reusable SKILL.md for an MCP-capable AI client with a deployed reference cockpit that computes transparent market metrics, records source receipts, exposes missing context and refuses to convert a descriptive market reading into a trade instruction.

Hard boundary: MARKET_DATA_READ != TRADING_AUTH

Why this exists

Many market-agent demos optimize for a polished answer or an executed action. That creates a failure mode: a coherent answer can still be based on stale data, one-sided evidence, missing context or a non-calibrated model score.

PayAna instead forces a small scientific loop:

OBSERVE → VALIDATE → MODEL → COMPETING HYPOTHESES → FALSIFY → NEGATIVE SPACE → RECONCILE → RECEIPT → NEXT TEST

The result is decision-quality evidence, not a trade recommendation.

What the agent does

For a requested Binance market, PayAna:

  1. retrieves fresh market evidence;
  2. validates source state and timestamps;
  3. computes reproducible metrics;
  4. constructs a winning hypothesis, an opposite hypothesis and an alternative explanation;
  5. defines observable falsifiers;
  6. lists context that is missing instead of fabricating it;
  7. returns source receipts;
  8. ends with NO_TRADE_DECISION.

See SKILL.md for the agent contract.

Binance Agent OS integration

Official MCP endpoint:

https://agent.binance.com/mcp/agentic

The skill requires only the Market Data capability. It does not require Account, Trade or Transfer.

A runtime probe against the official endpoint correctly returned an OAuth challenge rather than pretending to be connected. The discovered authorization metadata advertises Authorization Code, PKCE S256, token endpoint authentication method none, and Client ID Metadata Document (CIMD) support.

PayAna 1.2 adds an optional, user-initiated OAuth verification flow at /oauth/start. Its public client identity is https://payana-agent-os.val.run/oauth/client-metadata.json. The flow stores only a one-time state plus PKCE verifier for at most ten minutes, exchanges the authorization code in callback memory, reads the MCP tool catalog, and then discards the access token and any refresh token. It never calls an MCP tool automatically.

The boundary remains explicit:

MCP_ENDPOINT_KNOWN != MCP_SESSION_AUTHORIZED OAUTH_FLOW_READY != USER_AUTHORIZED_SESSION AUTHORIZED_TOOL_CATALOG != TOOL_CALL

A direct unauthenticated MCP transport probe also found that the deployed Agent OS server currently returns JSON-RPC Method not found for modern server/discover and HTTP 401 + OAuth resource metadata for tools/list. So Binance's "Market Data: public, no auth" capability should not be confused with an anonymously accessible MCP tool catalog: the connection is still authorization-gated in this runtime. A real Agent OS connection receipt therefore still requires the participant to complete the supported MCP-client connection/authentication flow. Until that gate happens, the hosted reference cockpit continues to use Binance's documented public market-data API surface for the reproducible analysis layer and does not claim an authenticated MCP session.

Current Binance Developer documentation lists supported MCP clients including ChatGPT on the web, ChatGPT/Codex Desktop, Codex CLI, Claude Code/Desktop, VS Code and Grok Bot. Its own connection witness is a read-only request for current BTCUSDT price and 24-hour change, with the Binance MCP tool attribution visibly present in the client response. PayAna uses that exact witness as the remaining MCP proof gate; Account, Trade and Transfer are not needed for the Track A read-only workflow.

Live reference cockpit

Production demo: https://payana-agent-os.val.run/

The deployed web application provides a zero-trade demonstration of the deterministic evidence layer:

  • BTCUSDT
  • ETHUSDT
  • BNBUSDT
  • SOLUSDT
  • XRPUSDT

For each symbol it combines:

  • 24h ticker;
  • top-20 order book;
  • 36 × 5-minute candles;
  • spread;
  • top-20 bid/ask notional;
  • order-book imbalance;
  • 30m and 3h momentum;
  • 5m realized volatility;
  • volume z-score;
  • descriptive directional pressure;
  • heuristic evidence-stability score;
  • source receipts;
  • risk flags;
  • falsifiers;
  • missing context.

The stability score is explicitly not a calibrated probability.

Reproducible formulas

spread_bps = (ask - bid) / mid * 10000 bid_notional = Σ(price_i × qty_i), top 20 bids ask_notional = Σ(price_i × qty_i), top 20 asks book_imbalance = (bid_notional - ask_notional) / (bid_notional + ask_notional) log_return_t = ln(close_t / close_(t-1)) realized_vol_5m_bps = sample_std(log_returns) × 10000 momentum_30m_pct = (latest_close / close_30m_ago - 1) × 100 volume_z = (latest_quote_volume - mean(prior_quote_volumes)) / sample_std(prior_quote_volumes)

The API exposes its method description directly in every successful response.

HTTP API

GET /api/health GET /api/submission-evidence # machine-readable Track A evidence manifest GET /api/symbols GET /api/analyze?symbol=BTCUSDT GET /oauth/status GET /oauth/client-metadata.json GET /oauth/start # explicit user action; redirects to Binance GET /oauth/callback # OAuth response only

There is deliberately no trading endpoint. /oauth/start is not called by the cockpit automatically; the participant must click the verification action.

Example safety fields:

{ "readOnly": true, "boundary": "MARKET_DATA_READ != TRADING_AUTH", "assessment": { "recommendation": "NO_TRADE_DECISION" } }

Runtime discovery

The application does not assume that a documented endpoint is usable from every execution environment.

During the 2026-09-07 Val Town runtime census:

api.binance.com → HTTP 451 from this runtime fapi.binance.com → HTTP 451 from this runtime data-api.binance.vision → HTTP 200 for public spot market data Agent OS MCP initialize → HTTP 401 OAuth challenge, as expected without authorization

data-api.binance.vision is therefore the current runtime champion for the hosted public-data reference layer.

See docs/ARCHITECTURE.md for the evidence and boundaries.

Validation

Current 1.2 release-candidate audit:

189 / 189 assertions PASS 35 / 35 rate-limit mutation steps PASS 224 total executed checks

The OAuth/MCP portion contributes 34 authorization-flow checks, 25 synthetic MCP/token-boundary checks and 6 OAuth-state storage/replay checks. The aggregate runner executes suites sequentially because multiple mutation suites temporarily replace globalThis.fetch; this prevents false interference between independent tests.

Coverage includes all five allowlisted symbols and validates:

  • current ticker timestamp;
  • positive market price;
  • non-negative spread;
  • order-book imbalance bounds;
  • stability-score bounds;
  • explicit non-probability language;
  • three source receipts;
  • candle-series presence;
  • NO_TRADE_DECISION invariant;
  • invalid symbols;
  • injection-like symbol strings;
  • nonexistent routes;
  • rejection of write-like POST access.

Rate-limit mutation control:

requests 1–30 → HTTP 200 requests 31–35 → HTTP 429 PASS

Run in Val Town:

tests/selftest.ts tests/failure_modes_selftest.ts tests/oauth_flow_selftest.ts tests/oauth_mcp_probe_selftest.ts tests/oauth_state_storage_selftest.ts tests/rate_limit_selftest.ts tests/release_audit.ts

Detailed release evidence: docs/TEST_EVIDENCE.md.

The browser layer is validated separately from server tests. After CSP hardening, a JavaScript-rendering fetch successfully matched React-only selectors including source receipts. Full interactive/screenshot automation is tracked separately because the external browser providers currently have insufficient credit; it is not mislabeled as completed.

Web hardening

  • strict symbol allowlist;
  • no arbitrary upstream URL forwarding;
  • Cache-Control: no-store on API results;
  • CSP;
  • X-Content-Type-Options: nosniff;
  • X-Frame-Options: DENY;
  • restrictive Permissions-Policy;
  • no Binance account key stored in the app;
  • no Account / Trade / Transfer function;
  • best-effort per-runtime rate limiting.

The rate limiter is intentionally documented as best-effort because serverless instances do not provide a shared global bucket.

Repository structure

. ├── SKILL.md # reusable Falsifier Agent contract ├── index.ts # Hono API + web security boundaries ├── lib/ │ ├── market.ts # evidence acquisition + formulas │ └── agent_os_oauth.ts # CIMD + PKCE + ephemeral MCP catalog probe ├── frontend/ │ ├── root.tsx │ ├── index.tsx │ ├── styles.css │ └── components/App.tsx ├── tests/ │ ├── selftest.ts │ ├── failure_modes_selftest.ts │ ├── oauth_flow_selftest.ts │ ├── oauth_mcp_probe_selftest.ts │ ├── oauth_state_storage_selftest.ts │ ├── rate_limit_selftest.ts │ └── release_audit.ts ├── audits/ │ ├── binance_mcp_probe.ts │ ├── binance_mcp_public_market_probe.ts │ ├── oauth_authorization_acceptance_probe.ts │ ├── oauth_metadata_probe.ts │ ├── market_api_probe.ts │ └── vision_klines_probe.ts └── docs/ ├── ARCHITECTURE.md ├── TEST_EVIDENCE.md ├── SUBMISSION_CHECKLIST.md └── SUBMISSION_PACKAGE.md

Negative controls that matter

HTTP_200 != VALID_MARKET_EVIDENCE SCREENSHOT != BEHAVIOR_PROOF MARKET_DATA_READ != TRADING_AUTH MCP_ENDPOINT_KNOWN != MCP_SESSION_AUTHORIZED OAUTH_FLOW_READY != USER_AUTHORIZED_SESSION ACCESS_TOKEN_EPHEMERAL != TOKEN_PERSISTED AUTHORIZED_TOOL_CATALOG != TOOL_CALL MODEL_SCORE != CALIBRATED_PROBABILITY MISSING_EVIDENCE != ZERO CURRENT_PRESSURE != FUTURE_PRICE FETCH_FAIL != ZERO

Hackathon submission state

The official Binance announcement states a Track A deadline of 2026-09-08 23:59 UTC and requires following/reposting Binance, replying or quote-reposting with the Track A submission (video/demo plus GitHub when applicable), and completing the survey.

External account actions are intentionally tracked as unverified until they actually happen. See docs/SUBMISSION_CHECKLIST.md for the current gates and docs/SUBMISSION_PACKAGE.md for the prepared video, X and survey handoff.

Design principle

PayAna's thesis is not “AI can predict the market.”

It is:

An agent becomes more trustworthy when it is required to expose the evidence against its own conclusion, the conditions that would falsify it, and the context it does not have.