# StealthMark Polymarket Basket Formal Verifier

> StealthMark Polymarket Basket Formal Verifier is a paid API for AI agents from gateway.stealthmark.io, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-16).

Formally verifies Polymarket prediction market outcome baskets for arbitrage edges, Dutch book conditions, and pricing invariants using Z3-based formal proofs.

## Facts

- Endpoint: POST https://gateway.stealthmark.io/x402/verify-polymarket-basket?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stealthmark-polymarket-basket-formal-verifier-3d1b4cd7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jzuJFqCLqqsFolruxa-oV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stealthmark-polymarket-basket-formal-verifier-3d1b4cd7 -d '<json body>'
```

Example prompt: Check this Polymarket basket for Dutch book or arbitrage conditions — the outcome ask prices are [0.45, 0.30, 0.28], payout per share is 10000, and there's no fee.

## When to prefer this

Use this endpoint when you need formal Z3-backed invariant verification of Polymarket prediction market basket pricing — specifically to detect Dutch book conditions or risk-free arbitrage edges with atomic-precision output. Prefer it over heuristic or off-chain scripts when you need a cryptographically rigorous proof-level guarantee of pricing correctness before executing trades.

## Known failure modes

- Invalid or missing outcome_ask_prices array returns a validation error
- Prices summing to values far outside [0,1] range may cause prover instability
- Malformed custom_conversion_formula string may result in a parsing or execution error
- Network or gateway authentication failure returns an x402 payment error
- Empty outcome array returns an error or trivially-verified result with zero cost

## How this service works

Autonomous Z3 Formal Invariant Prover (ERC-4626 Vaults, Polymarket Baskets, ZK Circuits, Differential Consensus) &amp; 100-Point Perimeter Security Gateway on Base Mainnet (x402 v2).

## Output

Returns a JSON object indicating whether the basket passes formal verification, the detected arbitrage edge in atomic units, the payout per share in atomic units, whether a Dutch book condition was detected, and the total basket cost in atomic units.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fee_bps": {
   "type": "integer",
   "default": 0
  },
  "kalshi_rules": {
   "type": "string",
   "description": "Raw resolution rules for Kalshi market"
  },
  "kalshi_ticker": {
   "type": "string",
   "description": "Kalshi market ticker"
  },
  "polymarket_slug": {
   "type": "string",
   "description": "Polymarket market slug"
  },
  "payout_per_share": {
   "type": "number",
   "default": 10000
  },
  "polymarket_rules": {
   "type": "string",
   "description": "Raw resolution rules for Polymarket market"
  },
  "outcome_ask_prices": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "List of best ask prices across all basket outcomes"
  },
  "custom_conversion_formula": {
   "type": [
    "string",
    "null"
   ]
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "verified": {
   "type": "boolean"
  },
  "risk_grade": {
   "type": "string"
  },
  "viral_x_alert": {
   "type": [
    "string",
    "null"
   ]
  },
  "arb_trap_witness": {
   "type": [
    "object",
    "null"
   ]
  },
  "arb_trap_detected": {
   "type": "boolean"
  },
  "arbitrage_edge_atomic": {
   "type": "integer"
  },
  "payout_per_share_atomic": {
   "type": "integer"
  },
  "dutch_book_edge_detected": {
   "type": "boolean"
  },
  "total_basket_cost_atomic": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stealthmark-polymarket-basket-formal-verifier-3d1b4cd7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.stealthmark.io](https://www.zero.xyz/host/gateway.stealthmark.io/llms.txt)
