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 分