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 整合