Skip to main content
ClaudeWave
Faouzi122 avatar
Faouzi122

Arsenal-Quant-Project

Ver en GitHub

High-performance decision oracle for autonomous DeFi agents. Computes MEV risk, Impermanent Loss, and Slippage with a 6-filter sequential decision matrix. Native L402 Lightning monetization.

MCP ServersRegistry oficial0 estrellas0 forksPythonMITActualizado today
Install in Claude Code / Claude Desktop
Method: UVX (Python) · arsenal-quant-project
Claude Code CLI
claude mcp add arsenal-quant-project -- uvx arsenal-quant-project
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "arsenal-quant-project": {
      "command": "uvx",
      "args": ["arsenal-quant-project"],
      "env": {
        "API_URL": "<api_url>",
        "LNBITS_URL": "<lnbits_url>",
        "LNBITS_ADMIN_KEY": "<lnbits_admin_key>"
      }
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Package name inferred from the repository name. Verify it exists on PyPI, or clone https://github.com/Faouzi122/Arsenal-Quant-Project and follow its README.
Detected environment variables
API_URLLNBITS_URLLNBITS_ADMIN_KEY
Casos de uso

Resumen de MCP Servers

# Arsenal Decision Engine 🛡️
**The Risk-Validation Layer for Autonomous AI Agents (DeFAI)**

[![Arsenal-Quant-Project MCP server](https://glama.ai/mcp/servers/Faouzi122/Arsenal-Quant-Project/badges/card.svg)](https://glama.ai/mcp/servers/Faouzi122/Arsenal-Quant-Project)
[![smithery badge](https://smithery.ai/badge/khelifa-faouzi16/arsenal-decision-engine)](https://smithery.ai/servers/khelifa-faouzi16/arsenal-decision-engine)

> **Validation on 180-Day Binance ETH/USDC Data ([`07_Backtest_Engine/`](./decision_engine/07_Backtest_Engine/run_empirical_backtest.py)):**
> 🔬 **Breakeven Corridor** is a deterministic algebraic boundary (where IL = accumulated yield). Any position whose price ratio stays within `[lower_be, upper_be]` has R_net > 0 by mathematical definition — not a probabilistic model.
> 🎯 **82% to 97% Mid-Checkpoint Predictive Accuracy** — the risk level signal correctly predicted final position health (positive/negative R_net) across all tested APY × holding-period scenarios.

---

## Mission

**Transform DeFi uncertainty into deterministic, actionable risk metrics for autonomous agents.**
We do not run stateful trading bots or generate speculative prediction signals; we provide a stateless risk middleware layer that agents query before deploying or maintaining standard constant-product / full-range LP positions.

Built for agents, priced for agents. Pay per decision via Lightning Network (L402).

---

## What This Engine Does

Before an autonomous agent deploys capital or adjusts a standard constant-product / full-range LP position (such as Uniswap V2 or full-range V3), it submits the pool parameters (APY, price ratio, days held) to our API. The engine computes the exact mathematical risk, the net return ($R_{net}$), and the dynamic **Breakeven Corridor** bounds.

- **No LLMs. No hallucinations. Pure algebraic calculation.**
- **Complexity:** $\mathcal{O}(1)$ time and memory.
- **Latency:** $< 15\text{ms}$ local execution.

### Agent Request (HTTP GET)
```
https://api.arsenal-quant.com/mcp/evaluate?apy=0.20&price_ratio=0.85&days_held=30
```

### Engine Response (JSON Contract)
```json
{
  "impermanent_loss_pct": 0.3292,
  "accumulated_yield_pct": 1.6438,
  "r_net_pct": 1.3146,
  "il_to_yield_ratio": 0.2,
  "risk_level": "LOW",
  "breakeven_corridor": {
    "lower_ratio": 0.6941,
    "upper_ratio": 1.4407,
    "interpretation": "Position remains profitable if price ratio stays within [0.6941, 1.4407]"
  },
  "inputs": {
    "apy": 0.2,
    "price_ratio": 0.85,
    "days_held": 30
  },
  "source": "Arsenal Decision Engine v2.0",
  "oracle_signature": "b5dce8268fe762fa66ffccc083b02e9b65801888cdf76004ff22b648ea80869b",
  "layer": "PREMIUM"
}
```

---

## API Pricing (Dynamic L402)
- **Free Tier:** First 3 requests per IP/hour are free.
- **Low/Moderate Risk Positions:** 50 Sats per evaluation.
- **High/Critical Risk Positions:** 500 Sats per evaluation.

---

## Python Integration Example

```python
import urllib.request
import urllib.error
import json
import re
import os

API_URL = "https://api.arsenal-quant.com/mcp/evaluate?apy=0.20&price_ratio=0.85&days_held=30"
LNBITS_URL = "https://demo.lnbits.com"
LNBITS_ADMIN_KEY = os.getenv("LNBITS_ADMIN_KEY", "your_key_here")

def query_risk_oracle():
    req = urllib.request.Request(API_URL, method="GET")
    req.add_header("x-agent-id", "autonomous-lp-bot")

    try:
        with urllib.request.urlopen(req) as resp:
            return json.loads(resp.read().decode('utf-8'))
    except urllib.error.HTTPError as e:
        if e.code == 402:
            auth_header = e.headers.get("WWW-Authenticate")
            macaroon = re.search(r'token="([^"]+)"', auth_header).group(1)
            invoice = re.search(r'invoice="([^"]+)"', auth_header).group(1)

            pay_req = urllib.request.Request(
                f"{LNBITS_URL}/api/v1/payments",
                data=json.dumps({"out": True, "bolt11": invoice}).encode(),
                headers={"X-Api-Key": LNBITS_ADMIN_KEY, "Content-Type": "application/json"}
            )
            with urllib.request.urlopen(pay_req) as pay_resp:
                preimage = json.loads(pay_resp.read().decode())["preimage"]

            retry_req = urllib.request.Request(API_URL, method="GET")
            retry_req.add_header("Authorization", f"L402 {macaroon}:{preimage}")
            retry_req.add_header("x-agent-id", "autonomous-lp-bot")

            with urllib.request.urlopen(retry_req) as final_resp:
                return json.loads(final_resp.read().decode('utf-8'))
        else:
            raise

if __name__ == "__main__":
    evaluation = query_risk_oracle()
    print(f"Risk Level     : {evaluation['risk_level']}")
    print(f"R_net          : {evaluation['r_net_pct']:+.4f}%")
    print(f"Breakeven      : [{evaluation['breakeven_corridor']['lower_ratio']}, {evaluation['breakeven_corridor']['upper_ratio']}]")
```

---

## Developer Integration
- Integration cookbook & MCP guides: [`COOKBOOK.md`](./decision_engine/08_SDK_Wrappers/COOKBOOK.md)
- MCP auto-discovery card: `https://api.arsenal-quant.com/.well-known/mcp/server-card.json`

## Why L402? (Proof of Savings)
If this engine protects your agent from a $50,000 Impermanent Loss wipeout, a 500 Satoshi ($0.30) deterministic risk-validation call is not a cost — it is a mathematical insurance policy.
a2a-protocoldecision-oracledefai-agentdefi-arbitragel402mcp-server

Lo que la gente pregunta sobre Arsenal-Quant-Project

¿Qué es Faouzi122/Arsenal-Quant-Project?

+

Faouzi122/Arsenal-Quant-Project es mcp servers para el ecosistema de Claude AI. High-performance decision oracle for autonomous DeFi agents. Computes MEV risk, Impermanent Loss, and Slippage with a 6-filter sequential decision matrix. Native L402 Lightning monetization. Tiene 0 estrellas en GitHub y se actualizó por última vez today.

¿Cómo se instala Arsenal-Quant-Project?

+

Puedes instalar Arsenal-Quant-Project clonando el repositorio (https://github.com/Faouzi122/Arsenal-Quant-Project) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar Faouzi122/Arsenal-Quant-Project?

+

Faouzi122/Arsenal-Quant-Project aún no ha sido auditado por nuestro agente de seguridad. Revisa el repositorio original en GitHub antes de usarlo en producción.

¿Quién mantiene Faouzi122/Arsenal-Quant-Project?

+

Faouzi122/Arsenal-Quant-Project es mantenido por Faouzi122. La última actividad registrada en GitHub es de today, con 0 issues abiertos.

¿Hay alternativas a Arsenal-Quant-Project?

+

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Despliega Arsenal-Quant-Project en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: Faouzi122/Arsenal-Quant-Project
[![Featured on ClaudeWave](https://claudewave.com/api/badge/faouzi122-arsenal-quant-project)](https://claudewave.com/repo/faouzi122-arsenal-quant-project)
<a href="https://claudewave.com/repo/faouzi122-arsenal-quant-project"><img src="https://claudewave.com/api/badge/faouzi122-arsenal-quant-project" alt="Featured on ClaudeWave: Faouzi122/Arsenal-Quant-Project" width="320" height="64" /></a>

Más MCP Servers

Alternativas a Arsenal-Quant-Project