Skip to main content
Open a collateralized loan through a third-party protocol on Base. A safe integration shows collateral value, debt, liquidation parameters, and health before and after every user-signed action.

Demo

Supply collateral and borrow

These examples use viem@2.55.11, @morpho-org/morpho-sdk@5.4.1, @moonwell-fi/moonwell-sdk@0.22.0, and @aave-dao/aave-address-book@4.65.5.
Prepare one Morpho bundle that supplies WETH collateral and borrows USDC from the WETH/USDC market.
borrow-morpho.ts
Collateral prices, oracle updates, interest, and protocol parameters can move a position toward liquidation. Re-fetch and display health immediately before signing, and warn clearly before a transaction creates unsafe debt.

See also