Skip to main content

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:

AreaWhat to inspect
App setupBrowser flow using bundled SDK defaults
Pool selectionMarket data and frozen-pool handling
LTV previewClient-side quote validation before creation
Loan creationclient.simpleLoans.create(...) request shape
Loan status reloadclient.simpleLoans.get({ ref }) and loan.status
Activity statusclient.activities.list(...), client.activities.getStatus(...), and top-up state
Recoveryclient.simpleLoans.find(...)

Start the example​

Use Node.js 22.22.3 or later in the 22.x line, 24.x, or 26 or later. Use pnpm 11 or later.

To start the example, follow these steps:

  1. From the SDK root, install the workspace dependencies:

    pnpm install
  2. Start the example:

    pnpm --filter @liquidium/example-simple-loans-flow dev
  3. Open the local URL that Vite prints.

The page shows Liquidium Simple Loans Flow when the example starts.