Prerequisites
- The in-app SDK installed.
- The lending pool and chain you want to watch (you’ll set these on the trigger).
Build it
1
Trigger when the health factor crosses your line (no code)
Use the Health factor crossed trigger. You set the chain, the lending pool, and the threshold, where
1.0 is liquidation, so a value like 1.2 warns the borrower early. See Triggers and conditions.trigger (Health factor crossed 1.2) → send in-app (Your position is at risk) → branch (has email → also send email)Lead with in-app: it’s immediate, and a borrower checking their position is likely in your dApp.2
Escalate as it worsens
Add a second, more urgent trigger at a tighter threshold (say
1.05) for a stronger “act now” message, so the urgency matches the risk.3
Confirm when they recover (optional)
A short “you’re back in the safe zone” once their health factor recovers closes the loop and builds trust.
4
Activate and publish.
Both are required.
Test
With a wallet you control on a testnet pool, move the position toward the threshold and confirm the alert fires in-app and by email.This is a time-sensitive, high-stakes alert. Keep the message short, specific, and actionable, exactly what’s at risk and the one thing to do about it, and test the timing carefully before going live.
Measure
- Liquidations avoided: positions that recovered after an alert.
- Alert-to-action time.
- Opt-in: how many borrowers share an email so you can reach them off-app too.
Variations
- Tier by position size. A large position at risk may warrant a more personal touch.
- Pair with win-back. Combine with Win back dormant wallets for borrowers who go quiet after a close call.

