Problem Description
To support yield-bearing inheritance vaults integrated with Soroban lending pools, the frontend API service defines functions (freezeLoans, recallLoans, liquidateAndSettle) that call:
POST /api/plans/{id}/freeze-loans
POST /api/plans/{id}/recall-loans
POST /api/plans/{id}/liquidate-settle
None of these routes are registered in backend/src/api.rs or connected to the Soroban lending contract.
Missing Endpoints & Specs
- Implement
POST /api/plans/{id}/freeze-loans to halt new borrowing against vault collateral when a plan enters the triggered state.
- Implement
POST /api/plans/{id}/recall-loans to invoke Soroban cross-contract calls recalling loaned capital and accrued yield back into the inheritance contract vault.
- Implement
POST /api/plans/{id}/liquidate-settle to trigger collateral liquidation if loan recall fails or defaults during settlement.
- Include proper authorization checking (Signature or JWT Auth) and emit status update events over WebSocket.
Affected Files
backend/src/api.rs
frontend/app/lib/api/plans.ts
backend/src/stellar_submit.rs
Problem Description
To support yield-bearing inheritance vaults integrated with Soroban lending pools, the frontend API service defines functions (
freezeLoans,recallLoans,liquidateAndSettle) that call:POST /api/plans/{id}/freeze-loansPOST /api/plans/{id}/recall-loansPOST /api/plans/{id}/liquidate-settleNone of these routes are registered in
backend/src/api.rsor connected to the Soroban lending contract.Missing Endpoints & Specs
POST /api/plans/{id}/freeze-loansto halt new borrowing against vault collateral when a plan enters the triggered state.POST /api/plans/{id}/recall-loansto invoke Soroban cross-contract calls recalling loaned capital and accrued yield back into the inheritance contract vault.POST /api/plans/{id}/liquidate-settleto trigger collateral liquidation if loan recall fails or defaults during settlement.Affected Files
backend/src/api.rsfrontend/app/lib/api/plans.tsbackend/src/stellar_submit.rs