AgentData - Executable Liquidity / Exit-Cost

io.github.phenicea由 GitHub 账号 phenicea 发布v0.1.0更新于 Oct 24, 2026

Size-aware exit cost, depeg risk & liquidity fragility for a Base token (x402, testnet).

发布方自己的服务:Executable Science

已验证Streamable HTTP可网页运行金融数据与分析

概览

AI 生成的概览

远程 MCP 端点,为 Base 上的代币计算考虑卖出规模的退出成本、脱锚风险与流动性脆弱度。

可以做什么
  • 按给定卖出规模估算退出代币仓位的实际成本,以基点和数量表示,含价格冲击与手续费。
  • 找出该笔退出的最优跨场所路径。
  • 给出综合流动性脆弱度评分,并为锚定资产给出脱锚风险评分。
  • 可选择不同计价档位(quote、risk、deep),后两档还提供多规模退出成本曲线与成本上限前的最大可交易规模阶梯。
适用场景
当助手需要在行动前判断在 Base 上退出某个代币仓位的成本或风险时适用,例如确定交易规模,或检查流动性是否过薄、过于脆弱。
运行要求
远程 streamable HTTP 端点;未声明任何软件包、账户、API 密钥或请求头。README 描述按次计费、通过 x402 以 USDC 结算,测试网价格强制为零。
安装前请注意
README 描述按次计价的档位(quote、risk、deep),通过 x402 以 USDC 结算,主网使用可能产生费用;默认测试网且价格强制为零。数据由链上来源计算得出,仅供参考,不构成保证。链上模式需要经过验证的资金池注册表。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AgentData - Executable Liquidity / Exit-Cost,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.phenicea%2Fagentdata-liquidity-exit-cost/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "agentdata-executable-liquidity-exit-cost": {
      "type": "http",
      "url": "https://agentdata-liquidity-exit-cost.onrender.com/mcp/"
    }
  }
}

README

AgentData — Executable Liquidity (endpoint #1)

A pay-per-call data endpoint for AI agents: size-aware exit cost, depeg risk, and liquidity fragility for a token on Base. Not raw prices — computed, normalized, decision-grade intelligence an agent needs before it acts. Settled in USDC via x402 (Phase 2). Sourced on-chain, so the derived data is cleanly redistributable.

Strategy, values, and roadmap live in CLAUDE.md. Decisions are logged in decisions/DECISION_LOG.md and decisions/adr/.

What it answers

"If I try to exit this position right now, what does it actually cost me, how much can I move before slippage blows past X bps, and how fragile is that liquidity?"

Three priced tiers (single source of truth in agentdata/api/pricing.py):

TierContentsMainnet price
quotebest-route exit cost for one size$0.008
riskexit cost + fragility (+ depeg for pegged assets) — default$0.02
deeprisk + multi-size exit-cost curve + max-size-before-cost ladder$0.04

Testnet forces every price to $0 (the 402 flow is still exercised end-to-end).

Layout

src/agentdata/  config.py            # env-driven; NETWORK_MODE testnet|mainnet (testnet default)  compute/             # the value-add: pure, deterministic, unit-tested math    amm.py             #   constant-product + Solidly stable curve, exit cost    routing.py         #   cheapest-venue selection    depeg.py           #   depeg deviation / dispersion / score    fragility.py       #   depth + concentration + convexity -> fragility score    tiers.py           #   quote / risk / deep orchestration  chain/               # on-chain Base reads (Aerodrome / Uniswap), web3 lazy    provider.py        #   FixturePoolProvider (default) + factory    onchain.py         #   OnChainPoolProvider (env-gated, no guessed addresses)  api/                 # FastAPI JSON layer + pricing + stable schema  monitoring/          # uptime, latency p50/p95, error rate, calls per tiertests/                 # unittest (stdlib for compute; fastapi for api)

Run it (local, no funds, no network)

bash
pip install -e .            # or: pip install fastapi pydantic 'uvicorn[standard]'uvicorn agentdata.api.app:app --reload# then:curl 'http://127.0.0.1:8000/v1/liquidity/exit-cost?token=WETH&size=10&tier=risk'curl 'http://127.0.0.1:8000/pricing'curl 'http://127.0.0.1:8000/metrics'

Defaults: NETWORK_MODE=testnet, POOL_SOURCE=fixture (deterministic demo pools WETH, THIN, USDX). See .env.example.

Test

bash
# compute core needs no dependencies:PYTHONPATH=src python -m unittest discover -s tests

Status

  • Phase 1 (local endpoint): done. compute + chain seam + API + monitoring, 42 tests green.
  • Phase 2 (x402 testnet): next. Payment middleware in front of the API, free testnet facilitator on Base Sepolia. No real USDC; mainnet is an escalated human decision (CLAUDE.md §0/§14).
  • On-chain mode requires a verified pool registry before use (ADR-001) — the code refuses to run on guessed contract addresses rather than fake data.

来源:README.md,提交 c756cb8

工具

1

liquidity_exit_cost

Size-aware exit cost, depeg risk, and liquidity fragility for a token on Base. Given a token and a sell size, returns the realized cost of exiting (price impact + fee, in bps and units), the best route across venues, an aggregated fragility score, and — for pegged assets — a depeg-risk score. Computed deterministically from on-chain AMM state, so the result is reproducible and auditable. Three tiers by compute depth (default 'risk'): 'quote' = best-route exit cost for one size; 'risk' = exit cost + fragility (+ depeg for pegged tokens); 'deep' = adds a multi-size exit-cost curve, max-size-before-cost thresholds, and an internal cross-check. Pricing per call (USDC): quote = $0, risk = $0, deep = $0. Status: testnet/preview — payment runs over the x402 HTTP surface, not this tool.

输入参数poolsize必填tiertoken必填

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Executable 集成