Skip to main content

Instant Loan Lifecycle

An instant loan moves through a small set of UI-facing states.

StatusMeaningUI action
awaiting_depositThe loan exists and waits for collateralShow loan.depositTarget and the deposit deadline
deposit_detectedThe protocol detected collateral and is processing the borrowKeep polling and show a pending state
activeThe borrow is active and the user can repayShow loan.repayment.amount and loan.repayment.target
settlingThe protocol is closing the loanKeep polling and avoid duplicate user actions
closedThe loan finishedShow final state and stop prompting for repayment

Reload state with:

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

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