> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Morpho Vault Deposit

Deposit tokens into a MetaMorpho vault (ERC-4626) on the Morpho Blue protocol. Automatically approves the underlying token and deposits into the vault. Supports Ethereum (1), Optimism (10), Polygon (137), Robinhood Chain (4663), Base (8453), Arbitrum (42161). Ideal for: yield farming, earning lending interest, DeFi deposits, automated savings.

![Morpho Vault Deposit logo](https://cdn.b3.fun/b3os-icons/morpho.svg)
Catalog action EVM Onchain wallet Gas send

Deposit tokens into a MetaMorpho vault (ERC-4626) on the Morpho Blue protocol. Automatically approves the underlying token and deposits into the vault. Supports Ethereum (1), Optimism (10), Polygon (137), Robinhood Chain (4663), Base (8453), Arbitrum (42161). Ideal for: yield farming, earning lending interest, DeFi deposits, automated savings.

**Review wallet and value movement**

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `morpho-vault-deposit` |
| Category | EVM Onchain |
| Connector | `wallet` |
| Requires gas | Yes |
| Funds movement | `send` |
| Tags | `morpho`, `defi`, `vault`, `deposit`, `erc4626`, `yield`, `lending`, `write` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `vaultAddress` | `string` | Yes | The MetaMorpho vault \(ERC-4626\) contract address to deposit into |
| `tokenAddress` | `string` | Yes | ERC20 underlying token address of the vault. Must match vault.asset\(\) — action errors with VAULT_ASSET_MISMATCH if they differ. |
| `amount` | `string` | Yes | Amount of underlying tokens to deposit in smallest unit \(wei\) as string \(e.g., "1000000" for 1 USDC\). Must be a positive integer. |
| `chainId` | `number` | Yes | Chain ID. Supported: Ethereum \(1\), Optimism \(10\), Polygon \(137\), Robinhood Chain \(4663\), Base \(8453\), Arbitrum \(42161\) |
| `gasLimit` | `string` | No | Optional gas limit as a positive integer string \(e.g., "300000"\) |
| `slippageBps` | `number` | No | Slippage tolerance in basis points \(1 bp = 0.01%\). Default: 100 \(1%\). Protects against share price changes between preview and execution. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | `string` | Yes | - |
| `transactionHash` | `string` | Yes | - |
| `chainId` | `number` | No | The chain ID the transaction was executed on |
| `blockNumber` | `number` | No | Block number where the transaction was confirmed |
| `estimatedSharesReceived` | `string` | No | Amount of vault shares received \(preview estimate\) |
| `estimatedSharesReceivedFormatted` | `string` | No | Human-readable vault shares received \(e.g., '1.5' instead of '1500000'\) |
| `assetAddress` | `string` | No | Underlying asset token address |
| `assetSymbol` | `string` | No | Underlying asset token symbol \(e.g., 'USDC'\) |
| `assetDecimals` | `number` | No | Underlying asset token decimals |
| `chainName` | `string` | No | Human-readable chain name \(e.g., 'Base', 'Ethereum'\) |
| `networkId` | `string` | No | Chain network identifier \(e.g., 'base', 'ethereum'\) — use for Coinbase and other APIs that accept network names |

## Examples

**Workflow node**

```json
{
  "type": "morpho-vault-deposit",
  "payload": {
    "vaultAddress": "0x0000000000000000000000000000000000000000",
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amount": "1000000",
    "chainId": 1
  },
  "children": [],
  "connector": {
    "type": "wallet",
    "id": "conn_wallet"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/morpho-vault-deposit/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "vaultAddress": "0x0000000000000000000000000000000000000000",
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amount": "1000000",
    "chainId": 1
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.