# Lending Yield Curve Arbitrage AI Agent Connect

> Identify and evaluate profitable yield arbitrage loops between stablecoin lending protocols.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_2arvEW8zgCMnKlci6qicmRfAGP3nQXIF7mZB7aOM/ai-agent-connect
- **Tags:** yield, stablecoin, lending, arbitrage, defi

## Description

This MCP server provides a deterministic toolset for identifying and evaluating yield arbitrage opportunities between decentralized lending protocols. By analyzing the yield spread between different stablecoin pools, users can identify profitable loops where they borrow from one protocol and supply to another. The server includes tools like `find_arbitrage_opportunities` to scan for valid spreads, `evaluate_loop_economics` to calculate net yield and liquidation risks, and `get_protocol_safety_score` to assess protocol maturity and liquidity. It enforces strict safety rules, such as minimum TVL requirements and age thresholds, to mitigate smart contract risk.

## Tools

### find_arbitrage_opportunities
Identifies valid arbitrage loops between different lending protocols for stablecoin pairs

### evaluate_loop_economics
Calculates the net profitability and risk metrics for a specific identified arbitrage opportunity

### get_protocol_safety_score
Provides a qualitative risk assessment of a protocol based on its operational history and liquidity

## Prompt Examples

**Prompt:** 
```
Find arbitrage opportunities between Aave and Compound for USDC.
```

**Response:** 
```
The identified opportunity is to borrow USDC from Compound at 3.5% and supply it to Aave at 5.2%, resulting in a yield spread of 1.7%. However, this does not meet the minimum 2% spread requirement.
```

**Prompt:** 
```
Calculate the economics for a 100,000 USDC arbitrage loop with a 1% risk buffer.
```

**Response:** 
```
The net yield for this loop is 3.45% after accounting for the liquidation risk buffer and gas costs. The loop LTV is 65%, and the liquidation price is set at a 20% deviation from current levels.
```

**Prompt:** 
```
Is the Morpho protocol considered safe for this strategy?
```

**Response:** 
```
Yes, Morpho is considered a trusted protocol as it meets the minimum age and TVL requirements for this strategy.
```

## Frequently Asked Questions

**How do I find valid arbitrage opportunities?**
Use the `find_arbitrage_opportunities` tool with your lending and borrowing rate data. It will return valid loops where the yield spread exceeds the required safety thresholds.

**How is the net yield calculated?**
The net yield is determined by the `evaluate_loop_economics` tool, which subtracts the liquidation risk buffer and the gas costs amortized over the expected duration from the gross yield spread.

**What safety checks are performed on protocols?**
The server uses `get_protocol_safety_score` to ensure protocols meet minimum TVL and age requirements, reducing exposure to smart contract risk.
