Skip to content

Index tokenized strategy lifecycle - #49

Open
rossgalloway wants to merge 3 commits into
mainfrom
codex/tokenized-strategy-inventory
Open

rossgalloway wants to merge 3 commits into
mainfrom
codex/tokenized-strategy-inventory

Conversation

@rossgalloway

@rossgalloway rossgalloway commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Tokenized strategies can now be discovered before a vault uses them. The indexer records their initialization and shutdown events, then tracks reports from newly discovered strategies.

This PR remains separate from the Envio cutover work and stays in draft until that migration is validated and deployed.

How to review

Start with config.yaml and the two new entities in schema.graphql. NewTokenizedStrategy is emitted by the strategy during delegated initialization. Both its discovery and storage handlers use a wildcard subscription so an unknown strategy address can be indexed.

In src/EventHandlers.ts, confirm that the emitter matches the event's strategy parameter before registration or storage. Deployment records use strategyAddress for the emitter; the event supplies no factory address. Reported and StrategyShutdown remain restricted to discovered addresses, and existing factory/vault/splitter discovery stays in place.

Review test/tokenized-strategy.test.ts for actual Envio routing coverage. Lifecycle documentation is in the README. The branch includes current main and preserves its removal of the obsolete coverage document. The default test command no longer invokes the monitoring test file that main deleted.

Test plan

  • corepack pnpm codegen
  • corepack pnpm build
  • corepack pnpm test — 12 tests pass
  • git diff --check
  • Routing simulations: standalone initialization, same-block reporting, and later shutdown on all eight configured chains; existing factory-to-vault strategy discovery; mismatched-emitter rejection; address filtering for reports and shutdowns
  • After deployment: backfill and compare initialization, report, shutdown, and StrategyChanged relationships at a fixed block

Risk / impact

The persisted configuration and GraphQL schema change. Deployment requires the normal database reset and full backfill; none was performed during this change. Rollback requires restoring the previous indexer version and rebuilding its database.

Discovery now scans the initialization event signature across each configured chain. Matching events are observations, not proof of Yearn endorsement or verification of a strategy's implementation. No dependencies changed.

Add typed deployment and shutdown entities for Yearn V3 tokenized strategies.

- Register deployed strategy contracts from NewTokenizedStrategy
- Persist factory, asset, API version, and shutdown provenance
- Update Kong event coverage documentation
Keep the removal of obsolete coverage documentation from main.
The strategy lifecycle documentation will live in the README.
Discover initialization logs from unknown strategy emitters with a
wildcard subscription and preserve the actual emitter provenance.

- Reject events whose strategy parameter does not match the emitter
- Cover lifecycle routing on all configured chains and vault discovery
- Document the lifecycle contract and remove a deleted test invocation
@rossgalloway
rossgalloway marked this pull request as ready for review September 8, 2026 20:57
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.

1 participant