Skip to content

[Feature] Contract event monitoring and alerting service #707

Description

@collinsezedike

Summary

Nothing consumes the vault's on-chain events. #698 added event emission for admin actions (paused, transfer, accept, adapter, migrate), and #563 tracks extending that to every state-mutating call, but even the events that already exist today have no alerting service watching for them.

Motivation

set_paused, transfer_admin, and migrate_adapter are exactly the actions an operator needs to know about immediately, not discover by manually polling. Without an alerting layer, an unexpected pause, an unauthorized-looking admin rotation, or an adapter migration going through would only be noticed by whoever happens to check the app.

Proposed Solution

A small service (or a scheduled function alongside the existing keepers in packages/stellar-sdk-helpers) that:

  • Polls Soroban RPC getEvents for the vault's topic-keyed events (reusing the discovery pattern already built for admin-history.ts)
  • Sends an alert (Slack/Discord webhook, or email, whichever the maintainer prefers) on paused, transfer, adapter, and migrate events
  • Tracks its own last-processed ledger the same way the accrual/migration keepers track their heartbeat, so a restart doesn't replay old events

Scope

Field Value
Area SDK / API
Protocol affected None
Network Both
Breaking change? No

Alternatives Considered

Polling from the frontend was considered and rejected: alerting needs to work even when nobody has the app open, and a browser tab is not a reliable monitoring surface.

Acceptance Criteria

  • Service polls vault events on a schedule and dedupes against previously-seen ledgers
  • Sends an alert on paused, transfer, adapter, and migrate events
  • Documented in the operations docs alongside the existing keeper schedule

Additional Context

Depends on #563 landing further event coverage to be fully useful (deposit/withdraw are not yet instrumented), but the admin-action events already merged in #698 are enough to build the first version against.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programenhancementNew feature or requesthardComplex implementation spanning multiple packages or involving Soroban contractssdkInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helperssorobanInvolves Soroban smart contract invocations or Soroban RPC calls

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions