Stakechain

io.github.Abstract36由 GitHub 账号 Abstract36 发布v0.3.0更新于 Oct 30, 2026

Live Base staking/lending yields (APY, TVL, vaults) as MCP tools; x402 pay-per-request tier

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

概览

AI 生成的概览

读取 Base 上实时的质押与借贷收益(APY、TVL、金库、风险),并可生成存款调用数据,数据接口按 x402 逐次付费。

可以做什么
  • 浏览 Base 上的质押与借贷池,查看 APY、TVL、项目与资产,包括无法存入的池子
  • 针对单一资产找出经垃圾农场过滤后的最高 APY 池
  • 列出可操作的借贷金库(Morpho、Aave V3、Moonwell 及自有质押池),含存款地址、精度与风险信息
  • 在投入资金前查看单个市场的风险画像
  • 查询每日 APY 与 TVL 历史,含最小值、中位数、最大值与波动率
  • 跨所支持协议生成有序的、可直接签名的存入或退出调用数据
适用场景
适合需要比较或回答 Base DeFi 收益问题、评估某个市场风险,或准备存款交易的场景。该项目已标注停止维护,应把数据视为快照而非实时行情。
运行要求
可作为远程端点使用,也可通过 npx 运行本地 npm 包 stakechain-mcp,本地方式需要 Node.js。可选环境变量 STAKECHAIN_API 用于设置收益 API 的基础地址。未声明账号或 API 密钥;机器数据接口通过 Base 上的 USDC 以 x402 按次付费。
安装前请注意
README 说明项目已退役且不再维护,利率与端点可能过时或无人监控。付费数据接口每次约 0.001 美元,以 USDC 在链上结算,订阅也需通过 x402 付款。build_deposit 返回的是把资金转入 DeFi 协议的交易,存在智能合约与市场风险;README 明确说明这不是投资建议。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

{
  "mcpServers": {
    "stakechain": {
      "type": "http",
      "url": "https://stakechain-api.vercel.app/mcp"
    }
  }
}

README

StakeChain Labs

⚠️ Retired 2026-11-05 — not maintained

This project is finished. The daily and weekly schedules are off, nothing is being updated, and no claim below should be read in the present tense.

It was built to sell DeFi rate data to machines over x402. It worked, and it earned $0.008 a month. Sweeping the entire x402 discovery index — 3,315 sellers — showed total market revenue of $96,010 per 30 days, of which 71.9% is one gift-card checkout endpoint, and 2,736 sellers earn under $1 a month. There is no price at which selling data on that rail pays.

Read POSTMORTEM.md for the numbers, the three conclusions the data overturned, and what is worth taking from the code. The deployed links below may still respond; they are not being watched.

[CI] [npm] [License: MIT] [stakechain-mcp MCP server – quality and maintenance score on Glama]

Live: landing · dashboard · API · contract on BaseScan · Blockscout

STACH is tradeable: Uniswap v4 pool STACH/ETH live on Base (initial price 4,000,000 STACH/ETH) — routable through aggregators (LI.FI verified).

An open staking-yield experiment on Base. Live aggregator of staking and lending rates across Base protocols — readable by humans on a dashboard, consumable by AI agents over MCP, payable by machines over x402.

No seed round. No token presale. Just a running, open-source experiment. Concept and plan: docs/PIVOT-2026.md.

The product

PieceWhat it does
api/Base yields aggregator with junk-farm filters, rate history and market profiles. Aave and Moonwell are read from their own contracts, not a third-party snapshot; x402 machine-payment endpoints
agents/MCP server (5 tools, on npm) + runnable recipes + a resident analyst that pays the public API for its own data
dashboard/React dashboard: Base Yields, Earn (Morpho, Aave, Moonwell), Borrow, Swap, STACH staking, Portfolio
contracts/STACH token + flexible/locked staking — audited & hardened (audit), plus the treasury timelock — 38 tests
website/Landing page (static, GitHub-Pages-ready)

Legacy 2021–2023 material (Laravel site, old static site, branding, original docs) is kept under website-laravel/, website-static/, branding/, docs/.

Monetization: machines pay, on-chain, automatically — LIVE

