# MEV / Sandwich Guard

> MEV / Sandwich Guard is a paid API for AI agents from 402.com.tr, paid per call via x402, $0.04/call, status unknown (last checked 2026-10-29).

Assesses MEV sandwich attack exposure for a token trade and returns an exposure level plus a protected execution plan with optimal slippage, private mempool routing, and order splitting.

## Facts

- Endpoint: GET https://402.com.tr/api/x402/mev-guard?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mev-sandwich-guard-2490f8da
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IcZPTT5bTintA3-_smRez

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 mev-sandwich-guard-2490f8da
```

Example prompt: Check the MEV sandwich attack risk for buying $5000 worth of ETH — give me an exposure rating and a protected execution plan with safe slippage and private mempool routing.

## When to prefer this

Choose this endpoint when an AI agent is about to execute or recommend a token swap and needs to assess and mitigate MEV sandwich risk before placing the trade — especially for large trades relative to pool depth, trades on public mempools, or when the agent needs a concrete protected execution plan rather than generic slippage advice. Prefer this over generic DEX aggregator slippage tools when you need explicit exposure classification and private mempool routing instructions.

## Known failure modes

- Missing required tokenOut parameter returns a validation error
- Invalid or unrecognized token symbol may return an error or fallback exposure estimate
- Very illiquid or newly created tokens may lack sufficient pool depth data for accurate assessment
- Network or pricing data unavailability may cause timeout or degraded response
- Payment failure (insufficient USDC) returns 402 Payment Required before processing

## How this service works

Agents are the easiest MEV prey: predictable, public-mempool, a measured ~$50M/quarter tax. A sandwich only pays when a trade moves the pool enough to front-run (size vs pool depth). This returns an exposure read (low/elevated/high) and a protected-execution plan: a tight min-out, private/off-mempool inclusion (a Cobalt validity tx via validity-build), and splitting a large order into unattackable chunks. Pass tokenOut + amountUsd. Not financial advice.

## Output

Returns an MEV exposure rating (low, elevated, or high), a recommended minimum output (min-out) to set as slippage protection, instructions for private/off-mempool transaction inclusion via a Cobalt validity transaction, and a suggested order-splitting strategy to break large trades into MEV-resistant chunks.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "tokenOut"
     ],
     "properties": {
      "tokenOut": {
       "type": "string",
       "description": "Token you want to buy"
      },
      "amountUsd": {
       "type": "string",
       "description": "Trade size in USD"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mev-sandwich-guard-2490f8da/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402.com.tr](https://www.zero.xyz/host/402.com.tr/llms.txt)
