What you can do
| find markets / vaults | Discover markets and vaults (they are not listed one by one here) | Read API GET https://api.morpho.org/v0/blue/markets?chain_id=1 or /v0/vaults-v2 (listed vaults). On-chain: CreateMarket events on Morpho give marketParams; idToMarketParams(id) returns them; VaultV2Factory.isVaultV2(addr) / MetaMorpho factory isMetaMorpho(addr) verify a vault is genuine. |
| lend in a market | Supply the loan token to one Morpho Blue market | approve(Morpho, amount) on the loan token; Morpho.supply(marketParams, amount, 0, you, 0x). Or BlueBundlesV1.blueBundlesV1Supply(...). |
| borrow | Borrow against collateral in one market | approve(Morpho) on collateral; Morpho.supplyCollateral(marketParams, collAmount, you, 0x); then Morpho.borrow(marketParams, amount, 0, you, you). Keep LTV well under LLTV. One tx: BlueBundlesV1.blueBundlesV1SupplyCollateralAndBorrow with a maxLtv guard (needs Morpho authorization for the bundle, by setAuthorization or signedAuthorization). |
| repay and withdraw collateral | Close a loan | approve(Morpho) on the loan token; Morpho.repay(marketParams, 0, position(id,you).borrowShares, you, 0x); Morpho.withdrawCollateral(marketParams, position.collateral, you, you). |
| deposit into a vault | Earn curated yield | Verify the vault with VaultV2Factory.isVaultV2 or isMetaMorpho; approve(vault, amount) on its asset(); vault.deposit(amount, you). Exit: vault.redeem(shares, you, you). Or VaultBundlesV1.vaultBundlesV1Deposit with a maxSharePriceE27 slippage guard. |
| exit an illiquid Vault V2 | Get funds out when the vault's liquidity is allocated | VaultExitBundlesV1.vaultExitBundlesV1ForceWithdrawVaultV2 (pays the forceDeallocate penalty) or vaultExitBundlesV1InKindRedemptionVaultV2 (take Blue supply positions in kind). |
| source extra liquidity | Borrow more than a market currently holds | Check /v0/blue/markets/{id}/public-allocator-vaults, then BluePublicAllocator.reallocate(...) or pass reallocations to a BlueBundlesV1 entrypoint. |
Liquidation: if a borrower's LTV (debt / collateral valued by the market's oracle) exceeds the market's immutable LLTV, anyone can liquidate it and seize collateral with an incentive of up to 15% (MAX_LIQUIDATION_INCENTIVE_FACTOR 1.15; the incentive is larger for lower LLTVs).
Oracle risk: each market's oracle is fixed at creation and anyone can create markets with any oracle; a wrong or manipulable oracle can cause unfair liquidations or bad debt. Morpho's docs say no oracle is immune to manipulation; check the oracle (Read API /v0/oracles/{oracle}/state) before using a market.
Bad debt is realised immediately and socialised to that market's lenders (and to vaults allocated there). Markets are isolated, so losses stay in the affected market.
Liquidity risk: lenders can only withdraw what is not borrowed; at 100% utilisation withdrawals revert until borrowers repay (the AdaptiveCurveIrm raises rates sharply to restore liquidity).
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).Morpho (Morpho Blue singleton, variable-rate markets)pool on ethereum0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb
write supply((address,address,address,address,uint256),uint256,uint256,address,bytes)
Lend the loan token to one market: (marketParams, assets, shares, onBehalf, data). Set exactly one of assets/shares (other 0); data = empty bytes (non-empty triggers an onMorphoSupply callback). approve(Morpho, assets) on the loan token first. MarketParams = (loanToken, collateralToken, oracle, irm, lltv); lltv scaled by 1e18 (e.g. 860000000000000000 = 86%). Get it from idToMarketParams(marketId) or the Read API.
write withdraw((address,address,address,address,uint256),uint256,uint256,address,address)
Withdraw lent assets: (marketParams, assets, shares, onBehalf, receiver). One of assets/shares non-zero; to exit fully pass shares = position(id,user).supplyShares. Reverts if the market lacks liquidity (utilisation 100%). Caller must be onBehalf or authorized by it.
write supplyCollateral((address,address,address,address,uint256),uint256,address,bytes)
Deposit collateral (not lent out, earns no interest): (marketParams, assets, onBehalf, data=empty). approve(Morpho) on the collateral token first.
write borrow((address,address,address,address,uint256),uint256,uint256,address,address)
Borrow the loan token: (marketParams, assets, shares, onBehalf, receiver). Position LTV must stay below the market's LLTV (collateral valued with the market oracle). Caller must be onBehalf or authorized (setAuthorization).
write repay((address,address,address,address,uint256),uint256,uint256,address,bytes)
Repay debt: (marketParams, assets, shares, onBehalf, data=empty). To repay fully pass shares = position(id,user).borrowShares (assets would leave dust as interest accrues). approve(Morpho) on the loan token first; anyone can repay for anyone.
write withdrawCollateral((address,address,address,address,uint256),uint256,address,address)
Withdraw collateral: (marketParams, assets, onBehalf, receiver). Reverts if the position would become unhealthy.
read position(bytes32,address)
(marketId, user) -> (supplyShares, borrowShares, collateral). Collateral in token units; convert shares to assets with market(): assets = shares * (totalAssets + 1) / (totalShares + 1e6) (round up for borrow).
read market(bytes32)
marketId -> (totalSupplyAssets, totalSupplyShares, totalBorrowAssets, totalBorrowShares, lastUpdate, fee). Values exclude interest accrued since lastUpdate; call accrueInterest or use the Read API for live numbers.
read idToMarketParams(bytes32)
marketId -> (loanToken, collateralToken, oracle, irm, lltv). marketId = keccak256(abi.encode(marketParams)).
write setAuthorization(address,bool)
Let another address (e.g. a bundler or manager contract) manage your positions: borrow / withdraw / withdrawCollateral on your behalf. Revoke with false.
read isAuthorized(address,address)
(authorizer, authorized) -> bool.
write accrueInterest((address,address,address,address,uint256))
Accrue interest on a market so market()/position() reads are up to date.
write liquidate((address,address,address,address,uint256),address,uint256,uint256,bytes)
Liquidate an unhealthy borrower (LTV > LLTV): (marketParams, borrower, seizedAssets, repaidShares, data). Set one of seizedAssets/repaidShares. Liquidation incentive depends on LLTV (max 15%).
write flashLoan(address,uint256,bytes)
Free flash loan of any token Morpho holds: (token, assets, data); caller must implement onMorphoFlashLoan and approve repayment.
write createMarket((address,address,address,address,uint256))
Permissionless market creation with a governance-enabled IRM and LLTV. Markets are immutable once created.
AdaptiveCurveIrm (governance-approved interest rate model)other on ethereum0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC
VaultV2Factory (Morpho Vault V2)factory on ethereum0xA1D94F746dEfa1928926b84fB2596c06926C0405
write createVaultV2(address,address,bytes32)
Deploy a Morpho Vault V2: (owner, asset, salt). For curators.
read isVaultV2(address)
True if the address is a Vault V2 deployed by this factory. Verify a vault with this before depositing.
write deposit(uint256,address)
[Called on a Vault V2, not on the factory] ERC-4626 deposit: (assets, onBehalf). approve(vault) first. Reverts if a gate blocks the caller.
write withdraw(uint256,address,address)
[On a Vault V2] Withdraw an exact asset amount: (assets, receiver, onBehalf). Served from idle assets and the liquidity adapter; reverts if not enough liquidity (use forceDeallocate or VaultExitBundlesV1).
write redeem(uint256,address,address)
[On a Vault V2] Burn shares: (shares, receiver, onBehalf).
read previewRedeem(uint256)
[On a Vault V2] Assets returned for shares now. Note: Vault V2 maxDeposit/maxMint/maxWithdraw/maxRedeem always return 0 by design (gates make them unpredictable), so do not use them to size withdrawals; use previewRedeem and the Read API's withdrawable_assets.
read totalAssets()
[On a Vault V2] Total assets under management.
write forceDeallocate(address,bytes,uint256,address)
[On a Vault V2] Non-custodial exit: (adapter, data, assets, onBehalf) pulls assets out of an adapter into idle so they can be withdrawn, paying the adapter's forceDeallocatePenalty in shares.
MetaMorpho Factory V1.1 (Morpho Vault V1)factory on ethereum0x1897A8997241C1cD4bD0698647e4EB7213535c24
write createMetaMorpho(address,uint256,address,string,string,bytes32)
Deploy a Vault V1 (MetaMorpho v1.1): (initialOwner, initialTimelock, asset, name, symbol, salt). For curators; agents normally only deposit into existing vaults.
read isMetaMorpho(address)
True if the address is a vault created by this factory. Use it to verify a vault before depositing.
write deposit(uint256,address)
[Called on a Vault V1 created by this factory, not on the factory] ERC-4626 deposit: (assets, receiver). approve(vault, assets) on the vault asset first. Assets are supplied to the curator's Morpho Blue markets following the supply queue.
write withdraw(uint256,address,address)
[On a Vault V1] ERC-4626 withdraw an exact asset amount: (assets, receiver, owner). Limited by liquidity in the underlying markets.
write redeem(uint256,address,address)
[On a Vault V1] Burn shares for assets: (shares, receiver, owner). Use balanceOf(you) as shares to exit fully.
read maxWithdraw(address)
[On a Vault V1] Max assets the owner can withdraw now (bounded by underlying market liquidity).
read convertToAssets(uint256)
[On a Vault V1] Asset value of shares (share price).
MetaMorpho Factory [OLD] (Vault V1.0)factory on ethereum0xA9c3D3a366466Fa809d1Ae982Fb2c46E5fC41101
read isMetaMorpho(address)
True for Vault V1.0 vaults created by this older factory.
Blue Public Allocator (Vault V2)other on ethereum0x00b8e1509398ED692C3F326CbAf1694F9A881e27
write reallocate(address,address,(address,address,address,address,uint256),address,(address,address,address,address,uint256),uint128,uint64)
Move a Vault V2's liquidity between Blue markets so you can borrow/withdraw where liquidity is short: (vault, deallocateAdapter, deallocateMarketParams, allocateAdapter, allocateMarketParams, assets, penalty). Pass penalty = vaultData(vault).penalty; if non-zero, approve this contract for the penalty amount in the vault asset first. Subject to the vault's caps set in this contract.
write allocateFromIdle(address,address,(address,address,address,address,uint256),uint128,uint64)
Allocate a Vault V2's idle assets to a market: (vault, adapter, marketParams, assets, penalty). Only if vaultData(vault).canPullFromIdle.
read vaultData(address)
vault -> (canPullFromIdle, penalty). penalty is WAD-scaled (1e18 = 100%).
read absoluteCap(address,bytes32)
(vault, allocationId) -> cap for allocations through the Public Allocator; allocationId = keccak256(abi.encode("this/marketParams", adapter, marketParams)).
read canPullFromMarket(address,bytes32)
(vault, allocationId) -> whether liquidity may be pulled from that market.
BlueBundlesV1 (one-tx Morpho Blue actions)router on ethereum0x38B0C12AB81976e9417D4ebfe2A34DB6DF22e6AD
write blueBundlesV1Supply((address,address,address,address,uint256),uint256,(uint8,bytes),uint256,address,uint256)
Supply loan assets to a market in one tx: (marketParams, assets, loanTokenPermit, referralFeePct, referralFeeRecipient, deadline). loanTokenPermit empty (kind 0, data 0x) = you approved this contract beforehand; otherwise an ERC-2612 or Permit2 signature. referralFeePct WAD-scaled (0 = none). Payable per ABI.
write blueBundlesV1SupplyCollateralAndBorrow((address,address,address,address,uint256),uint256,uint256,uint256,(uint8,bytes),((uint8,bytes32,bytes32),uint256,uint256),(address,address,(address,address,address,address,uint256),bool,address,(address,address,address,address,uint256),uint128,uint64)[],uint256,address,uint256)
One-click borrow: (marketParams, collateralAssets, borrowAssets, maxLtv, collateralPermit, signedAuthorization, reallocations, referralFeePct, referralFeeRecipient, deadline). Reverts if resulting LTV > maxLtv (WAD). signedAuthorization = Morpho setAuthorizationWithSig for this contract (empty signature if already authorized). reallocations = optional Public Allocator moves to source liquidity.
write blueBundlesV1RepayAndWithdrawCollateral((address,address,address,address,uint256),uint256,uint256,uint256,uint256,uint256,(uint8,bytes),((uint8,bytes32,bytes32),uint256,uint256),uint256,address,uint256)
(marketParams, repayAssets, repayShares, maxRepayAssets, collateralAssets, maxLtv, loanTokenPermit, signedAuthorization, referralFeePct, referralFeeRecipient, deadline). Repay by assets or shares (one of them), then withdraw collateral, checking maxLtv.
write blueBundlesV1Withdraw((address,address,address,address,uint256),uint256,uint256,((uint8,bytes32,bytes32),uint256,uint256),(address,address,(address,address,address,address,uint256),bool,address,(address,address,address,address,uint256),uint128,uint64)[],uint256,address,uint256)
(marketParams, withdrawAssets, withdrawShares, signedAuthorization, reallocations, referralFeePct, referralFeeRecipient, deadline). Withdraw lent assets, optionally pulling public-allocator liquidity first.
write blueBundlesV1MigrateBorrowPosition((address,address,address,address,uint256),(address,address,address,address,uint256),uint256,((uint8,bytes32,bytes32),uint256,uint256),(address,address,(address,address,address,address,uint256),bool,address,(address,address,address,address,uint256),uint128,uint64)[],uint256,address,uint256)
Move a whole borrow position (collateral + debt) to another market with the same loan/collateral tokens: (sourceMarketParams, destMarketParams, maxLtv, signedAuthorization, reallocations, referralFeePct, referralFeeRecipient, deadline).
VaultBundlesV1 (one-tx vault deposit/withdraw/migrate)router on ethereum0x02912516d49dE997db75B9D7858faAE59209650B
write vaultBundlesV1Deposit(address,uint256,uint256,(uint8,bytes),uint256,address,uint256)
Deposit into a Vault V1 or V2: (vault, assets, maxSharePriceE27, assetPermit, referralFeePct, referralFeeRecipient, deadline). maxSharePriceE27 = slippage guard on share price (assets per share scaled 1e27). Empty permit = prior ERC-20 approval to this contract.
write vaultBundlesV1Withdraw(address,uint256,uint256,(uint256,uint256,uint256,uint8,bytes32,bytes32),uint256,address,uint256)
(vault, assets, shares, sharesPermit, referralFeePct, referralFeeRecipient, deadline). Withdraw by assets or shares; needs a share allowance to this contract or an ERC-2612 share permit.
write vaultBundlesV1Migrate(address,address,uint256,uint256,uint256,(uint256,uint256,uint256,uint8,bytes32,bytes32),uint256,address,uint256)
(sourceVault, destVault, assetsWithdrawn, sharesRedeemed, destMaxSharePriceE27, sharesPermit, referralFeePct, referralFeeRecipient, deadline). E.g. Vault V1 to its V2 successor in one tx.
VaultExitBundlesV1 (exits from illiquid vaults)router on ethereum0xaf85aF286637A033BE7d59ED8cC566afa3309B02
write vaultExitBundlesV1ForceWithdrawVaultV2(address,address,uint256,uint256,(uint256,uint256,uint256,uint8,bytes32,bytes32),uint256,address,uint256)
Exit an illiquid Vault V2 whose underlying markets are liquid, paying the force-deallocate penalty (idle and liquidity-adapter assets first, penalty-free).
write vaultExitBundlesV1InKindRedemptionVaultV2(address,address,(address,address,address,address,uint256)[],uint256,(uint256,uint256,uint256,uint8,bytes32,bytes32),uint256)
Withdraw idle assets and take the rest in kind (as Morpho Blue supply positions) from an illiquid Vault V2.
write vaultExitBundlesV1InKindRedemptionVaultV1(address,(address,address,address,address,uint256)[],uint256,(uint256,uint256,uint256,uint8,bytes32,bytes32),uint256)
Redeem in kind from an illiquid Vault V1.
Bundler3 (DEPRECATED, replaced by Bundles)router on ethereum0x6566194141eefa99Af43Bb5Aa71460Ca2Dc90245
EthereumGeneralAdapter1 (Bundler3 adapter, DEPRECATED)other on ethereum0x4A6c312ec70E8747a587EE860a0353cd42Be0aE0
Midnight (Morpho Midnight fixed-rate, fixed-term order-book markets)pool on ethereum0x471686c42792F93528B000beF54bC10E3aa2045f
MORPHO token (wrapped, transferable)token on ethereum0x58D97B57BB95320F9a05dC918Aef65434969c2B2
read balanceOf(address)
MORPHO balance (18 decimals).
write transfer(address,uint256)
Transfer MORPHO.
write approve(address,uint256)
Approve a spender.
write delegate(address)
Delegate on-chain voting power.
read delegatee(address)
Current delegatee of an account.
read delegatedVotingPower(address)
Voting power delegated to an account.
MORPHO wrapper (legacy MORPHO -> MORPHO 1:1)other on ethereum0x9D03bb2092270648d7480049d0E58d2FcF0E5123
write depositFor(address,uint256)
Wrap legacy MORPHO (0x9994E35Db50125E0DF82e4c2dde62496CE330999, non-transferable) into the new MORPHO: (account, amount); approve the wrapper on the legacy token first.
write withdrawTo(address,uint256)
Unwrap back to legacy MORPHO.
Morpho (Morpho Blue singleton) - same interface as the Ethereum entrypool on base0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb
AdaptiveCurveIrmother on base0x46415998764C29aB2a25CbeA6254146D50D22687
VaultV2Factory - same interface as the Ethereum entryfactory on base0x4501125508079A99ebBebCE205DeC9593C2b5857
MetaMorpho Factory V1.1 - same interface as the Ethereum entryfactory on base0xFf62A7c278C62eD665133147129245053Bbf5918
MetaMorpho Factory [OLD] (Vault V1.0)factory on base0xA9c3D3a366466Fa809d1Ae982Fb2c46E5fC41101
Blue Public Allocator (Vault V2) - same interface as the Ethereum entryother on base0xAED282B8aD9257BB1272e93aE63A32A53621e412
BlueBundlesV1 - same interface as the Ethereum entryrouter on base0x4D28D900e381eCE4B351302f1Abe588496793A2b
VaultBundlesV1 - same interface as the Ethereum entryrouter on base0x2B08A911f48dE25A7e305D910Afb5597aBE8ea7B
VaultExitBundlesV1 - same interface as the Ethereum entryrouter on base0xE52E169C342C096C4949ABb944DC9f30E3F5Ea84
Bundler3 (DEPRECATED, replaced by Bundles)router on base0x6BFd8137e702540E7A42B74178A4a49Ba43920C4
GeneralAdapter1 (Bundler3 adapter, DEPRECATED)other on base0xb98c948CFA24072e58935BC004a8A7b376AE746A
Midnight (fixed-rate markets)pool on base0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A
MORPHO token (Base)token on base0xBAa5CC21fd487B8Fcc2F632f3F4E8D37262a0842
Morpho (Morpho Blue singleton; address differs from Ethereum/Base) - same interface as the Ethereum entrypool on arbitrum0x6c247b1F6182318877311737BaC0844bAa518F5e
VaultV2Factory - same interface as the Ethereum entryfactory on arbitrum0x6b46fa3cc9EBF8aB230aBAc664E37F2966Bf7971
MetaMorpho Factory V1.1 - same interface as the Ethereum entryfactory on arbitrum0x878988f5f561081deEa117717052164ea1Ef0c82
Blue Public Allocator (Vault V2) - same interface as the Ethereum entryother on arbitrum0x85b66Fe31e6788E5a6825EAe689f4c6c38AF3704
Morpho (Morpho Blue singleton; address differs from Ethereum/Base) - same interface as the Ethereum entrypool on optimism0xce95AfbB8EA029495c66020883F87aaE8864AF92
VaultV2Factory - same interface as the Ethereum entryfactory on optimism0x6128b680b277Bf4Df80DFE9D8c55A498660870ef
MetaMorpho Factory V1.1 - same interface as the Ethereum entryfactory on optimism0x3Bb6A6A0Bc85b367EFE0A5bAc81c5E52C892839a
Blue Public Allocator (Vault V2) - same interface as the Ethereum entryother on optimism0xc6945A915Bb7e2A365469f120A33D2FA42951cF3
Morpho (Morpho Blue singleton; address differs from Ethereum/Base) - same interface as the Ethereum entrypool on polygon0x1bF0c2541F820E775182832f06c0B7Fc27A25f67
VaultV2Factory - same interface as the Ethereum entryfactory on polygon0xC11a53eE9B1eCc7a068D8e40F8F17926584F97Cf
MetaMorpho Factory V1.1 - same interface as the Ethereum entryfactory on polygon0xa9c87daB340631C34BB738625C70499e29ddDC98
Blue Public Allocator (Vault V2) - same interface as the Ethereum entryother on polygon0xAb06a92cd253Bc12Dec8f719a693a6b472CCDfF4
Morpho (Morpho Blue singleton; address differs from Ethereum/Base) - same interface as the Ethereum entrypool on unichain0x8f5ae9CddB9f68de460C77730b018Ae7E04a140A
VaultV2Factory - same interface as the Ethereum entryfactory on unichain0xC9b34c108014B44e5a189A830e7e04c56704a0c9
MetaMorpho Factory V1.1 - same interface as the Ethereum entryfactory on unichain0xe9EdE3929F43a7062a007C3e8652e4ACa610Bdc0
Blue Public Allocator (Vault V2) - same interface as the Ethereum entryother on unichain0x2b7Bf2f2027bcfE3A1F6Bc93EA80220a883a6851
Morpho (Morpho Blue singleton; address differs from Ethereum/Base) - same interface as the Ethereum entrypool on avalanche0x895383274303AA19fe978AFB4Ac55C7f094f982C
VaultV2Factory - same interface as the Ethereum entryfactory on avalanche0xf7b1d9e43BAeA3705f2B303693766ACbcfec6A55
Blue Public Allocator (Vault V2) - same interface as the Ethereum entryother on avalanche0x1cc30758C8c406D0Bc463Ee89613bA21A2576662
Morpho (Morpho Blue singleton; address differs from Ethereum/Base) - same interface as the Ethereum entrypool on bnb0x01b0Bd309AA75547f7a37Ad7B1219A898E67a83a
VaultV2Factory - same interface as the Ethereum entryfactory on bnb0x29955201601630f686beAF47b0B03be7b86d160F
MetaMorpho Factory V1.1 - same interface as the Ethereum entryfactory on bnb0x92983687e672cA6d96530f9Dbe11a196cE905d72
Blue Public Allocator (Vault V2) - same interface as the Ethereum entryother on bnb0x0254e254f50fD4c4A8F38fAAB735487FD5Fe1BD5
MORPHO token (Arbitrum)token on arbitrum0x40BD670A58238e6E230c430BBb5cE6ec0d40df48