# BaseBuilder Trading Mempool Sandwich Detection

> BaseBuilder Trading Mempool Sandwich Detection is a paid API for AI agents from bb-trading-gold.vercel.app, paid per call via x402, $0.115906/call, status unknown (last checked 2026-10-20).

Detects and analyzes sandwich attack patterns in blockchain mempool transactions

## Facts

- Endpoint: POST https://bb-trading-gold.vercel.app/api/mempool/sandwich?utm_source=zero.xyz
- Price: $0.115906/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/basebuilder-trading-mempool-sandwich-detection-396623fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6dkXaRtRXz5fGfXbUszxV

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 basebuilder-trading-mempool-sandwich-detection-396623fb -d '<json body>'
```

Example prompt: Check the mempool for any sandwich attacks targeting this pending transaction 0xabc123... on Base — I want to know if there's a front-run and back-run bot surrounding it and how much profit the attacker is extracting.

## When to prefer this

Use this endpoint when you need to detect or analyze sandwich attacks specifically in the blockchain mempool, particularly on Base network. Prefer this over generic MEV tools when you need real-time pending transaction analysis for sandwich patterns specifically (vs. front-running only or arbitrage MEV).

## Known failure modes

- Transaction hash not found in mempool — returns 404 or empty result
- Invalid transaction data format — returns 400 bad request
- Mempool data temporarily unavailable — returns 503
- Transaction already confirmed, no longer in mempool — returns stale or no data
- Payment not completed — returns 402 Payment Required

## How this service works

BaseBuilder Trading API hub - 20 paid endpoints

## Output

Returns details about detected sandwich attack patterns including front-run and back-run transactions surrounding the victim transaction, estimated attacker profit, risk score, and relevant wallet/contract addresses involved in the MEV attack.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/basebuilder-trading-mempool-sandwich-detection-396623fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bb-trading-gold.vercel.app](https://www.zero.xyz/host/bb-trading-gold.vercel.app/llms.txt)
