Skip to main content
Move positions between vaults without manual unwinding. Migrate from AAVE to Morpho, Yearn to Beefy, or any combination—even across chains. One signature handles everything.

The Problem It Solves

Without Biconomy, migrating between vaults requires:
  1. Approve withdrawal from source vault (signature 1)
  2. Redeem shares (signature 2)
  3. Bridge to destination chain (wait, signature 3)
  4. Swap to destination vault’s asset (signature 4)
  5. Approve destination vault (signature 5)
  6. Deposit into new vault (signature 6)
With Biconomy: One signature. Atomic execution. No funds left in limbo.

How It Works

1

User Selects Migration

Choose source vault to exit and destination vault to enter
2

API Plans the Route

Biconomy calculates: redeem → swap (if needed) → bridge (if needed) → deposit
3

User Signs Once

Single signature authorizes the entire migration
4

Atomic Execution

All steps execute together—no partial states or stuck funds

Quick Example

Migrate from AAVE on Polygon to Morpho on Base:
const quote = await fetch('https://api.biconomy.io/v1/quote', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    mode: 'eoa',
    ownerAddress: userAddress,
    composeFlows: [{
      type: '/instructions/intent-vault',
      data: {
        srcChainId: 137,            // Polygon
        srcVault: '0xAavePolygonVault...',  // AAVE vault to exit
        dstChainId: 8453,           // Base
        dstVault: '0xMorphoBaseVault...',   // Morpho vault to enter
        amount: '5000000000000000000',      // Vault shares to migrate
        slippage: 0.01
      }
    }]
  })
}).then(r => r.json());

// Sign and execute
const signature = await wallet.signTypedData(quote.typedDataToSign);

const result = await fetch('https://api.biconomy.io/v1/execute', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    signedQuote: quote,
    signature
  })
}).then(r => r.json());

console.log('Track at:', `https://meescan.biconomy.io/details/${result.supertxHash}`);

Same-Chain Migration

Move between vaults on the same chain—ideal for chasing better yields:
{
  type: '/instructions/intent-vault',
  data: {
    srcChainId: 8453,
    srcVault: AAVE_USDC_VAULT,     // Exit AAVE
    dstChainId: 8453,
    dstVault: MORPHO_USDC_VAULT,   // Enter Morpho
    amount: '10000000000000000000',
    slippage: 0.005                // Lower slippage for same-asset migration
  }
}
When both vaults use the same underlying asset on the same chain, the migration is nearly lossless—just gas fees.

Cross-Chain Migration

Move positions across chains to access better opportunities:
{
  type: '/instructions/intent-vault',
  data: {
    srcChainId: 1,                 // Ethereum
    srcVault: YEARN_ETH_VAULT,     // Yearn ETH vault on mainnet
    dstChainId: 42161,             // Arbitrum
    dstVault: GMX_ETH_VAULT,       // GMX vault on Arbitrum
    amount: '2000000000000000000', // 2 vault shares
    slippage: 0.02,
    allowBridgeProviders: 'across' // Fast bridging
  }
}

Understanding the Response

{
  "outputAmount": "4950000000000000000",
  "minOutputAmount": "4900500000000000000",
  "route": {
    "type": "vault-to-vault",
    "summary": "vaultsfyi[aave-v3] => across => lifi[uniswap] => vaultsfyi[morpho]",
    "steps": [
      {
        "type": "vault-redeem",
        "provider": "vaultsfyi",
        "protocol": "aave-v3",
        "vaultAddress": "0x...",
        "chainId": 137,
        "inputAmount": "5000000000000000000",
        "outputAmount": "5000000000"
      },
      {
        "type": "bridge",
        "provider": "across",
        "srcChainId": 137,
        "dstChainId": 8453
      },
      {
        "type": "swap",
        "provider": "lifi",
        "tool": "uniswap"
      },
      {
        "type": "vault-deposit",
        "provider": "vaultsfyi",
        "protocol": "morpho",
        "vaultAddress": "0x...",
        "chainId": 8453,
        "inputAmount": "4960000000",
        "outputAmount": "4950000000000000000"
      }
    ],
    "totalGasFeesUsd": 0.35,
    "totalBridgeFeesUsd": 0.50,
    "estimatedTime": 180
  }
}
FieldDescription
route.typeAlways vault-to-vault for migrations
vault-redeemExit from source vault (lossless)
bridgeCross-chain transfer (if different chains)
swapAsset conversion (if different underlyings)
vault-depositEntry into destination vault (lossless)

Migration Strategies

Move to higher-yielding vaults as rates change:
// Monitor yields, migrate when profitable
if (morphoYield > aaveYield + migrationCost) {
  // Execute migration
}

Provider Control

Customize the routing for your migration:
{
  type: '/instructions/intent-vault',
  data: {
    srcChainId: 137,
    srcVault: SOURCE_VAULT,
    dstChainId: 8453,
    dstVault: DEST_VAULT,
    amount: '1000000000000000000',
    slippage: 0.01,
    
    // Fine-tune the route
    routeSelectionMode: 'cheap',     // Optimize for cost over speed
    allowBridgeProviders: 'across',  // Use Across for bridging
    allowSwapProviders: 'lifi',      // Use LiFi for swaps
  }
}

Fee Structure

ScenarioFee (BPS)
Same-chain, same underlying0
Same-chain, different underlying10
Cross-chain migration15

Best Practices

Always check minOutputAmount before confirming a migration. Large positions may experience slippage on the swap steps.
For large positions:
  • Consider splitting into multiple smaller migrations
  • Use routeSelectionMode: 'cheap' for best rates
  • Set appropriate slippage (1-2% for cross-chain, 0.5% for same-chain)
For time-sensitive migrations:
  • Use routeSelectionMode: 'fast-quote'
  • Prefer allowBridgeProviders: 'across' for speed

Supported Vault Types

Lending

AAVE ↔ Compound ↔ Morpho ↔ Venus ↔ Spark

Yield

Yearn ↔ Beefy ↔ Convex ↔ Sommelier

Staking

Lido ↔ Rocket Pool ↔ Frax ↔ Stakewise

LP Positions

Uniswap ↔ Curve ↔ Balancer ↔ Velodrome

Next Steps