Run the Simple Loans example
Use examples/simple-loans-flow as the starting point for an accountless borrow user experience.
Mainnet operation
This example uses bundled mainnet canister and production service defaults. Creating a Simple Loan creates real protocol state. Review every amount and destination before you send collateral.
The example covers the following areas:
| Area | What to inspect |
|---|---|
| App setup | Browser flow using bundled SDK defaults |
| Pool selection | Market data and frozen-pool handling |
| LTV preview | Client-side quote validation before creation |
| Loan creation | client.simpleLoans.create(...) request shape |
| Loan status reload | client.simpleLoans.get({ ref }) and loan.status |
| Activity status | client.activities.list(...), client.activities.getStatus(...), and top-up state |
| Recovery | client.simpleLoans.find(...) |
Start the example
Use Node.js 20.19 or later in the 20.x line, or Node.js 22.12 or later. Use
pnpm 11 or later.
To start the example, follow these steps:
-
From the SDK root, install the workspace dependencies:
pnpm install -
Start the example:
pnpm --filter @liquidium/example-simple-loans-flow dev -
Open the local URL that Vite prints.
The page shows Liquidium Simple Loans Flow when the example starts.