# StealthMark MEV Sandwich Bound Verifier

> StealthMark MEV Sandwich Bound 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-19).

Formally verifies whether a MEV sandwich attack is profitable against a given AMM trade and computes the optimal frontrun size, victim output, and recommended slippage bound.

## Facts

- Endpoint: POST https://gateway.stealthmark.io/x402/verify-mev-sandwich-bound?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stealthmark-mev-sandwich-bound-verifier-7a6a9406
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nx4orWzsFrvNFD_2jsLqA

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-mev-sandwich-bound-verifier-7a6a9406 -d '<json body>'
```

Example prompt: Check if my swap of 1,000,000 tokens in a pool with reserve_in 50,000,000 and reserve_out 25,000,000 is vulnerable to a sandwich attack, using a 30 bps fee and 100 bps slippage tolerance, and tell me the recommended max slippage and whether the attack would be profitable.

## When to prefer this

Use this endpoint when you need a fast, formal computation of MEV sandwich attack feasibility and bounds for a specific AMM trade before submission. It is ideal for DeFi wallets, trading bots, and security tools that want to recommend optimal slippage or flag sandwichable transactions. Prefer this over heuristic slippage estimators when you need explicit attacker profit modeling and a formally verified sandwich bound.

## Known failure modes

- Missing required fields (reserve_in, reserve_out, user_amount_in) return 400 validation error
- Integer overflow or zero-reserve inputs may produce undefined computation results
- Network or gateway errors return 5xx with no result body
- Payment failure via x402 protocol returns 402 Payment Required
- Extremely large integer inputs may time out or return computation errors

## 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 a sandwich attack is profitable (sandwich_profitable), the optimal frontrun input size, expected and minimum user output, victim output under attack, attacker gross and net profit, and a recommended maximum slippage in basis points to protect the user's trade. Also includes a check_type label and a human-readable message.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fee_bps": {
   "type": "integer",
   "default": 30
  },
  "reserve_in": {
   "type": "integer"
  },
  "reserve_out": {
   "type": "integer"
  },
  "slippage_bps": {
   "type": "integer",
   "default": 100
  },
  "user_amount_in": {
   "type": "integer"
  },
  "attacker_gas_cost_in": {
   "type": "integer",
   "default": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "message": {
   "type": "string"
  },
  "verified": {
   "type": "boolean"
  },
  "check_type": {
   "type": "string"
  },
  "user_min_out": {
   "type": "integer"
  },
  "expected_user_out": {
   "type": "integer"
  },
  "optimal_frontrun_in": {
   "type": "integer"
  },
  "sandwich_profitable": {
   "type": "boolean"
  },
  "victim_sandwiched_out": {
   "type": "integer"
  },
  "attacker_net_profit_in": {
   "type": "integer"
  },
  "attacker_gross_profit_in": {
   "type": "integer"
  },
  "recommended_max_slippage_bps": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stealthmark-mev-sandwich-bound-verifier-7a6a9406/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)
