Manage Morpho protocol vaults, markets, and reward programs via the morpho-list CLI. Use when adding vaults/markets, deploying or managing reward programs, compiling the masterlist, or any registry operation.
Filesystem-based registry of Morpho protocol vaults, markets, rewards, and blacklists. All mutations go through the CLI — never create or edit data.json files by hand.
Requires a .env file with:
VENN_URL — RPC gateway base URL. RPC URLs are constructed as ${VENN_URL}/<chain-internalName>.ETHEREUM_PRIVATE_KEY — only needed for reward commands that sign transactions.Use the internalName from @gfxlabs/oku-chains or a numeric chain ID:
| Chain ID | Name |
|---|---|
| 1 | ethereum |
| 8453 | base |
| 137 | polygon |
| 480 |
| (World Chain) |
| 1329 | (Sei) |
| 10 | (Optimism) |
| 42793 | (Etherlink) |
| 21000000 | (Corn) |
New chain directories are created automatically by the CLI.
yarn tsx cli.ts add vault <chain> <vault-address> [--force] [--with-markets] [--dir chains]
chains/<chainId>/vaults/<checksummed-address>/data.json.--with-markets (default: true) automatically fetches and stores all markets the vault allocates to.--force overwrites existing vault/market data.viem.getAddress()), not all-lowercase.Contract Function Execution Error: Execution reverted — the SDK only supports v1 ABIs. Skip these vaults.--force is passed.When adding many vaults, run them in parallel — each vault writes to its own directory so there are no conflicts. Use a shell loop:
add_vault() {
yarn tsx cli.ts add vault "$1" "$2" 2>&1
}
for addr in 0xabc... 0xdef...; do
add_vault ethereum "$addr" &
done
wait
Collect failures separately — they are almost always v2 vaults that should be skipped.
yarn tsx cli.ts add market <chain> <market-id> [--force] [--dir chains]
<market-id> must be 0x + 64 lowercase hex chars (66 chars total).add vault adds markets automatically.yarn compile
# or:
make list
data.json files, validates with Zod schemas, checks for duplicates, writes public/masterlist.json.masterlist.json directly — it is always regenerated..husky/pre-commit) runs corepack yarn compile automatically and commits any masterlist changes.Always run yarn compile after adding vaults/markets to verify everything passes validation.
All reward commands require ETHEREUM_PRIVATE_KEY in .env for signing transactions.
yarn tsx cli.ts reward deploy <chain> <unique-id> [--prod] [--hash-prefix "oku:v0.0.0"] [--dir chains]
--prod sets a 3-day timelock and configures the production publisher.--prod, configures dev publishers and no timelock.data.json to chains/<chainId>/rewards/<id>/data.json — you must edit it with the actual reward parameters (token, amount, timestamps, vault/market).<unique-id> must not already exist across all chains.yarn tsx cli.ts reward list [--dir chains]
yarn tsx cli.ts reward info [reward-id] [--dir chains]
Shows campaign details, on-chain state, timelock status, and timeline. If reward-id is omitted, presents an interactive search prompt.
yarn tsx cli.ts reward update [reward-id] <root-hash> [--dir chains]
<root-hash> must be a valid 32-byte hex hash.yarn tsx cli.ts reward accept [reward-id] [--dir chains]
yarn tsx cli.ts reward republish-root [reward-id] [--dir chains]
yarn tsx cli.ts reward check [reward-id] [--dir chains]
yarn tsx cli.ts reward check-all-pending [--dir chains]
yarn tsx cli.ts reward pending [--dir chains]
yarn tsx cli.ts reward add-publisher [reward-id] <publisher-address> [--dir chains]
yarn tsx cli.ts reward set-timelock [reward-id] [--timelock 57600] [--dir chains]
yarn tsx cli.ts reward transfer-owner [reward-id] <new-owner-address> [--dir chains]
All data is validated with Zod schemas in src/lib/types.ts.
Vault fields: chainId, name, tokenAddress, performanceFeePercentage (numeric string, raw 18-decimal), vaultAddress, guardianAddress, curatorAddress, enabled, optional blacklisted.
Market fields: chainId, marketId (0x + 64 hex), collateralTokenAddress, loanTokenAddress, oracleAddress, irmAddress, lltvPercent (numeric string), liquidationPenalty (numeric string), enabled.
Reward fields: id, type ("vault"/"market"), vault/market, start_timestamp, end_timestamp, reward_token, reward_amount, urdAddress, salt, name, chainId, production, finished.
Address format: ^0x[a-f0-9]{40}$ (lowercase). Hash format: ^0x[a-f0-9]{64}$ (lowercase).
data.json files by hand — always use the CLI commands.public/masterlist.json — it is regenerated by yarn compile.deploy writes a placeholder — always edit the generated data.json with real parameters after deployment.reward transfer-owner is irreversible — double-check the target address.reward check and reward check-all-pending validate against chains/<chainId>/blacklist/users/data.json. Never accept a root containing blacklisted addresses.