尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Checks whether active Beefy vaults on Base earn their reported APY, using on-chain share-price growth
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Live: https://yield.rahilbhavan.com
Yield/Fidelity is a Next.js dashboard for active Beefy vaults on the Base network. Once a day, it reads each vault's price per share (PPS) on-chain and stores the reading with its block provenance in Supabase. It then compares realized PPS growth with the APY that Beefy reported over the same intervals. It also has a calculator that estimates how many days a deposit needs to earn back its Base entry and exit costs.
src/lib/beefy.ts keeps Beefy vaults on Base with status active, sorts them by TVL and takes the largest 50 (limit = 50). The cap is a ceiling, not a target. On 24 Oct 2026, Beefy's public /vaults endpoint listed 537 Base vaults: 26 active, 200 paused and 311 eol. The live /api/health reported 26 tracked vaults and 100% snapshot coverage the same day, so the count matches Beefy's active list. On 21 Oct 2026 /api/health had reported 50; I did not record Beefy's list that day, so I cannot say which vaults left. Beefy's /vaults API shows 200 Base vaults paused at once at 2026-10-21 23:00 UTC (the shared pausedAt 1792623600), and the monitor's daily export shows tracked vaults falling from 50 to 26 between the 22 Oct and 23 Oct scrapes, with summed TVL in the export falling from about $13.9M to about $3.7M (about $13.6–14.2M across 13–22 Oct, about $3.3–3.7M across 23–25 Oct). Each daily run marks vaults missing from the active list inactive (is_active = false).src/lib/drift.ts.Σ TVL × (expected APY − realized APY)), and a recommended action./ can use the live headline APY, the time-weighted recorded APY, or realized share-price growth. It shows downside, current, and upside scenarios./api/export returns the valid observations from the rolling 90-day window as CSV or JSON. /api/health reports RPC, freshness, and coverage status. /api/summary returns the dated headline figures that the snapshot archive stores.Headline figures, as of 25 Oct 2026 (UTC date of the latest daily snapshot, snapshots/2026-10-25.json):
| Figure | Value |
|---|---|
| Capital analyzed | $3.17M (9 of 26 vaults pass the evidence gate) |
| Vaults requiring review | 3 |
| Annualized gap | $91.8K |
| Tracked vaults | 26 |
These values move with every daily snapshot. The dated snapshot archive keeps each day's figures in the repository, so a number quoted anywhere can be traced to a date. Earlier figures differ: the 21 Oct 2026 capture showed an $89.5K gap on 50 tracked vaults, before Beefy's active list shrank to 26. That capture was not archived. The 25 Oct file was recomputed from the public /api/export rows with the dashboard code, and it matches the live dashboard ($3.2M, 11.52% expected, 8.62% realized, $91.8K, 3 vaults). Later files come from /api/summary on the live site.
/api/cron/scrape daily at 01:15 UTC (vercel.json). The route requires the CRON_SECRET bearer token.src/lib/beefy.ts loads vault, APY, TVL, and price data from the Beefy API.src/lib/pps.ts reads getPricePerFullShare() and decimals() for every vault in one Multicall at a single Base block.supabase/migrations/ write snapshots, failures, and the run status in one transaction. Unique keys on (chain, run_date) and (vault_id, snapshot_date) make a retry safe.src/lib/drift.ts and src/lib/dashboard.ts compute interval-matched drift, the evidence gate, and the portfolio summary for src/app/dashboard/.The project guide has the full architecture diagram, formulas, and database model.
Prerequisites: Node.js 20 or later (CI uses Node.js 20) and npm. The dashboard needs a Supabase project. The calculator works without one. The database tests need PostgreSQL 16 and psql.
git clone https://github.com/RahilBhavan/beefy-yield-fidelity-monitor.git
cd beefy-yield-fidelity-monitor
npm ci
npm run check # lint, unit and route tests, production build
npm run check ran 53 Vitest tests on 25 Oct 2026: 52 passed and 1 skipped. The skipped test is the opt-in live integration test. The other suites:
npm run snapshot # write snapshots/<as-of date>.json from the live /api/summary
npm run test:e2e # 16 Playwright cases (8 tests × desktop and mobile Chromium), with axe WCAG A/AA checks
npm run test:integration # live Supabase and Base RPC test; needs credentials and network access
npm run test:load # smoke load on one endpoint (default /api/data); needs a running server
To run the app:
cp .env.example .env.local
npm run dev
Open the URL that npm run dev prints (Next.js uses port 3000 unless it is taken). Without Supabase settings, the dashboard shows an explicit "unconfigured" state. To collect data, set NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, and CRON_SECRET in .env.local. Apply the files in supabase/migrations/ in filename order. Then start the first scrape, with APP_URL set to the URL npm run dev printed:
curl -H "Authorization: Bearer $CRON_SECRET" "$APP_URL/api/cron/scrape"
BASE_RPC_URLS is optional. The public Base RPC is the fallback. Keep the service-role key out of browser code.
CI (.github/workflows/ci.yml) runs npm run check, npm audit --omit=dev, every migration plus supabase/tests/production_fidelity_test.sql on PostgreSQL 16, and the Playwright suite.
src/app/: pages (/, /dashboard, /dashboard/strategies, /methodology) and API routes (cron/scrape, data, export, gas-estimate, health).src/components/: calculator, portfolio table, and drift chart.src/lib/: Beefy adapter, PPS reads, gas model, drift method, and dashboard analysis, with their unit tests.supabase/migrations/: PostgreSQL schema, row-level security, and ingestion functions.supabase/tests/: database invariant tests.tests/e2e/: Playwright and axe browser tests.snapshots/: one JSON file per as-of date with the headline figures, plus index.json.scripts/: the snapshot writer and the load-smoke script.docs/: project documentation..github/workflows/: CI and a production health probe that runs every 15 minutes.PRD.md: the product requirements document./api/export publishes the rolling 90-day window with its provenance, so you can recompute the dashboard figures.Beefy data belongs to Beefy. The MIT license covers this project's code, not third-party data, names, or marks.
npm run snapshot; no scheduled job commits to it.MIT. See LICENSE.
Part of Rahil Bhavan's projects.