Skip to main content
POST
Plan Migrate

Plan Migrate

Creates a plan to migrate a supply position from one DeFi protocol to another. This atomically withdraws from the source protocol and deposits into the destination protocol. Returns a plan ID and an EIP-712 digest that must be signed to authorize execution.

Request

Path parameters

Body parameters

Examples

Compound to Aave

Aave to Morpho Vault

Response (201 Created)

Response fields

Errors

Notes

  • Plans expire after 2 minutes. Sign and execute via Execute Plan before expiry.
  • The withdrawal and deposit happen atomically in a single transaction.
  • When using morpho_vault as source or destination, you must provide the corresponding from_market or to_market parameter.
  • Set migrate_only_supply_balances to true to prevent migrating reward or other non-supply balances.