Skip to content

fix(indexer): remove scaffold random writes to pool_snapshots - #33

Open
jdjioe5-cpu wants to merge 1 commit into
YieldAnchor:mainfrom
jdjioe5-cpu:fix/issue-5-remove-scaffold-snapshot
Open

jdjioe5-cpu wants to merge 1 commit into
YieldAnchor:mainfrom
jdjioe5-cpu:fix/issue-5-remove-scaffold-snapshot

Conversation

@jdjioe5-cpu

Copy link
Copy Markdown

Closes #5

Summary of Changes

  1. Adopted Option 3 (Remove scaffold placeholder writes):

    • Completely removed ecordScaffoldSnapshot()\ in \services/indexer/src/watcher.ts.
    • Stopped inserting randomly generated \ vl\ (\Math.random()) and \dynamicApy\ numbers into \pool_snapshots\ on every indexer poll.
    • Enforced the project's strict 'no fake implementations' rule: presenting empty / no data is preferred over persisting fabricated figures indistinguishable from real on-chain metrics, pending Phase 5 live contract state reads and NAV feeds.
    • Removed unused \DATABASE_TABLES\ import from \services/indexer/src/watcher.ts.
  2. Documentation:

    • Updated root \README.md\ (Indexer Architecture) to document that scaffold \pool_snapshots\ writes of randomly generated TVL and APY have been removed in accordance with the project's 'no fake implementations' rule.
  3. Automated Testing:

    • Updated \services/indexer/test/watcher.test.ts\ with a dedicated unit test asserting that \supabase.from('pool_snapshots')\ is never called during poller execution.
    • Ran and passed all indexer tests (\pnpm --filter @yieldanchor/indexer test), workspace tests (\pnpm test), \pnpm run lint, and \pnpm run typecheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: indexer writes fabricated TVL and APY into pool_snapshots

1 participant