You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: A background service must monitor the value of collateralized assets and trigger liquidations if the Loan-to-Value (LTV) ratio exceeds the threshold. Technical Context: Use blockchain.service.ts and contract.service.ts. Tasks:
Create a LiquidationWorker in server/src/services/liquidation.service.ts.
Implement a cron-based loop (every 5–15 minutes) to fetch real-time asset prices from the Stellar DEX.
For each active loan, calculate current collateral_value / loan_amount.
If LTV > threshold (e.g., 85%), trigger the liquidate function on the EscrowManager contract.
Send push notifications to both borrower and lender via websocketService. Acceptance Criteria:
Successfully triggers a mock liquidation on testnet when price drops.
Worker handles network timeouts and retries gracefully.
Description: A background service must monitor the value of collateralized assets and trigger liquidations if the Loan-to-Value (LTV) ratio exceeds the threshold.
Technical Context: Use blockchain.service.ts and contract.service.ts.
Tasks:
LiquidationWorkerinserver/src/services/liquidation.service.ts.collateral_value / loan_amount.liquidatefunction on theEscrowManagercontract.websocketService.Acceptance Criteria: