# Maker Fee Rebate Optimization AI Agent Connect

> Optimize high-frequency market-making on Polymarket by calculating precise spread thresholds.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_TSGVeAy1YUeYHq3KU25K3oX0TaeFFbCd1Qrp7qIc/ai-agent-connect
- **Tags:** polymarket, market-making, liquidity, high-frequency, trading-strategy

## Description

This MCP server provides a deterministic decision-support engine for liquidity providers on Polymarket. It calculates the exact minimum spread required to profitably provide liquidity by accounting for maker rebates, taker fees, and adverse selection costs. Users can use `calculate_minimum_spread` to find break-even thresholds, `simulate_strategy_performance` to project long-term P&L and fill rates, and `validate_order_placement` to receive real-time advisory on whether to execute limit orders based on current market volatility and spreads.

## Tools

### calculate_minimum_spread
Determines the exact price spread required to ensure a single liquidity-providing cycle is profitable

### simulate_strategy_performance
Projects the long-term viability of the strategy by simulating multiple trading cycles

### validate_order_placement
An advisory tool to decide if a specific limit order should be placed

## Prompt Examples

**Prompt:** 
```
What is the minimum spread I need to stay profitable with a 0.1% maker rebate, 2% taker fee, and 0.05 volatility?
```

**Response:** 
```
The minimum required spread is 0.0205.
```

**Prompt:** 
```
Should I place a limit order if the current spread is 0.015 and my minimum required spread is 0.0205?
```

**Response:** 
```
WAIT_FOR_SPREAD. The current spread is insufficient to cover the required costs and risks.
```

**Prompt:** 
```
Simulate 100 cycles with a minimum spread of 0.02, a fill rate of 0.7, and volatility of 0.05.
```

**Response:** 
```
The simulation completed 100 cycles with an expected fill rate of 70%, an average hold time of 4.2 minutes, and a net P&L of $12.45.
```

## Frequently Asked Questions

**How does this tool account for risk?**
The engine incorporates adverse selection risk by using market volatility to adjust the minimum required spread, ensuring that the spread covers potential losses from price movements.

**Can I use this to simulate long-term profitability?**
Yes, by using `simulate_strategy_performance`, you can project expected fill rates, average hold times, and net P&L over a specified number of trading cycles.

**What is the purpose of the spread validation tool?**
The `validate_order_placement` tool acts as an advisory layer, comparing the current market spread against your calculated minimum threshold to decide if a limit order is justified.
