Skip to content
Back to skills

Morpho Architecture

ASecurity

This skill should be used when the user asks about "Morpho architecture", "Morpho Blue", "isolated markets", "MarketParams", "MetaMorpho", "Morpho Vault V2", "Bundler3", "AdaptiveCurveIRM", "how Morpho works", or needs a high-level map of the Morpho lending stack and how pieces connect.

  • 9 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 10, 2026
businessgotesting

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 10, 2026

npx -y skills add cyotee/indexedex --skill morpho-architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Morpho Architecture?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Morpho Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyotee-morpho-architecture/badge)](https://www.skillsdirectory.com/skills/cyotee-morpho-architecture)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: morpho-architecture
description: This skill should be used when the user asks about "Morpho architecture", "Morpho Blue", "isolated markets", "MarketParams", "MetaMorpho", "Morpho Vault V2", "Bundler3", "AdaptiveCurveIRM", "how Morpho works", or needs a high-level map of the Morpho lending stack and how pieces connect.
license: MIT
---

# Morpho Architecture

Morpho is a **permissionless isolated-market** lending stack: a Blue singleton holds markets; vaults (MetaMorpho V1.1, Vault V2) and Bundler3 sit on top for curation and UX.

## Stack map

```text
┌─────────────────────────────────────────────────────────────┐
│ End users / bots / vaults / Crane strategies                │
├──────────────┬──────────────────┬───────────────────────────┤
│ Bundler3     │ MetaMorpho V1.1  │ Vault V2 + adapters       │
│ multicall    │ ERC-4626 curator │ MarketV1 / VaultV1        │
├──────────────┴──────────────────┴───────────────────────────┤
│ Public Allocator (permissionless reallocate for vaults)     │
├─────────────────────────────────────────────────────────────┤
│ Morpho Blue singleton                                       │
│   markets = (loan, coll, oracle, irm, lltv)                 │
│   supply / collateral / borrow / repay / liquidate / flash  │
├──────────────────┬──────────────────┬───────────────────────┤
│ AdaptiveCurveIRM │ IOracle (e.g.    │ ERC-20 loan/coll      │
│ (per-market rate)│ Chainlink V2)    │                       │
└──────────────────┴──────────────────┴───────────────────────┘
```

## Core ideas

| Concept | Detail |
|---------|--------|
| **Isolated markets** | Each market is independent; no shared risk pool across unrelated pairs |
| **MarketParams** | `(loanToken, collateralToken, oracle, irm, lltv)` — identity of a market |
| **Id** | `Id = MarketParamsLib.id(params)` = keccak of encoded params |
| **Shares** | Supply and borrow use virtual-share accounting (`SharesMathLib`) |
| **Oracle scale** | Prices use `ORACLE_PRICE_SCALE = 1e36` |
| **IRM** | AdaptiveCurveIRM is bound to one Morpho address (`MORPHO` immutable) |
| **Permissionless create** | Anyone can `createMarket` if IRM + LLTV already enabled by Morpho owner |

## Blue vs vaults vs bundler

| Layer | Role | User mental model |
|-------|------|-------------------|
| **Blue** | Primitive markets | “I pick a market and supply/borrow” |
| **MetaMorpho V1.1** | Curated ERC-4626 over Blue | “I deposit loan asset; curator allocates to markets” |
| **Vault V2** | Next-gen vault + adapters | “Same product idea, adapter-based allocation” |
| **Bundler3** | Atomic multicall + adapters | “One tx: wrap, supply coll, borrow, …” |
| **Public Allocator** | Permissionless rebalance | “Anyone can reallocate within flow caps” |

## Crane placement

| Tree | Path |
|------|------|
| Vendored domain | `contracts/external/morpho/{blue,blue-irm,blue-oracles,metamorpho-v1.1,public-allocator,vault-v2,bundler3}/` |
| Crane wrappers | `contracts/protocols/lending/morpho/{blue,metamorpho,vault-v2,bundler}/` |
| Network constants | `contracts/constants/networks/*` (`MORPHO`, IRM, factories, Bundler3, …) |
| Tests | `test/foundry/spec/protocols/lending/morpho/` + `test/foundry/fork/*/morpho/` |

## Navigation

| Need | Go to |
|------|--------|
| Supply/borrow/liquidate flows | `skill:morpho-blue-operations` |
| MetaMorpho / Vault V2 / Bundler3 | `skill:morpho-vaults` |
| Crane Service, TestBase, forks | `skill:crane-morpho` |
| Addresses & market id math | `references/addresses-and-ids.md` |
| Components & data structures | `references/components.md` |

## Constraints

- Do **not** mock Morpho/MetaMorpho as SUT in Crane tests — use ported bytecode or live fork binds.
- Live AdaptiveCurveIRM only works with the Morpho instance it was constructed for.
- Matching-market fork parity compares **economic state** (local IRM vs live IRM; `irm` field in MarketParams differs).

## See also

- `skill:morpho-blue-operations`, `skill:morpho-vaults`, `skill:crane-morpho`
- `skill:crane-porting`, `skill:crane-testing`
- Plan: `docs/superpowers/plans/2026-07-27-morpho-port.md`

Files in this skill

  • SKILL.md4.8 KB
  • references/addresses-and-ids.md1.6 KB
  • references/components.md1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…