Stakechain

io.github.Abstract36Published by GitHub account Abstract36v0.3.0Updated Oct 30, 2026

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

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

Reads live Base staking and lending yields (APY, TVL, vaults, risk) and builds deposit calldata, with x402 pay-per-request data access.

What you can do
  • Survey Base staking and lending pools with APY, TVL, project and asset, including pools it cannot deposit into
  • Find the single best-APY pool for one asset with junk-farm filters applied
  • List actionable lending vaults (Morpho, Aave V3, Moonwell, own staking pools) with deposit addresses, decimals and a risk block
  • Profile one market's risk factors before committing capital
  • Check daily APY and TVL history with min, median, max and volatility
  • Build ordered, signed-ready deposit or exit calldata across the supported protocols
When to use it
Useful when an assistant needs to compare or answer questions about Base DeFi yields, vet a specific market's risk, or prepare a deposit transaction. The project is marked retired and unmaintained, so treat the data as a snapshot rather than a live feed.
Requirements
Runs as a remote endpoint or as a local npm package (stakechain-mcp) via npx, so Node.js is needed for the local option. An optional STAKECHAIN_API environment variable sets the yields API base URL. No accounts or API keys are declared; machine data routes are paid per request over x402 with USDC on Base.
Before you install
The README states the project was retired and is no longer maintained, so rates and endpoints may be stale or unwatched. Paid data routes cost about $0.001 per request in USDC settled on-chain, and subscriptions are bought with an x402 payment. build_deposit returns transactions that move funds into DeFi protocols, which carry smart-contract and market risk; the README notes it is not financial advice.

Installation

In SourceWeft

  1. Open Stakechain 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.Abstract36%2Fstakechain/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": {
    "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.

Source: README.md at commit 9e1bb7c

Tools

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`.

ParametersassetminTvlstablesortByApy

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.

Parametersassetrequired

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.

Takes no parameters.

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.

Parameterspoolrequired

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.

Parametersdayspoolrequired

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.

Parametersfromrequiredpoolrequiredactionamountrequired

Version history

2
  1. v0.3.0LatestOct 30, 2026
  2. v0.1.2Oct 29, 2026

Score

100% 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