How Morpho Blue Works: A Step-by-Step Guide with Oracle-Agnostic Design & Risk Management
Morpho Blue reimagines decentralized lending by prioritizing flexibility, security, and user-driven risk management. Below, I break down its core innovations, including oracle-agnostic pricing, externalized risk layers, and security practices, with a code example for deploying a new lending pool.
Posted by
George KiknadzeRelated reading
Discover how AAVE allows investors to lend stablecoins like USDT, USDC, DAI, and GHO across multiple networks to earn high yields with minimal risk. Learn about supported networks, potential risks, and why AAVE's $30B market size makes it a solid DeFi lending platform
Introducing Morpho Blue
Morpho Blue is a trustless, decentralized and efficient lending primitive that reimagines the DeFi landscape with a focus on flexibility, security, and user-driven risk management. By leveraging oracle-agnostic pricing, externalized risk layers, and robust security practices, Morpho Blue offers a new standard for decentralized and permissionless lending market creation.
In this guide, I'll break down the core innovations behind Morpho Blue and provide a step-by-step tutorial for deploying a new lending pool on the platform. Let's dive in!
Core Innovations
Morpho Blue introduces Oracle-Agnostic Pricing. This innovative approach allows lending pools curators to use any price oracle they prefer (e.g. Chainlink, Pyth, Uniswap, TWAP, etc).
Market creators choose oracles that align with their risk tolerance (e.g., low-latency oracles for volatile assets). It gives market decentralization and avoids reliance on a single oracle provider, that reduces the risk of oracle manipulation risk.
Externalized Risk Management
Permissionless Risk Management
- User Sovereignty: Anyone creates markets with custom parameters (collateral, oracles, LLTV).
- No Governance Bottlenecks: Risk assessment shifts from protocol admins to users or third-party curators.
Morpho Vaults: Delegated Risk Management
Vaults aggregate risk management strategies and allow users to delegate their risk management to a third-party (vault curators). Vaults can be used to create new lending pools with custom risk management strategies.
Example: A WETH
vault allocates funds to multiple Morpho markets (e.g., WETH/DAI, WETH/USDC
) based on curator-defined criteria.
- Curators: Selects markets with acceptable collateral, LLTV, and oracles.
- Lenders: Deposit into vaults, trusting curators to optimize risk/reward.
- Borrowers: Access liquidity from vault-backed markets.
Step-by-step Guide: Deploying a New Lending Pool
Deploy a Custom Market on Ethereum network
Ethereum mainnet address is 0xbbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb
To create a new market, you need to go to a contract on Etherscan (for Ethereum mainnet) and call the following function: createMarket
.
loanToken
: The token that will be lent (e.g., USDC).collateralToken
: The token that will be used as collateral (e.g., WETH).oracle
: The oracle that will provide the price feed (e.g., Chainlink ETH/USD or Uniswap TWAP).irm
: The interest rate model.lltv
: The Liquidation Loan-To-Value (e.g., 86% = 0.86e18).
struct MarketParams {
address loanToken; // e.g., USDC
address collateralToken; // e.g., WETH
address oracle; // e.g., Chainlink ETH/USD or Uniswap TWAP
address irm; // Interest Rate Model
uint256 lltv; // Liquidation Loan-To-Value (86% = 0.86e18)
}
Fill out the required attributes and call the Write
function to deploy a new market on Morpho. Keep in mind, to submit a transaction, you need to have enough Ether in your wallet to cover the gas fees.
Retrieve Market Id
After creating a new market, you can retrieve the market ID going to the contract Event Logs on Etherscan and looking for the CreateMarket
event logs that contains transaction hash you just submitted.
You can retrieve the market parameters by calling the idToMarketParams
. For instance id: 0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc
Morpho Incentive
MORPHO tokens are rewarded to active market participants (lenders/borrowers). Vault curators also earn fees for optimizing capital allocation.
Conclusion
Morpho Blue’s oracle-agnostic design, delegated risk management via vaults, and unmatched security make it a paradigm shift in decentralized finance. Developers can deploy tailored markets in minutes, while users retain full control over risk exposure.