Prepare a Yield Copilot vault withdraw (Morpho USDC on Base) as an unsigned swap pair
otto_prepare_yield_withdrawPrepare the EXACT otto_prepare_swap pair (envelope + prepareInput) that redeems vault shares from one of the executable Morpho vaults in the Yield Copilot registry back to USDC in the signing account, as a LI.FI exit route (which may sell shares or compose a protocol redemption) whose input token is the vault's ERC-4626 share token. The vault and the asset come from the registry row named by executableMarketId and are never inputs; the caller's registryCommitment must equal the commitment recomputed over the current record. The quoted USDC is checked against the vault's own previewRedeem and refused when it falls short by more than the pinned tolerance. Returns the pair unchanged plus a preview; never signs or submits; the signing account signs and sends the pair itself. Preparation does not authorize execution. Every envelope from this server is valid for 300 seconds from construction (valid_until); a stale envelope is refused by the verifier — request a fresh one.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"accountProfile": "<accountProfile>",
"executableMarketId": "<executableMarketId>",
"registryCommitment": "<registryCommitment>",
"shares": "<shares>",
"slippage": "<slippage>"
},
"name": "otto_prepare_yield_withdraw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shares | Yes | ||
| slippage | Yes | ||
| client_ref | No | ||
| accountProfile | Yes | ||
| executableMarketId | Yes | ||
| registryCommitment | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | Yes | ||
| envelope | Yes | ||
| prepareInput | Yes | ||
| registry_commitment | Yes |