$npx -y skills add franalgaba/grimoire --skill grimoire-morpho-blueFetches Morpho Blue public deployment metadata using the Grimoire venue CLI. Use when you need contract addresses or adapter info.
| 1 | # Grimoire Morpho Blue Skill |
| 2 | |
| 3 | Use this skill to query Morpho Blue deployment metadata and vault snapshots for spell params. |
| 4 | |
| 5 | Preferred invocations: |
| 6 | |
| 7 | - `grimoire venue morpho-blue ...` |
| 8 | - `npx -y @grimoirelabs/cli venue morpho-blue ...` (no-install) |
| 9 | - `bun run packages/cli/src/index.ts venue morpho-blue ...` (repo-local) |
| 10 | - `grimoire-morpho-blue ...` (direct binary from `@grimoirelabs/venues`) |
| 11 | |
| 12 | Recommended preflight: |
| 13 | |
| 14 | - `grimoire venue doctor --adapter morpho-blue --chain 8453 --rpc-url <rpc> --json` |
| 15 | |
| 16 | Use `--format spell` to emit a `params:` snapshot block. |
| 17 | |
| 18 | The snapshot includes provenance fields (`snapshot_at`, `snapshot_source`) and APY data. |
| 19 | |
| 20 | Use `vault-liquidity` for Morpho Vault V2 vault-wide withdrawal liquidity. It reads onchain Vault V2 fields, caps Morpho Market V1 liquidity-adapter assets by available underlying market cash, and does not use ERC-4626 `maxWithdraw` / `maxRedeem`, which Vault V2 intentionally returns as `0`. |
| 21 | |
| 22 | APY semantics: |
| 23 | |
| 24 | - `apy` / `net_apy` are decimal rates (for example `0.0408` = `4.08%`). |
| 25 | - When reporting, include both decimal and percent display when possible. |
| 26 | |
| 27 | ## Commands |
| 28 | |
| 29 | - `grimoire venue morpho-blue info` — adapter metadata |
| 30 | - `grimoire venue morpho-blue addresses [--chain <id>]` — contract addresses per chain |
| 31 | - `grimoire venue morpho-blue vaults [--chain <id>] [--asset <symbol>] [--min-tvl <usd>] [--min-apy <decimal>] [--min-net-apy <decimal>] [--sort <netApy|apy|tvl|totalAssetsUsd|name>] [--order <asc|desc>] [--limit <n>]` — list and filter vaults |
| 32 | - `grimoire venue morpho-blue vaults-snapshot [--chain <id>] [--asset <symbol>] [--min-tvl <usd>] [--min-apy <decimal>] [--min-net-apy <decimal>] [--sort <netApy|apy|tvl|totalAssetsUsd|name>] [--order <asc|desc>] [--limit <n>]` — generate spell `params:` block for vaults (agent-only) |
| 33 | - `grimoire venue morpho-blue vault-liquidity [--chain <id>] --vault <address> [--rpc-url <url>] [--format json|table|spell]` — read Morpho Vault V2 withdrawable liquidity in asset units and integer bps |
| 34 | |
| 35 | ## Examples |
| 36 | |
| 37 | ```bash |
| 38 | grimoire venue morpho-blue info --format table |
| 39 | grimoire venue morpho-blue addresses --chain 1 |
| 40 | grimoire venue morpho-blue addresses --chain 8453 |
| 41 | grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format table |
| 42 | grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spell |
| 43 | grimoire venue morpho-blue vaults-snapshot --chain 8453 --asset USDC --min-tvl 5000000 |
| 44 | grimoire venue morpho-blue vault-liquidity --chain 8453 --vault 0xbeef0e0834849aCC03f0089F01f4F1Eeb06873C9 --format json |
| 45 | grimoire venue morpho-blue vault-liquidity --chain 8453 --vault 0xbeef0e0834849aCC03f0089F01f4F1Eeb06873C9 --format spell |
| 46 | ``` |
| 47 | |
| 48 | Use `vaults-snapshot` to emit a `params:` block for spell inputs. This is an agent-only command (output suppressed in interactive mode). |
| 49 | |
| 50 | `vault-liquidity --format spell` emits payload-ready JSON params for `protocol: morpho-vault-v2`, `metric: withdrawable_liquidity_bps`, `withdrawable_liquidity_assets`, `total_assets`, `idle_assets`, `liquidity_adapter`, and `liquidity_adapter_assets`. |
| 51 | |
| 52 | Example provenance output fields to preserve: |
| 53 | |
| 54 | - `snapshot_at` |
| 55 | - `snapshot_source` |
| 56 | - `units` (for example `net_apy=decimal`, `net_apy_pct=percent`, `tvl_usd=usd`) |
| 57 | |
| 58 | ## Metric Surface (Spell Comparisons) |
| 59 | |
| 60 | Morpho exposes the `apy` metric surface and supports selector-based market targeting: |
| 61 | |
| 62 | ```spell |
| 63 | morpho_apy_default = apy(morpho, USDC) |
| 64 | morpho_apy_market = apy(morpho, USDC, "weth-usdc-86") |
| 65 | morpho_apy_market_id = apy(morpho, USDC, "0x...") |
| 66 | morpho_apy_generic = metric("apy", morpho, USDC, "wbtc-usdc-86") |
| 67 | morpho_utilization_bps = metric("utilization_bps", morpho, USDC, "wbtc-usdc-86") |
| 68 | vault_apy = metric("vault_apy", morpho, USDC, "vault=0xVaultAddress") |
| 69 | vault_net_apy = metric("vault_net_apy", morpho, USDC, "vault=0xVaultAddress") |
| 70 | vault_withdrawable_liquidity_bps = metric("withdrawable_liquidity_bps", morpho, USDC, "vault=0xVaultAddress") |
| 71 | ``` |
| 72 | |
| 73 | Use `apy(morpho, asset[, selector])` for Morpho Blue market APY comparisons. |
| 74 | Use `metric("utilization_bps", morpho, asset[, selector])` for Morpho Blue market utilization checks. |
| 75 | Use `metric("vault_apy", morpho, asset, selector)` or `metric("vault_net_apy", morpho, asset, selector)` for MetaMorpho vault comparisons. |
| 76 | Use `metric("withdrawable_liquidity_bps", morpho, asset, selector)` for Morpho Vault V2 live withdrawal liquidity checks. |
| 77 | |
| 78 | Selector behavior: |
| 79 | |
| 80 | - market no selector (`apy`): resolves by `asset` on the active chain and picks the highest-TVL match |
| 81 | - config market selector: use known market ids from adapter config (for example `weth-usdc-86`) |
| 82 | - onchain market id selector: use raw market id (`0x...`) |
| 83 | - vault selectors (`vault_apy` / `vault_net_apy`): `vault=<address|name|symbol>` or bare vault address/name/symbol |
| 84 | - `vault_apy` / `vault_net_apy` require explicit selector (no |