# MEV Sandwich Risk Scorer

> MEV Sandwich Risk Scorer is a paid API for AI agents from httpay.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Scores the MEV sandwich attack risk for a proposed token swap, returning a 0-100 risk score, a LOW/MEDIUM/HIGH verdict, and mitigation factors

## Facts

- Endpoint: POST https://httpay.xyz/api/mev-risk
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/httpay-xyz-c0c9ab62
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-hYcEivxUa3LWJFUHLFL6

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 httpay-xyz-c0c9ab62 -d '<json body>'
```

Example prompt: Before I swap $1000 USDC for WETH on Uniswap, what's the MEV sandwich risk? My tokenIn is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 and tokenOut is 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2.

## When to prefer this

Use this endpoint when an agent needs to assess MEV sandwich attack risk before executing a DeFi token swap, especially for larger trade sizes on popular DEXes like Uniswap where front-running is common. Prefer this over generic token safety checkers when the specific concern is sandwich attacks and pre-trade MEV exposure rather than token contract fraud or rug pull risk.

## Known failure modes

- Invalid or unrecognized token contract addresses return an error
- Unsupported DEX name results in a validation error
- Missing required parameters (tokenIn, tokenOut, amountUsd, dex) return a 400 bad request
- GoPlus or DexScreener upstream service unavailability causes 503 errors
- Very low-liquidity or newly created tokens may return incomplete risk data
- Payment failure via x402 protocol returns 402 Payment Required

## How this service works

Pre-swap MEV sandwich risk scoring. Params: ?tokenIn=0x...&tokenOut=0x...&amountUsd=1000&dex=uniswap. Returns riskScore 0-100, verdict LOW/MEDIUM/HIGH, and mitigation factors. Uses GoPlus + DexScreener.

## Output

Returns a numerical riskScore from 0 to 100, a categorical verdict of LOW, MEDIUM, or HIGH indicating sandwich attack likelihood, and a list of mitigation factors the trader can apply to reduce MEV exposure for the proposed swap.

## Example request

```json
{
 "dex": "uniswap",
 "tokenIn": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
 "tokenOut": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
 "amountUsd": 1000
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "description": "Pre-swap MEV sandwich risk scoring. Params: ?tokenIn=0x...&tokenOut=0x...&amountUsd=1000&dex=uniswap. Returns riskScore 0-100, verdict LOW/MEDIUM/HIGH, and mitigation factors. Uses GoPlus + DexScreener."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/httpay-xyz-c0c9ab62/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from httpay.xyz](https://www.zero.xyz/host/httpay.xyz/llms.txt)
