Skip to content

Add liquidation imminent alerts#150

Open
Sikkra wants to merge 1 commit into
Dgetsylver:mainfrom
Sikkra:bounty-59-liquidation-imminent
Open

Add liquidation imminent alerts#150
Sikkra wants to merge 1 commit into
Dgetsylver:mainfrom
Sikkra:bounty-59-liquidation-imminent

Conversation

@Sikkra
Copy link
Copy Markdown

@Sikkra Sikkra commented May 19, 2026

Closes #59

Summary

  • add a separate LIQUIDATION IMMINENT email template for health-factor emergencies
  • compute theoretical health factor per pool/asset/leverage bracket from live reserve collateral and liability factors
  • send liquidation-imminent alerts independently of negative-APY alerts when HF is below 1.05
  • rate-limit liquidation alerts separately per subscription to at most once per 6 hours
  • optionally POST a liquidation webhook payload via LIQUIDATION_WEBHOOK_URL in parallel with email delivery
  • add the D1 column/index and a defensive runtime column migration for existing deployments
  • make Worker type-checking pass by adding Cloudflare worker types and removing a stale unused XDR helper

Verification

  • npm ci in alerts
  • npx tsc --noEmit in alerts
  • npm test --if-present in alerts
  • git diff --check

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.

E2: Liquidation-imminent cron (HF < 1.05)

1 participant