Morpho Bundles
What are Bundles?
Bundles are Morpho smart contracts that combine the several actions an operation needs into a single transaction. Instead of approving, supplying collateral and borrowing in three separate transactions - each requiring a confirmation and gas fees - a Bundle does everything at once, and reverts as a whole if any step would fail.
Each Bundle is an opinionated entrypoint for one Morpho protocol: it knows exactly which calls to chain, in which order, and which checks to enforce. This makes the calldata simple to verify and lets the transaction perform atomic checks and receive callbacks (for example to use flash loans). Bundles operate on the caller's own position and never hold token balances between transactions.
Bundles power the Morpho interface and are also available to any integrator, either directly on-chain or through the Morpho SDK, which routes every market and vault write through them. The technical reference and entrypoint list are in the contracts section.
The Bundle contracts
Bundles are organized by protocol, each with its own contract:
- Blue Bundles (
BlueBundlesV1) - Variable Rate Market (Morpho Blue) operations: supply and withdraw loan assets, supply collateral and borrow, repay and withdraw collateral, and migrate a full borrow position from one market to another. The entrypoints that consume market liquidity can tap public allocator liquidity from Vaults V2 in the same transaction. - Vault Bundles (
VaultBundlesV1) - Vault V1 and Vault V2 operations: deposit, withdraw, and migrate assets from one vault to another (for example from a Vault V1 to its Vault V2 successor). - Vault Exit Bundles (
VaultExitBundlesV1) - exit paths for illiquid vaults: in-kind redemption from a Vault V1 or Vault V2, and force withdrawal from an illiquid Vault V2 whose underlying markets are liquid, paying the force-deallocate penalty. - Midnight Bundles (
MidnightBundlesV1) - Midnight taker operations, such as supplying collateral and taking offers, or repaying and withdrawing collateral, atomically.
What Bundles allow you to do
- Streamline complex workflows - Complete lending, borrowing, refinancing, vault migration, and more in one transaction
- Save on gas fees - Pay for one transaction instead of many
- Avoid failed transactions - If any part of the operation would fail, the entire transaction reverts safely
- Approve once, by signature - Token approvals can be provided as ERC-2612 permits or Permit2 signatures inside the same transaction, instead of a separate approval transaction
Practical examples
- One-click borrow: Supply collateral and borrow USDC against it in a single transaction, sourcing extra liquidity from the public allocator if the market is short
- Instant refinancing: Move an entire borrow position - collateral and debt - from one market to another without repaying it first
- Vault migration: Withdraw from a Vault V1 and deposit into a Vault V2 in one step
Monetization for integrators
Every Bundle entrypoint except the two in-kind redemptions (vaultExitBundlesV1InKindRedemptionVaultV1 and vaultExitBundlesV1InKindRedemptionVaultV2) accepts an optional referral fee: the integrator sets a fee percentage and a recipient, and the fee is paid in the loan or vault asset to that recipient within the same transaction. This lets a front end or product take a fee on borrows, repayments, deposits, withdrawals and position or vault migrations routed through Bundles, without deploying any contract of its own. See the Bundles contract reference and the guide How to monetize your borrow product.
Permissioned tokens
Because Bundles receive and forward tokens during a transaction, a permissioned token must whitelist the relevant Bundle contracts for the Morpho interface and SDK to work with it. See Handling permissioned tokens for the exact requirements.
Bundler3 (deprecated)
Bundles replace Bundler3, the previous general-purpose call dispatcher and adapter system. Bundler3 is deprecated: the Morpho interface and the Morpho SDK (from v6) no longer use it, and new integrations should build on Bundles. Existing Bundler3 deployments remain live and immutable.