Skip to main content

Simple Loan lifecycle

A Simple Loan reports loan.status as a LiquidiumStatus. Read status.operation for the phase and status.state for the UI state.

The following table maps each status to its meaning and UI action:

StatusMeaningUI action
{ operation: "deposit", state: "action_required" }The loan exists and waits for collateralShow the selected loan.initialDeposit.targets[chain] quote and, when non-null, loan.initialDeposit.expiryTimestamp
{ operation: "deposit", state: "confirming" }Liquidium detected a deposit and waits for confirmationsShow pending confirmation copy
{ operation: "deposit", state: "processing" }Liquidium is processing collateral after detectionPoll for status changes and block duplicate deposits
{ operation: "borrow", state: "confirming" } or { operation: "borrow", state: "processing" }Liquidium is sending borrowed fundsShow borrow payout progress
{ operation: "repayment", state: "active" }Debt exists and the user can repayShow the selected loan.repayment.targets[chain] quote
{ operation: "repayment", state: "confirming" } or { operation: "repayment", state: "processing" }Liquidium is confirming or processing repaymentPoll for status changes and avoid duplicate repayment prompts
{ operation: "repayment", state: "completed" }The loan closedShow final state and stop prompting for repayment
{ operation: "deposit", state: "expired" }The deposit window passed before collateral arrivedShow timeout copy and stop prompting for collateral deposit

To reload the state, call client.simpleLoans.get(...):

const loan = await client.simpleLoans.get({ ref });

Use activities when your UI needs more detail about deposits, borrow outflows, repayment deposits, confirmations, or fee top-ups.

For the shared operation and state model, including polling stop conditions, see the status system.