> ## 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 Blue Supply

Lend loan token into a Morpho Blue market to earn borrow APY. Automatically approves the loan token to the Morpho singleton. Supports slippage protection via slippageBps. 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 Blue Supply logo](https://cdn.b3.fun/b3os-icons/morpho.svg)
Catalog action EVM Onchain wallet Gas

Lend loan token into a Morpho Blue market to earn borrow APY. Automatically approves the loan token to the Morpho singleton. Supports slippage protection via slippageBps. 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-blue-supply` |
| Category | EVM Onchain |
| Connector | `wallet` |
| Requires gas | Yes |
| Funds movement | None declared |
| Tags | `morpho`, `morpho-blue`, `lending`, `supply`, `write`, `defi`, `yield` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `marketId` | `string` | Yes | Morpho Blue market ID \(bytes32 hex\) |
| `chainId` | `number` | Yes | Chain ID. Supported: Ethereum \(1\), Optimism \(10\), Polygon \(137\), Robinhood Chain \(4663\), Base \(8453\), Arbitrum \(42161\) |
| `amount` | `string` | Yes | Amount of loan token to supply in smallest unit \(wei\). E.g. "1000000" = 1 USDC. |
| `slippageBps` | `integer` | No | Slippage tolerance in basis points \(1 bp = 0.01%\). Default: 100 \(1%\). Protects against share-price drift between preview and execution. |
| `gasLimit` | `string` | No | Optional gas limit as a positive integer string \(e.g., "300000"\) |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | `string` | Yes | - |
| `transactionHash` | `string` | Yes | - |
| `transactionUrl` | `string` | No | Block explorer URL for the transaction \(e.g. https://basescan.org/tx/0x...\) |
| `blockNumber` | `number` | No | - |
| `estimatedSharesReceived` | `string` | No | Estimated supply shares received \(preview taken before broadcast\) |
| `estimatedSharesReceivedFormatted` | `string` | No | Human-readable estimated supply shares received |

## Examples

**Workflow node**

```json
{
  "type": "morpho-blue-supply",
  "payload": {
    "marketId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "chainId": 1,
    "amount": "1000000"
  },
  "children": [],
  "connector": {
    "type": "wallet",
    "id": "conn_wallet"
  }
}
```
  **Test with API**

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

**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.