AgentData - Executable Liquidity / Exit-Cost

io.github.pheniceaPublished by GitHub account pheniceav0.1.0Updated Oct 24, 2026

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

The publisher's own server: Executable Science

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

Remote MCP endpoint that computes size-aware exit cost, depeg risk and liquidity fragility for a token on Base.

What you can do
  • Estimate the realized cost of exiting a token position at a given sell size, in basis points and units, including price impact and fees.
  • Find the cheapest route across venues for that exit.
  • Get an aggregated liquidity fragility score, plus a depeg-risk score for pegged assets.
  • Choose a priced tier (quote, risk or deep) that adds multi-size exit-cost curves and a max-size-before-cost ladder.
When to use it
Useful when an assistant has to judge how expensive or risky it would be to exit a token position on Base before acting, for example sizing a trade or checking whether liquidity is too thin or fragile.
Requirements
A remote streamable HTTP endpoint; no package, account, API key or header is declared. The README describes a pay-per-call model settled in USDC via x402, with testnet prices forced to zero.
Before you install
The README describes per-call pricing tiers (quote, risk, deep) settled in USDC via x402, so mainnet use could spend money; testnet is the default and forces prices to zero. Data is computed from on-chain sources and is decision support, not a guarantee. On-chain mode requires a verified pool registry.

Installation

In SourceWeft

  1. Open AgentData - Executable Liquidity / Exit-Cost 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.phenicea%2Fagentdata-liquidity-exit-cost/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": {
    "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.

Source: README.md at commit c756cb8

Tools

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.

Parameterspoolsizerequiredtiertokenrequired

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

90% 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
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.

Other Executable integrations