Liquidium

ICP Pool Canister

Native ICP liquidity custody, deposits, withdrawals, and lending integration.

ICP Pool Canister

The ICP Pool canister manages native ICP liquidity for Liquidium. Unlike BTC and ERC assets, ICP does not need a Chain Key minter. It moves through the native ICP ledger.

Production canister: r2pk3-4yaaa-aaaar-qb7zq-cai

Responsibilities

  • Accept ICP deposits and repayments through deterministic inflow subaccounts
  • Sweep funded inflow subaccounts into the pool treasury
  • Notify the lending canister when deposits and repayments are confirmed
  • Process borrows and withdrawals to ICP destinations
  • Track ledger height, queued events, available balance, and quarantined withdrawals

How ICP differs from BTC and ERC pools

Area

ICP Pool

Asset

Native ICP

Ledger

ICP ledger

Deposits

User sends ICP to a deposit or repayment subaccount

Outflows

Pool transfers ICP to the requested destination

Destination formats

Principal, ICRC-1 account, or AccountIdentifier

Finality

ICP ledger finality; no Bitcoin or Ethereum confirmation wait

App authorization

ICP has no linkable wallet in the app, so outflows are signed by a linked BTC or ETH wallet

Public interface

  • get_inflow_subaccount(Deposit | Repayment): returns the deposit or repayment subaccount for a user.
  • check_subaccount(blob): checks a funded inflow subaccount and schedules the sweep into treasury.
  • withdraw(PoolWithdrawRequest): processes a lending-approved ICP borrow or withdrawal.
  • withdraw_underlying(PoolWithdrawUnderlyingRequest): sends native ICP to an underlying destination.
  • available_balance(): returns current pool liquidity.
  • ledger_height(): returns the observed ICP ledger height.
  • get_queued_events(): exposes pending deposit and repayment events for lending synchronization.

Flow

  1. The app gives the user an ICP deposit or repayment address.
  2. The user sends ICP on the ICP ledger.
  3. The pool detects the funded subaccount and sweeps the balance to treasury.
  4. The pool queues a DepositConfirmed or RepaymentConfirmed event.
  5. The lending canister applies the event to the user position.
  6. For borrows or withdrawals, lending validates the position and calls the ICP Pool to send native ICP to the requested destination.