# Oracle Manipulation Detection Strategy AI Agent Connect

> Detect and avoid token price manipulation by analyzing oracle deviations and DEX spot prices.

## Overview
- **Category:** security
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_F9KkSe4ACBOKYapb1TFGRpqlB98lDpUWQT99T9Ew/ai-agent-connect
- **Tags:** oracle, manipulation, price-detection, defi, risk-management

## Description

This MCP server provides deterministic tools to identify and mitigate oracle price manipulation attacks. By comparing multiple oracle sources like Chainlink and Pyth against DEX spot prices, it calculates oracle deviation and identifies stale data. Use `analyze_price_integrity` to detect manipulation flags, `calculate_safe_price` to derive a consensus median price, and `get_manipulation_probability` to assess risk based on historical patterns. It helps trading systems decide whether to proceed, use caution, or halt activity to avoid losses from manipulated price feeds.

## Tools

### analyze_price_integrity
Evaluates the current state of oracle and DEX prices to identify immediate manipulation risks

### calculate_safe_price
Derives a single reliable price from multiple oracle inputs

### get_manipulation_probability
Quantifies the risk of a price deviation being an attack based on historical patterns

## Prompt Examples

**Prompt:** 
```
Check if the current oracle prices are being manipulated.
```

**Response:** 
```
The current oracle deviation is 2.5%, which is within normal bounds. The trading recommendation is to proceed.
```

**Prompt:** 
```
Calculate a reliable price from these oracle values: 100, 102, 98, 101.
```

**Response:** 
```
The safe price is 100.5.
```

**Prompt:** 
```
What is the probability that a 7% deviation is a manipulation?
```

**Response:** 
```
Based on historical data, there is an 85% probability that a 7% deviation represents a manipulation event.
```

## Frequently Asked Questions

**How does the tool detect manipulation?**
The `analyze_price_integrity` tool flags manipulation when the deviation between oracles exceeds 5%, one oracle matches the DEX spot price while the other does not, and the diverging oracle is stale.

**What is a safe price?**
A safe price is a consensus value, typically the median of all healthy, non-stale oracle prices, calculated using `calculate_safe_price`.

**Can I use this with Claude Desktop?**
Yes, this MCP server can be connected to Claude Desktop, Cursor, VS Code, Windsurf, and any other MCP-compatible client via Vinkius Edge.
