Overview
⚠️ Depends on: #45 (GF-13 — Deposit & Transaction Flow) and #46 (GF-14 — Portfolio & Positions Page).
Implement the notification and alert system across the app. Users need to know when transactions complete, when their lock expires, when yield is harvested, and when a governance veto window opens.
Problem
No notification system exists anywhere in the app. Specifically:
- There are no transaction status toasts — after submitting a deposit or withdrawal, the user has no feedback
- There are no lock expiry alerts — a user with an L12 vault has no reminder that their 12-month lock is expiring
- There are no harvest event notifications
- There is no alert mechanism for Guardian Multisig members when a governance proposal is open for veto
Proposed Solution
1. Transaction status toasts (all pages)
Use a lightweight toast library (e.g. sonner or react-hot-toast). Show a toast for every transaction:
Submitting... — amber, with a spinner, while awaiting Soroban confirmation
Transaction confirmed — green, with a checkmark, on success (include a link to Stellar Expert)
Transaction failed: <reason> — red, on failure (show the Soroban error message)
Trigger these from the transaction hooks used in GF-13 and GF-14.
2. Lock expiry browser push notifications (opt-in)
On the /portfolio page, add an Enable notifications toggle. When enabled:
- Request browser
Notification permission
- Store the lock expiry ledger for each position in
localStorage
- On each page load, check if any lock expires within 7 days
- If so, show a browser push notification:
Your L6 vault unlocks in 5 days. Visit YieldLadder to withdraw.
3. Harvest event notification
After each successful harvest (detected via polling useLastHarvest() or an event), show a toast: Yield harvested — your position has been compounded.
4. Governance proposal alert (Guardian members)
On /governance (GF-16), detect if the connected wallet address matches the Guardian Multisig. If a new proposal enters Pending status, show a persistent amber banner: New governance proposal open for veto — expires in 71 hours.
5. IL threshold alert on /allocations
If any pool's impermanent loss (from GF-16's IL tracker) exceeds 2%, show an amber alert card at the top of the /allocations page: USDC/XLM pool IL at 2.4% — approaching rebalance threshold.
Acceptance Criteria
Overview
Implement the notification and alert system across the app. Users need to know when transactions complete, when their lock expires, when yield is harvested, and when a governance veto window opens.
Problem
No notification system exists anywhere in the app. Specifically:
Proposed Solution
1. Transaction status toasts (all pages)
Use a lightweight toast library (e.g.
sonnerorreact-hot-toast). Show a toast for every transaction:Submitting...— amber, with a spinner, while awaiting Soroban confirmationTransaction confirmed— green, with a checkmark, on success (include a link to Stellar Expert)Transaction failed: <reason>— red, on failure (show the Soroban error message)Trigger these from the transaction hooks used in GF-13 and GF-14.
2. Lock expiry browser push notifications (opt-in)
On the
/portfoliopage, add anEnable notificationstoggle. When enabled:NotificationpermissionlocalStorageYour L6 vault unlocks in 5 days. Visit YieldLadder to withdraw.3. Harvest event notification
After each successful harvest (detected via polling
useLastHarvest()or an event), show a toast:Yield harvested — your position has been compounded.4. Governance proposal alert (Guardian members)
On
/governance(GF-16), detect if the connected wallet address matches the Guardian Multisig. If a new proposal entersPendingstatus, show a persistent amber banner:New governance proposal open for veto — expires in 71 hours.5. IL threshold alert on
/allocationsIf any pool's impermanent loss (from GF-16's IL tracker) exceeds 2%, show an amber alert card at the top of the
/allocationspage:USDC/XLM pool IL at 2.4% — approaching rebalance threshold.Acceptance Criteria
Submitting...immediately and updates to confirmed/failed on completion/allocationswhen any pool exceeds 2% IL