Let users supply USDC to a third-party money market and manage the resulting protocol position from your app. Your app prepares and simulates each call; the user signs from their own wallet.
Demo
Supply USDC
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.
clients.ts creates pinned Base mainnet public and wallet clients from a server-side PRIVATE_KEY; every example imports those concrete clients and is type-checked in the verified DeFi fixtures.
Supply to Morpho’s WETH/USDC market. Fetching by market ID avoids hardcoding its oracle, interest-rate model, and LLTV parameters. Use the Moonwell SDK as the source of current Base deployment addresses, then call the USDC market with viem. Resolve the Base Pool and asset addresses from Aave’s official address book, then approve and supply through the Aave V3 Pool with viem.
Supply rates are variable, withdrawals depend on market liquidity, and every integration inherits protocol, oracle, and approval risk. Display current terms and simulate the exact transaction before asking the user to sign.
See also