Index tokenized strategy lifecycle - #49
Open
rossgalloway wants to merge 3 commits into
Open
rossgalloway wants to merge 3 commits into
rossgalloway wants to merge 3 commits into
Conversation
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
marked this pull request as ready for review
September 8, 2026 20:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.yamland the two new entities inschema.graphql.NewTokenizedStrategyis 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 usestrategyAddressfor the emitter; the event supplies no factory address.ReportedandStrategyShutdownremain restricted to discovered addresses, and existing factory/vault/splitter discovery stays in place.Review
test/tokenized-strategy.test.tsfor 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 codegencorepack pnpm buildcorepack pnpm test— 12 tests passgit diff --checkRisk / 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.