Human endpoints (/yields, /vaults) are free. Machine endpoints (/v1/*) speak the x402 protocol with enforcement on: HTTP 402 + payment requirements → the client signs an EIP-3009 USDC authorization ($0.001/request) → it settles on-chain through the Coinbase facilitator, with our own EIP-3009 settler as the fallback (no accounts, no API keys either way). Revenue lands at the admin wallet; api/pay-client.js is a reference paying client.

Embeddable badges: live rates as SVG for any README — see docs/BADGES.md. No key, no signup.

[Aave USDC] [Spark USDC] [x402 payments]

API reference: docs/API.md — endpoints, the x402 flow, MCP tools and what each one answers.

Rate history: /history?pool=<id>&days=30 answers the question a live APY cannot — has this rate held, or did it appear yesterday? Daily snapshots are committed to data/history/ in this repo, so the series is verifiable and survives us. Agents get it as the yield_history tool.

Pricing: ~$0.001/request (pure x402; the three data routes differ by a millionth of a dollar so the settled transfer names which one was bought), or subscriptions bought with a single x402 payment — Developer $19/30d, Professional $99/30d (GET /v1/subscribe/<tier> returns a signed X-API-KEY that skips per-request payments). Public stats: /stats reports payment counts and revenue computed from on-chain USDC transfers — verifiable by anyone on BaseScan.

Real yield: collected USDC is distributed to STACH stakers through RevenueDistributor (verified; merkle epochs reproducible from public state via contracts/scripts/revenue-snapshot.js, 180-day sweep-back).

MCP config

The yields aggregator is an MCP server, published on npm as stakechain-mcp. Add it to any MCP-compatible client:

json
{  "mcpServers": {    "stakechain": { "command": "npx", "args": ["-y", "stakechain-mcp"] }  }}

Quickstart

bash
# 1. Yields APIcd api && npm install && npm start            # :4000
# 2. Dashboardcd dashboard && npm install --legacy-peer-depsnpm start                                     # :3000, reads the API
# 3. Give the data to your AI agent (published on npm, no clone needed)claude mcp add stakechain -- npx -y stakechain-mcp
# 4. Contracts (test + cheap deploy)cd contracts && npm installnpx hardhat test                              # 38 testsnpm run deploy:baseSepolia                    # free testnet

STACH token

Deployed at the same address on both networks (verified via Sourcify, exact match):

Initial holder / admin: 0x2Ab5A19aabc599C1a24CC0541ECB757b56976661. The dashboard targets mainnet by default; set REACT_APP_CHAIN=baseSepolia for the testnet.

Fixed supply 42M. At deployment: 3M held by the contract as the staking reward reserve (1M flexible / 2M locked over 360 days), 39M to the admin wallet. The admin wallet now holds none of it: on 2026-10-31 it moved 24.43M (58.16% of supply) into a Dutch auction and a Uniswap v4 pool initializer — see the table below and docs/TOKENOMICS.md. The 2022 contract had two critical bugs (recipient-burning transferFrom, unbacked reward minting) — fixed and regression-tested in 2026: docs/AUDIT-2026-10.md.

The distributor above is deployed and verified, but carries no meaningful revenue yet — /stats reports the real figure, including how much came from our own agent. Revenue first, distribution second: the mechanism exists so it can be checked, not because there is something to distribute.

Supply transparency

Full detail, including lock schedules and the usage-rewards budget: docs/TOKENOMICS.md.

Every STACH is accounted for (snapshot 2026-11-02, verify on-chain):

HolderAddressSTACHShare
Dutch auction — 58.16% of supply was moved here and to the initializer below on 2026-10-31; terms not yet published, nothing sold so far0xBd0c…FecC712.21M29.08%
Uniswap v4 pool initializer for that auction0xf101…600012.21M29.08%
Uniswap v4 STACH/ETH pool liquidity (not locked)0x4985…2b2b8.14M19.39%
Timelocked treasury — locked until 2027-04-28, linear to 2028-10-19, no owner and no recovery path0x6425…D69C6.30M15.00%
Staking reward reserve (3M) + user stakes, held by the token contract0x82c5…71663.03M7.22%
Deployer (deploys contracts, pays usage rewards)0x2974…734F~100k0.24%
Treasury / operations — now empty0x2Ab5…666100%

15% sits in a verified timelock with no owner, no pause and no recovery function, and 7.22% is the staking reward reserve the token contract can only pay to stakers. About 80% of supply has never been in public hands — the auction and its initializer hold 58.16% between them, and the auction's terms are not published yet, so we cannot tell you here when or at what price those tokens reach the market. Concentration flags remain entirely fair; this table exists so the claim can be checked rather than trusted.

Honest part

This is an experiment, not "the future of finance". Everything here is MIT-licensed, the audit is public, the data endpoints filter out obvious degen traps (min TVL, APY ceiling, no-IL default). Nothing in this repository is financial advice.

来源:README.md,提交 9e1bb7c

工具

6

list_base_yields

Survey staking and lending opportunities on Base: APY, TVL, project and asset for each. Use this for breadth — browsing the market, answering 'what is available', or filtering a wide set. It covers pools this server cannot deposit into as well as ones it can. Use something else when: you want one asset's single best option (`best_yield`); you intend to deposit and need a contract address (`list_lending_vaults`); you are judging one market rather than comparing many (`market_profile`). Ranks by TVL unless sortByApy is set. Four-digit emission farms are filtered out by default. Returns market data, not a recommendation; any row's `pool` id can be passed to `yield_history`.

输入参数assetminTvlstablesortByApy

best_yield

The single highest-APY pool on Base for one asset, with junk-farm filters applied (minimum TVL, APY ceiling, no impermanent-loss exposure). Use this for a direct 'where is the best rate for X' question when one answer is wanted rather than a list. Use something else when: you want to compare several options (`list_base_yields`); you intend to deposit (`list_lending_vaults` returns the address). Important: it ranks by rate alone. A high answer here is a starting point, not a verdict — follow it with `market_profile` for the curator's cut and whether the money can be withdrawn, and `yield_history` for whether the rate has held.

输入参数asset必填

list_lending_vaults

The Base lending shelf an agent can act on: Morpho ERC-4626 vaults, Aave V3 reserves, Moonwell markets and this project's own staking pools, each with the contract address to deposit into (`depositTo`), the asset's address and decimals, and a `risk` block (fee, age, concentration, utilisation, incentive share). Use this whenever a deposit might follow, or when you need a market id to pass to `market_profile` or `yield_history`. Use `list_base_yields` instead when surveying the wider market, including pools that cannot be deposited into here. Rates for Aave and Moonwell are read from their own contracts, so markets missing from aggregator snapshots appear here.

无需输入参数。

market_profile

Risk profile for one market, for the moment before capital is committed. Use this when a specific market has been chosen and the question is whether to go ahead. It is the one tool that answers 'what else should I know besides the rate'. Use something else when: you are still choosing between markets (`list_base_yields`, `best_yield`); you only want to know whether the rate moved (`yield_history`); you need the deposit address (`list_lending_vaults`). Prerequisite: the market must be on this server's shelf — a vault, reserve or pool from `list_lending_vaults`. Arbitrary pool ids from `list_base_yields` will not resolve. Returns `score` (0-100) and `band` ('solid', 'fair', 'thin' or 'fragile'), plus a `signals` object holding the six inputs behind it: size (TVL), track_record (days running), stability (APY volatility from daily snapshots), yield_quality (share of the APY that is borrower interest rather than incentives that can stop), cost (the curator's percentage cut) and diversification (share sitting in the largest position). Each signal carries its raw value and its sub-score, and `method.weights` gives the weighting, so the score can be recomputed. A signal lacking data reports score null and is excluded from the weighting rather than guessed at. Pair with `yield_history` for an unusually high rate. Describes what has happened, not what will.

输入参数pool必填

yield_history

Daily APY and TVL history for one market, with min, median, max and volatility over the window. Use this for one question only: has this rate held, or did it appear yesterday? Call it before acting on any unusually high rate. Use something else when: you want the other risk factors — fee, size, utilisation, concentration — which are in `market_profile`; you are still choosing a market (`list_base_yields` or `best_yield`). Prerequisite: a market id from one of the list tools. Check `observations` before concluding anything — a market added recently has few snapshots, and a short series is not evidence of stability.

输入参数dayspool必填

build_deposit

Turns a chosen market into signed-ready calldata: an ordered list of transactions to deposit into it or leave it, across Morpho vaults, Aave reserves, Moonwell markets and this project's staking pools — three different protocol interfaces behind one call. The approve step is included only when the current allowance does not already cover the amount, read on-chain at request time. Use this once a market has been chosen and the decision is made. Use something else when: still choosing (`list_lending_vaults`, `best_yield`); weighing whether to go ahead (`market_profile`, `yield_history`). Nothing is signed or sent — the caller holds the keys. Simulate before sending. `amount: "all"` on a withdrawal exits by share rather than by figure, so interest accruing between the call and the block is not left behind.

输入参数from必填pool必填actionamount必填

版本历史

2
  1. v0.3.0最新Oct 30, 2026
  2. v0.1.2Oct 29, 2026

评分

已满足适用检查项的 100%

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

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