You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Layer 3 (indexer side) of Yearn pegged-asset & oracle monitoring. Real-time capture of Chainlink oracle updates so no round is missed between polls. The alert consumer lives in yearn/monitoring (separate issue). Tracked by the peg-monitoring epic in yearn/monitoring.
Scope
Add a ChainlinkAggregator contract per chain in apps/indexer/config.yaml with event: AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt).
Add an AnswerUpdated entity to schema.graphql (aggregator/feed address, roundId, answer, updatedAt, block, tx).
Add a handler in src/EventHandlers.ts (same shape as the existing event handlers).
Address sourcing (important):AnswerUpdated is emitted by the underlying aggregator, which rotates on phase upgrades, and its indexed params are current / roundId — not the address — so Envio eventFilters cannot scope it by feed. Statically list the current aggregator addresses resolved from each feed proxy's aggregator(). Document the resolution step and a refresh procedure for phase upgrades (a phase change is itself a risk signal — it surfaces as staleness in L2).
Feeds to cover: the Chainlink feeds behind the monitored peg set — cbBTC/USD, BTC/USD, USDC/USD, USDT/USD, USDS/USD, USDe/USD, LBTC/BTC, …
Acceptance criteria
Indexer codegens and syncs; AnswerUpdated rows are queryable via GraphQL.
References
Precedent: existing TimelockController indexing in this repo.
Context
Layer 3 (indexer side) of Yearn pegged-asset & oracle monitoring. Real-time capture of Chainlink oracle updates so no round is missed between polls. The alert consumer lives in
yearn/monitoring(separate issue). Tracked by the peg-monitoring epic inyearn/monitoring.Scope
ChainlinkAggregatorcontract per chain inapps/indexer/config.yamlwith event:AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt).AnswerUpdatedentity toschema.graphql(aggregator/feed address, roundId, answer, updatedAt, block, tx).src/EventHandlers.ts(same shape as the existing event handlers).AnswerUpdatedis emitted by the underlying aggregator, which rotates on phase upgrades, and its indexed params arecurrent/roundId— not the address — so EnvioeventFilterscannot scope it by feed. Statically list the current aggregator addresses resolved from each feed proxy'saggregator(). Document the resolution step and a refresh procedure for phase upgrades (a phase change is itself a risk signal — it surfaces as staleness in L2).Acceptance criteria
AnswerUpdatedrows are queryable via GraphQL.References
TimelockControllerindexing in this repo.contractRegister/ wildcard docs.yearn/monitoring.