API Reference
Deposit
Build the approve and deposit calls to put an asset into a Morpho or Upshift vault on Base.
Builds the calls to deposit
The examples use
assets into any enabled vault: usually an ERC-20 approve on the asset followed by the vault deposit. The approve is omitted when the allowance already covers the amount, and a zero-reset approve is prepended for tokens that need it, so expect one to three calls. Execute them all, in order. See Execute Calls in a Wallet.
The approve-based deposit path does not accept maxSlippageBps and does not enforce a deposit slippage guard. Do not present estimated shares as a guaranteed minimum. Preserve all returned approval targets and calls.
Body Parameters
string
required
The end user’s wallet, owner and receiver.
string
required
Positive amount in the asset’s atomic units. For USDC,
"1000000" is 1 USDC.string
required
Required. The registered builder code for your app.
earn() and attribution from Call the API.