morpho

Interact with Morpho Blue lending markets and MetaMorpho vaults on Ethereum using viem.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill morpho-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: morpho
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/morpho
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill morpho-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires viem, and includes references (resource) components.

What problem does it solve? AI agents frequently confuse Morpho Blue with the deprecated Morpho Optimizer (V1), hallucinate Aave-style pooled-risk patterns, and misuse market identifiers, oracle decimal scaling, and the assets/shares parameter convention. This Skill provides verified contract addresses, correct ABI fragments, and tested interaction patterns for Morpho Blue and MetaMorpho vaults on Ethereum mainnet. ## Core Features & Use Cases - Direct Market Operations: Supply, withdraw, borrow, repay, and manage collateral on Morpho Blue's singleton contract using correct MarketParams and market ID derivation via keccak256 hashing. - MetaMorpho Vault Integration: Deposit and redeem from ERC-4626 curated vaults with deposit cap checks and share conversion helpers. - Liquidation and Market Creation: Execute liquidations with seizedAssets or repaidShares semantics, and create new permissionless markets with governance-enabled LLTVs and IRMs. - Use Case: An agent asked to "borrow 3000 USDC against 2 WETH on Morpho" loads this Skill to get the correct singleton address, supply collateral, borrow with shares set to zero, and later repay by shares to avoid dust debt. ## Quick Start Ask the agent to supply 1000 USDC to a Morpho Blue market or deposit into the Steakhouse USDC MetaMorpho vault using viem with your RPC_URL and PRIVATE_KEY environment variables set.

Frequently Asked Questions about morpho

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I supply and borrow on Morpho Blue with viem?

Approve the loan or collateral token to the singleton contract at 0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb, then call supply or supplyCollateral followed by borrow. Pass the amount in assets and set shares to zero, since both nonzero reverts with InconsistentInput.

How is a Morpho Blue market ID computed?

The market ID is keccak256 of the ABI-encoded five MarketParams: loanToken, collateralToken, oracle, irm, and lltv. It is a bytes32 hash, not a numeric index, and all markets live in one singleton contract.

What is the difference between Morpho Blue and Morpho Optimizer?

Morpho Optimizer (V1) was a peer-to-peer matching layer on top of Aave and Compound. Morpho Blue is a standalone, immutable lending primitive with its own singleton contract, isolated markets, and no governance or upgradeability.

Why does my Morpho transaction revert with InconsistentInput?

InconsistentInput occurs when both assets and shares are passed as nonzero to supply, withdraw, borrow, or repay. Set exactly one to zero: use assets for exact amounts and shares for proportional or full-balance operations.

How do I repay my full Morpho Blue debt without leaving dust?

Repay by shares instead of assets. Read your borrowShares from the position function, call accrueInterest first, over-approve the loan token slightly, then call repay with assets set to zero and shares set to your full borrowShares.

What decimal scaling do Morpho Blue oracles use?

Morpho Blue oracles return prices scaled by 36 plus loan token decimals minus collateral token decimals, not 18 decimals. A USDC/WETH oracle returns price with 24 decimals, and misreading this causes severe mispricing.