Arsenal Decision Engine

io.github.Faouzi122Published by GitHub account Faouzi122v2.0.1Updated Nov 2, 2026

R_net LP risk evaluator for DeFAI agents. IL + Breakeven Corridor O(1). L402 Lightning paywall.

The publisher's own server: Engine Travel Platform

VerifiedStreamable HTTPWeb executableFinanceAI & ML

Overview

AI-generated overview

Remote MCP endpoint that computes impermanent-loss risk and a breakeven corridor for constant-product LP positions, so an assistant can check a pool before…

What you can do
  • Evaluate a liquidity pool position: submit APY, price ratio and days held to get impermanent loss, accumulated yield, net return, an IL-to-yield ratio, a risk level and breakeven corridor bounds.
  • Read the returned JSON contract, including the layer field showing whether a call was served free or premium.
  • Query the same calculation over a plain REST route without an MCP client.
When to use it
Use it when an agent or user wants a deterministic, algebraic risk check on a standard constant-product or full-range LP position before deploying or adjusting capital. It measures a position's position relative to breakeven; it does not forecast prices or prevent losses.
Requirements
A remote endpoint over streamable HTTP (also described as available over stdio); no package, account, wallet or API key is needed. Free tier is 100 calls per IP per day. Network access to the provider's API is required.
Before you install
The README states the L402 Lightning payment path is not operational in production and no payment is expected or accepted, so treat any paid tier as unavailable. The sample integration code references a Lightning wallet key with send permission; if you ever use such a key, keep it in an environment variable and use a dedicated low-balance wallet. The response HMAC tag is a symmetric marker, not third-party-verifiable proof. Pool parameters are sent to a third-party API.

Installation

In SourceWeft

  1. Open Arsenal Decision Engine in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.Faouzi122%2Farsenal-decision-engine/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "arsenal-decision-engine": {
      "type": "http",
      "url": "https://api.arsenal-quant.com/mcp"
    }
  }
}

README

Arsenal Decision Engine 🛡️

The Risk-Validation Layer for Autonomous AI Agents (DeFAI)

[Arsenal-Quant-Project MCP server] [smithery badge]

Method and raw results are published — backtest script · result data (180 days of Binance ETH/USDC daily closes): 🔬 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. 📐 This engine measures; it does not forecast. No predictive-accuracy figure is claimed — read the published result files and judge the method for yourself.


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. 100 free calls per IP per day — no wallet, no sign-up, custom parameters included. An L402 payment path is implemented in the gateway but is not operational in production: today, the engine is free to use.


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.

Two ways to call it

1. MCP JSON-RPC — the endpoint advertised on the MCP registry

POST https://api.arsenal-quant.com/mcp
json
{"jsonrpc":"2.0","id":1,"method":"tools/call", "params":{"name":"evaluate_pool",           "arguments":{"apy":0.20,"price_ratio":0.85,"days_held":30}}}

Standard MCP handshake: initialize → tools/list → tools/call. Available over streamable HTTP and stdio.

2. REST convenience route — no MCP client required

GET https://api.arsenal-quant.com/mcp/evaluate?apy=0.20&price_ratio=0.85&days_held=30

Both routes run the same calculation and the same quota. Note that /mcp/evaluate is GET-only: a POST to that path returns 405 Allow: GET, because JSON-RPC belongs on /mcp.

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": "<HMAC-SHA256 hex — illustrative placeholder, yours will differ>",  "layer": "FREE"}

layer reports how the call was served: FREE while inside the free quota, PREMIUM once an L402 payment has been verified. The call shown above is served as FREE.


Access and Pricing

  • Free tier — evaluate_pool: 100 calls per IP per day, custom parameters included. No Lightning wallet is needed. This is the only tier currently in service.
  • Beyond the free quota: the gateway implements the L402 challenge and returns 402 with a WWW-Authenticate header. The payment rail is not operational in production — invoices issued today are not settleable, and no payment is expected or accepted. Treat the paid tier as announced, not available.
  • GET /mcp/audit/latest: 3 free calls per IP per hour; beyond that the route returns 402. That response documents the protocol; it is not a live payment path.

Python Integration Example

python
import urllib.requestimport urllib.errorimport jsonimport reimport 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 requires a wallet key with send permission to pay an invoice.# Use a DEDICATED wallet funded with a small working balance, and never the key# of a wallet holding significant funds. Keep it in the environment, never in code.LNBITS_PAYMENT_KEY = os.getenv("LNBITS_PAYMENT_KEY")
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_PAYMENT_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
  • MCP auto-discovery card: https://api.arsenal-quant.com/.well-known/mcp/server-card.json

Why per-call pricing is the intended model

This engine does not prevent losses, and it makes no claim about how much money it saves you. What it does is compute — deterministically, in $\mathcal{O}(1)$ — whether a position sits above or below its breakeven boundary. Each response carries an HMAC tag over the result, which lets the engine detect tampering with its own output; it is a symmetric provenance marker, not a proof a third party can verify independently.

The intended model is per-call pricing, so the cost can be budgeted like any other input. That model is not yet in service: today every call is free.

Source: README.md at commit c84bac2

Tools

1

evaluate_pool

Evaluate LP position risk and calculate R_net & breakeven corridor.

Parametersapyrequireddays_heldprice_ratiorequired

Version history

1
  1. v2.0.1LatestSep 16, 2026

Score

75% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Engine integrations