# MEV Sandwich Detection Strategy AI Agent Connect

> Identify and avoid sandwich attacks in DEX transactions.

## Overview
- **Category:** security
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_xmoaCRBDSwn307tpjcg6Vj7maGya68PJJjgCoPYR/ai-agent-connect
- **Tags:** mev, sandwich-attack, dex, ethereum, protection

## Description

This MCP server provides tools to detect and analyze Maximal Extractable Value (MEV) sandwich attacks. Use `detect_sandwich_pattern` to determine if a specific transaction was targeted by front-running and back-running bots. Use `analyze_sandwich_statistics` to get aggregate data on attack frequency and affected tokens. Use `evaluate_protection_strategy` to receive risk assessments and recommendations for specific trades to minimize slippage and avoid high-risk tokens.

## Tools

### detect_sandwich_pattern
Determines if a specific transaction was the victim of a sandwich attack pattern

### analyze_sandwich_statistics
Provides high-level aggregate metrics regarding the frequency and intensity of sandwich attacks

### evaluate_protection_strategy
Evaluates whether a specific token or trade should be avoided based on current MEV risk levels

## Prompt Examples

**Prompt:** 
```
Was this transaction sandwiched?
```

**Response:** 
```
The transaction was indeed part of a sandwich attack, resulting in a victim impact of 4.5%.
```

**Prompt:** 
```
Should I trade this token?
```

**Response:** 
```
No, you should avoid this token as its sandwich frequency is currently above 5%.
```

**Prompt:** 
```
What is the current sandwich attack frequency?
```

**Response:** 
```
The current sandwich frequency is 12 attacks per 1000 DEX transactions.
```

## Frequently Asked Questions

**How do I know if a transaction was a sandwich attack?**
You can use the `detect_sandwich_pattern` tool with your transaction and mempool data to confirm if a sandwich pattern occurred.

**Can this tool help me avoid MEV?**
Yes, `evaluate_protection_strategy` provides specific advice, such as adjusting slippage tolerance or using private RPCs, to mitigate risk.

**What metrics does the statistics tool provide?**
The `analyze_sandwich_statistics` tool returns the frequency of attacks per 1000 transactions, average profit per attack, and a list of most affected tokens.
