Morpho Blue Withdraw Collateral logo

Catalog action EVM Onchain wallet Gas

Remove collateral from a Morpho Blue position. Modes: 'exact' (specific amount, pre-checked for LTV safety) or 'max' (all collateral, requires zero debt). Supports Ethereum (1), Optimism (10), Polygon (137), Base (8453), Arbitrum (42161). Ideal for: closing position after repay, reducing leverage, reclaiming idle collateral.

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

FieldValue
Action IDmorpho-blue-withdraw-collateral
CategoryEVM Onchain
Connectorwallet
Requires gasYes
Funds movementNone declared
Tagsmorpho, morpho-blue, lending, collateral, withdraw, write, defi

Payload Schema

FieldTypeRequiredDescription
marketIdstringYesMorpho Blue market ID (bytes32 hex)
chainIdnumberYesChain ID. Supported: Ethereum (1), Optimism (10), Polygon (137), Base (8453), Arbitrum (42161)
amountModestringYes"exact" = withdraw a specific collateral amount (pre-checked for LTV safety). "max" = withdraw all collateral (requires zero debt).
amountstringNoRequired when amountMode="exact". Collateral-token raw amount to withdraw.
gasLimitstringNoOptional gas limit as a positive integer string (e.g., "300000")

Result Schema

FieldTypeRequiredDescription
statusstringYes-
transactionHashstringYes-
transactionUrlstringNoBlock explorer URL for the transaction (e.g. https://basescan.org/tx/0x...\)
blockNumbernumberNo-
withdrawnCollateralstringNoRaw amount of collateral token withdrawn (wei).
withdrawnCollateralFormattedstringNoHuman-readable withdrawn amount in collateral token units
resultingLtvPercentnumber | nullNoPosition LTV (%) after the withdraw; null if fully closed or oracle unavailable
isFullyClosedbooleanNoTrue if collateral reached zero after this withdraw

Examples

json
{ "type": "morpho-blue-withdraw-collateral", "payload": { "marketId": "example-marketId", "chainId": 1, "amountMode": "exact" }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}

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.

Ask a question... ⌘I