The Base Earn API is in developer preview. Upshift Earn is available in early access. Morpho Earn, Morpho Borrow, and Aave v4 are coming soon.
Supported Protocols
Yield is variable and funds are exposed to protocol risk. Withdrawals depend on liquidity and protocol conditions. Borrowing also carries liquidation risk.
For Earn, discovery, position reads, and deposits use the same endpoints for Morpho and Upshift. Read each vault’s
withdrawalMode to choose the exit flow: synchronous (Morpho) has no queue or claim step, and queued (Upshift) uses a request followed by a claim.
Quick Start
Base URL
GET https://api.base.org/earn/v1/lend/vaults?network=base.
You need a connected wallet on Base, the required tokens and gas, and a vault selected from the catalog. Read token decimals and identifiers from discovery. Response examples use illustrative values and abbreviated calldata; never submit them as transactions.
- Start with Morpho Earn
- Integrate Upshift's queued exit
1
Get a builder code
Get a builder code from your project in Base Dashboard.
2
List vaults
Call
GET /lend/vaults?network=base. Select an approved row with provider: "morpho" and withdrawalMode: "synchronous".3
Deposit
Build a deposit with
POST /lend/deposit, using assets in atomic units and the discovered vaultId. Execute every returned call in order.4
Read positions
Read
GET /lend/positions?address=... after confirmation.5
Withdraw
To exit, use
POST /lend/withdraw with an asset amount and explicit maxSlippageBps. There is no queue or claim step.vaultId is not a borrow product ID.Endpoints
Coming Soon: Aave v4
Aave v4 borrowing support is coming soon. Users will be able to supply supported collateral, borrow, manage debt and repay through Base Earn. Supported markets and API details will be announced at release. Aave v4 is not included in the Morpho launch.Next Steps
Call the API
Set up a backend helper for calling the API.
Concepts
Providers, withdrawal modes, atomic units, and queued withdrawals.
Morpho Borrow
Market selection, origination fees, and the borrow walkthrough.
Execute Calls in a Wallet
Verify and send the returned batch with viem.
End-to-End Lend Examples
Morpho and Upshift walkthroughs, plus testing guidance.
Related Documentation
- EIP-5792: wallet call batches.
- Morpho vault integration concepts. This example uses CDP wallets; its endpoints are separate from Base Earn.
- Morpho documentation. Protocol concepts, borrowing mechanics and liquidation risk.