Skip to content

Add health factor alert thresholds#134

Open
Sikkra wants to merge 1 commit into
Dgetsylver:mainfrom
Sikkra:bounty-58-hf-alert-threshold
Open

Add health factor alert thresholds#134
Sikkra wants to merge 1 commit into
Dgetsylver:mainfrom
Sikkra:bounty-58-hf-alert-threshold

Conversation

@Sikkra
Copy link
Copy Markdown

@Sikkra Sikkra commented May 19, 2026

Summary

  • Adds hf_threshold and last_hf_alerted_at subscription fields plus an HF due index.
  • Extends subscription validation/storage and the alert modal so users submit an HF threshold with their APY alert.
  • Computes reserve health factor per leverage bracket in the cron path and sends a separate throttled HF breach email when the estimated HF is at or below the subscriber threshold.
  • Adds the missing Cloudflare workers type dependency and tsconfig option needed for the alerts worker typecheck.

Verification

  • npm run build from frontend/
  • npm ci; npx tsc --noEmit from alerts/
  • git diff --check
  • Headless Edge/CDP check on http://127.0.0.1:5198/: alert modal showed the HF threshold field and submitted hf_threshold: 1.07 in the /subscribe payload; no console warnings/errors or runtime exceptions were reported.

Closes #58

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.

E1: Health-factor alert channel

1 participant