Morpho Vault Withdraw
Withdraw tokens from a MetaMorpho vault (ERC-4626) on the Morpho Blue protocol. Supports withdrawal by asset amount or by vault shares (redeem). Supports Ethereum (1), Optimism (10), Polygon (137), Base (8453), Arbitrum (42161). Ideal for: yield harvesting, DeFi withdrawals, portfolio rebalancing, liquidity management.
Catalog action EVM Onchain wallet Gas receive
Withdraw tokens from a MetaMorpho vault (ERC-4626) on the Morpho Blue protocol. Supports withdrawal by asset amount or by vault shares (redeem). Supports Ethereum (1), Optimism (10), Polygon (137), Base (8453), Arbitrum (42161). Ideal for: yield harvesting, DeFi withdrawals, portfolio rebalancing, liquidity management.
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-withdraw |
| Category | EVM Onchain |
| Connector | wallet |
| Requires gas | Yes |
| Funds movement | receive |
| Tags | morpho, defi, vault, withdraw, redeem, erc4626, yield, lending, write |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
vaultAddress | string | Yes | The MetaMorpho vault (ERC-4626) contract address to withdraw from |
amount | string | Yes | Amount in smallest unit as string. If withdrawType is "assets" (default), this is the amount of underlying tokens. If withdrawType is "shares", this is the number of vault shares to redeem. |
withdrawType | string | No | Type of withdrawal. "assets" (default): withdraw a specific amount of underlying tokens. "shares": redeem a specific number of vault shares. |
chainId | number | Yes | Chain ID. Supported: Ethereum (1), Optimism (10), Polygon (137), Base (8453), Arbitrum (42161) |
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 | - |
chainId | number | No | The chain ID the transaction was executed on |
blockNumber | number | No | Block number where the transaction was confirmed |
assetsWithdrawn | string | No | Exact amount of underlying assets withdrawn (assets path) |
assetsWithdrawnFormatted | string | No | Human-readable amount of underlying assets withdrawn (e.g., '1.5' instead of '1500000') |
estimatedAssetsReceived | string | No | Estimated amount of underlying assets received (redeem/shares path, preview estimate) |
estimatedAssetsReceivedFormatted | string | No | Human-readable estimated assets received (e.g., '1.5' instead of '1500000') |
wasCapped | boolean | No | True if the amount was capped to the maximum withdrawable/redeemable |
requestedAmount | string | No | Original requested asset amount before capping (only present when wasCapped is true) |
requestedShares | string | No | Original requested shares before capping (only present when wasCapped is true) |
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
json{ "type": "morpho-vault-withdraw", "payload": { "vaultAddress": "0x0000000000000000000000000000000000000000", "amount": "1000000", "chainId": 1 }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/morpho-vault-withdraw/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "vaultAddress": "0x0000000000000000000000000000000000000000", "amount": "1000000", "chainId": 1 }}'
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.
