Use deposit-address flows
Use this path when your app manages a Liquidium profile and asks the user to send funds to a deposit target.
Supported use cases
Use a deposit-address flow for the following app needs:
| Need | Use |
|---|---|
| Profile-level positions | The user returns to the same Liquidium profile across sessions |
| Manual transfers | Your app shows an address or ICRC account and lets the user send funds outside the SDK |
| Dashboard flows | The user supplies, borrows, withdraws, and repays from one account |
Request a deposit target
Call client.lending.supply(...) with the transfer mechanism:
import { Chain } from "@liquidium/client";
const supplyFlow = await client.lending.supply({
profileId,
poolId,
action: "deposit",
chain: Chain.BTC,
mechanism: "transfer",
});
console.log("Send funds to", supplyFlow.target.address);
mechanism: "transfer" is optional because transfer is the default. Set it when your app exposes an explicit deposit-address versus contract-interaction choice. When the flow needs a transaction ID, call supplyFlow.submit(...) after the user broadcasts the transfer.
submit(...) posts only BTC and native ETH transfers. Liquidium detects ICP ledger transfers and ETH stablecoin deposit-address transfers itself, so submit(...) returns the txid without a request. To track any transfer, poll client.activities.getStatus(...) with its transaction ID.
For action: "repayment", supply(...) throws LiquidiumErrorCode.NO_OUTSTANDING_DEBT before it returns a target or broadcasts when the profile has no debt in the pool. The protocol refunds a repayment for a missing position, but keeps a repayment to a debt-free position as a service fee unless the pool enables refunds.
Manual transfer requests do not include an amount, so the SDK cannot validate the eventual transaction value. Validate deposits with getMinimumDepositAmount(asset) before showing the target:
| Asset | Minimum deposit |
|---|---|
| BTC / ckBTC | 5_100n sats (0.000051 BTC) |
| ETH / ckETH | 5_000_000_000_000_000n wei (0.005 ETH) |
| ICP | 10_000n e8s (0.0001 ICP) |
| USDC / ckUSDC | 1_000_000n base units (1 USDC) |
| USDT / ckUSDT | 1_000_000n base units (1 USDT) |
For manual deposits, account for the inflow fee returned by client.lending.estimateInflowFee(...). The Liquidium app displays the product floor plus that fee. For external USDT deposit addresses, it uses a separate 1.5 USDT floor before it adds fees. This route-specific guidance does not change the SDK's 1 USDT product minimum.