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

The demo above is mock only. If you want to see onchain demos on Vibenet, head to Base chain demos.

Supply Collateral and Borrow

clients.ts creates Base mainnet public and wallet clients from a server-side PRIVATE_KEY that every example imports.
These snippets are illustrative. They show the shape of a borrowing integration on Base, not production-ready code. Follow each protocol’s own documentation for current addresses, SDK details, and risk parameters: Morpho and Aave.
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

Integrate Lending

Let users supply USDC to a money market.

Integrate an Earn Product

Route deposits into yield-bearing vaults.