← Back to Skills Marketplace
metobom

Morpho Market Creation

by metobom · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
40
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install morpho-market-creation
Description
Deploys Morpho markets backed by API3 oracles.
README (SKILL.md)

Morpho Market Creation

Variables

Variable Description
CHAIN_NAME Human-readable chain name (e.g. Ethereum)
CHAIN_ALIAS Chain alias from the chain list (e.g. ethereum)
CHAIN_ID Numeric chain ID (e.g. 1)
COLLATERAL_TOKEN Collateral asset symbol (e.g. ETH, USDC)
LOAN_TOKEN Loan asset symbol (e.g. DAI, USDT)
COLLATERAL_PROXY_ADDRESS Api3ReaderProxyV1 address for the collateral/USD feed — starts with 0x, exactly 42 characters
LOAN_PROXY_ADDRESS Api3ReaderProxyV1 address for the loan/USD feed — starts with 0x, exactly 42 characters

Rules

  • NEVER read .env files or ask for secrets such as WALLET_MNEMONIC.
  • ALWAYS use the exec tool to run commands. Never use Bash or shell directly.
  • ALWAYS run scripts in skill's directory, which is referenced as {baseDir} variable and name is given in this file's name field at top. Prefix every command with cd {baseDir} && to ensure it runs from the correct directory.
  • ALWAYS substitute actual variable values into every exec command before running it.
  • ALWAYS after asking any question, stop and wait for the user's response. Do not assume a response or continue until the user has replied.
  • ALWAYS complete the current phase fully before moving to the next. Never skip a phase or assume it is already done.
  • Treat affirmative responses as approval (e.g. "yes", "sure", "ok", "go ahead", "yep"). Treat negative responses as rejection (e.g. "no", "nope", "cancel", "stop"). If intent is unclear, ask once more before acting.
  • NEVER wrap URLs in markdown formatting (backticks, asterisks, brackets, etc.) or add trailing punctuation when sharing them with the user — share the raw URL as plain text so it stays clickable and isn't corrupted with extra characters.
  • ALWAYS lowercase \x3CCHAIN_ALIAS> and the token symbol (\x3CCOLLATERAL_TOKEN> / \x3CLOAN_TOKEN>) when substituting them into market.api3.org URL paths (e.g. https://market.api3.org/ethereum/eth-usd/integrate), even if the confirmed values are stored/displayed with different casing.

Phase 0: Introduction

  • Introduce the skill: you will walk the user through deploying a Morpho Market backed by Api3 oracles, step by step. You will ask for approval before installing packages and before executing transactions.
  • Ask if they are ready to begin and wait for an affirmative response before continuing.

Phase 1: Package Installation

Part 1.1

  • You must always run this step. Do not skip it, even if you think packages are already installed.
  • Inform the user that before any scripts can run, the required packages must be installed. Show them the list:
    • @api3/dapi-management
    • @morpho-org/blue-sdk
    • dotenv
    • ethers
  • Ask for approval to run pnpm install. Wait for an affirmative response. Once approved, run the command regardless of whether packages may already be installed:
exec command="cd {baseDir} && pnpm install"
  • If the output contains [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: unrs-resolver..., this is expected and not a real failure — the ignored build script is not needed for this skill. Treat it as success and continue.
  • If the command fails for any other reason, inform the user and ask what to do. This step cannot be skipped.

Phase 2: Collect and Validate Parameters

Part 2.1

  • Ask the user in a single message for: the chain they want to deploy on, the collateral token symbol, and the loan token symbol. Wait for all three answers before continuing.

Part 2.2

  • Run get-dapis.ts and get-chains.ts to fetch the list of available feeds and supported chains:
exec command="cd {baseDir} && ts-node {baseDir}/scripts/get-dapis.ts"
exec command="cd {baseDir} && ts-node {baseDir}/scripts/get-chains.ts"
  • If script fails, let user know about the problem and ask what to do. This data is necessary for validating their input, so skipping is not an option.

Part 2.3

  • Validate CHAIN_ALIAS:

    • Search the output of get-chains.ts — first by alias field (case-insensitive), then by name field.
    • Match found: set CHAIN_ALIAS, CHAIN_NAME, CHAIN_ID and confirm the matched values with the user. If they say no, ask them to re-enter the chain and repeat.
    • No match: tell the user and ask them to re-enter the chain name or alias.
  • Validate feeds:

    • Search the output of get-dapis.ts for \x3CCOLLATERAL_TOKEN>/USD and \x3CLOAN_TOKEN>/USD (case-insensitive).
    • Both found: keep COLLATERAL_TOKEN and LOAN_TOKEN as bare token symbols only, and show the user the matched feed names (\x3CCOLLATERAL_TOKEN>/USD and \x3CLOAN_TOKEN>/USD) for confirmation.
    • Either missing: tell the user which feed was not found, ask for a different token symbol, and repeat for the missing feed.

Part 2.4

  • Show the user all confirmed parameters:
    • Chain: \x3CCHAIN_NAME> (\x3CCHAIN_ALIAS>, ID: \x3CCHAIN_ID>)
    • Collateral Token: \x3CCOLLATERAL_TOKEN>
    • Loan Token: \x3CLOAN_TOKEN>
    • Matched Feeds: \x3CCOLLATERAL_TOKEN>/USD, \x3CLOAN_TOKEN>/USD
  • Ask the user to confirm that they want to proceed. If yes, proceed to Phase 3. If no, ask the user what they want to do.

Phase 3: Test Oracle

Part 3.1

  • Warn the user that the found Api3 data feeds must be active on Api3 Market. Ask if they want to continue. If no, ask the user what they want to do.

Part 3.2

  • Ask the user to open https://market.api3.org/\x3CCHAIN_ALIAS>/\x3CCOLLATERAL_TOKEN>-usd/integrate, copy the Api3ReaderProxyV1 address, and share it here.
    • Validate: must start with 0x and be exactly 42 characters. If invalid, tell the user and ask them to re-enter.
    • Set COLLATERAL_PROXY_ADDRESS to the validated value.
  • Run read-data-feed.ts to verify the collateral feed is active:
exec command="cd {baseDir} && ts-node {baseDir}/scripts/read-data-feed.ts \x3CCOLLATERAL_PROXY_ADDRESS> \x3CCHAIN_ALIAS>"
  • If the script fails, let user know about the problem and ask what to do.

  • Show the value and timestamp from the output and ask the user if it looks correct. If no, ask them to recheck the URL and re-enter the address, then repeat.

  • Ask the user to open https://market.api3.org/\x3CCHAIN_ALIAS>/\x3CLOAN_TOKEN>-usd/integrate, copy the Api3ReaderProxyV1 address, and share it here.

    • Validate: must start with 0x and be exactly 42 characters. If invalid, tell the user and ask them to re-enter.
    • Set LOAN_PROXY_ADDRESS to the validated value.
  • Run read-data-feed.ts to verify the loan feed is active:

exec command="cd {baseDir} && ts-node {baseDir}/scripts/read-data-feed.ts \x3CLOAN_PROXY_ADDRESS> \x3CCHAIN_ALIAS>"
  • If the script fails, let user know about the problem and ask what to do.
  • Show the value and timestamp from the output and ask the user if it looks correct. If no, ask them to recheck the URL and re-enter the address, then repeat.

Part 3.3

  • Direct the user to open https://oracles.morpho.dev/oracle-tester and select \x3CCHAIN_NAME> as the chain. Ask them to select the collateral and loan assets from the dropdowns — they should confirm those contract addresses match the intended assets. Then paste \x3CCOLLATERAL_PROXY_ADDRESS> into Base Feed1 and \x3CLOAN_PROXY_ADDRESS> into Quote Feed1. Wait for confirmation before continuing.
  • Ask the user to click Run Oracle Tests and report whether all tests passed.
    • If any failed: ask them to recheck the feed addresses from the integration URLs, correct them on the tester, and retry. Wait until all tests pass.
  • Ask the user to click Generate Safe Payload to use later if needed. Proceed to Phase 4.

Phase 4: Deploy Oracle

Part 4.1

  • Ask the user how they want to deploy the oracle, offering three options:
    • Option 1 — Gnosis Safe — upload the payload JSON to Safe{Wallet}
    • Option 2 — Etherscan — execute via Etherscan
    • Option 3 — Script — deploy on their behalf using a script
  • Wait for the user to choose an option before continuing.

Part 4.2 — Option 1: Gnosis Safe

  • Instruct the user to download the generated payload JSON, then open Safe{Wallet}, click New Transaction, select Transaction Builder, upload the downloaded payload JSON, and follow the prompts to submit the transaction.
  • Proceed to Phase 5.

Part 4.2 — Option 2: Etherscan

  • Run get-oracle-contract-link.ts to get the correct Etherscan URL:
exec command="cd {baseDir} && ts-node {baseDir}/scripts/get-oracle-contract-link.ts \x3CCHAIN_ALIAS>"
  • If the script fails, let user know about the problem and ask what to do.
  • Instruct the user to open the provided Etherscan URL, connect their wallet, find the createMorphoChainlinkOracleV2 function and fill in the parameters exactly as shown in the Morpho Oracle Tester.
  • Proceed to Phase 5.

Part 4.2 — Option 3: Script

  • Ask the user to open {baseDir}/oracle-params.json and fill in the oracle constructor parameters using the values from the Morpho Oracle Tester: set baseFeed1 to \x3CCOLLATERAL_PROXY_ADDRESS> and quoteFeed1 to \x3CLOAN_PROXY_ADDRESS>, and fill in the remaining fields (decimals, vaults, salt) to match. Also ask them to set WALLET_MNEMONIC in the .env file. Wait for confirmation.
  • Ask for approval to run deploy-oracle.ts. Wait for an affirmative response, then run:
exec command="cd {baseDir} && ts-node {baseDir}/scripts/deploy-oracle.ts \x3CCHAIN_ALIAS>"
  • If the script fails, let user know about the problem and ask what to do.
  • Show the user: transaction hash and deployed oracle address.
  • Proceed to Phase 5.

Phase 5: Create Market

Part 5.1

  • Ask the user to open {baseDir}/market-params.json and fill in the market parameters:
    • loanToken — contract address of the loan token (e.g. can be found at /tokens path of block explorer)
    • collateralToken — contract address of the collateral token (e.g. can be found at /tokens path of block explorer)
    • oracle — the oracle address deployed in Phase 4
    • irm — governance-approved Interest Rate Model address for \x3CCHAIN_NAME> (tell the user to check https://docs.morpho.org/get-started/resources/addresses/#morpho-blue Adaptive Curve IRM model address)
    • lltv — liquidation LTV as a percentage number; suggested to be one of the governance-approved values: 0, 38.5, 62.5, 77, 86, 91.5, 94.5, 96.5, 98
  • Ask them to confirm WALLET_MNEMONIC is still set in the .env file. Wait for confirmation.

Part 5.2

  • Ask for approval to run create-market.ts. Wait for an affirmative response, then run:
exec command="cd {baseDir} && ts-node {baseDir}/scripts/create-market.ts \x3CCHAIN_ALIAS>"
  • If the script fails, let user know about the problem and ask what to do.
  • Show the user the transaction hash and the market ID from the output.
Usage Guidance
Install only if you understand that this can spend gas and create permanent on-chain objects. Prefer Safe, Etherscan, hardware wallets, or other external signing flows over storing a wallet mnemonic in .env, and review chain, contract addresses, oracle parameters, IRM, LLTV, wallet address, and expected cost before running any deployment or market-creation script.
Capability Tags
cryptorequires-walletrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose and scripts coherently support deploying API3-backed Morpho markets, but that purpose includes high-impact blockchain actions: deploying oracle contracts and creating live markets with the configured wallet.
Instruction Scope
The workflow asks for user approval before running transaction scripts, but it does not require a final resolved-parameter review, gas/irreversibility warning, dry run, or script-level confirmation before broadcasting transactions.
Install Mechanism
The skill asks to run pnpm install after approval and declares expected packages, but it uses an unpinned latest dependency and references a local API3 package archive that is not present in the inspected artifact.
Credentials
Requiring WALLET_MNEMONIC is disclosed in metadata and README, but placing a wallet recovery phrase in a project .env file is high-risk and under-disclosed for an agent-guided workflow.
Persistence & Privilege
There is no evidence of hidden background persistence or privilege escalation, but the workflow normalizes persistent local storage of a wallet mnemonic and creates durable on-chain state.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install morpho-market-creation
  3. After installation, invoke the skill by name or use /morpho-market-creation
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release – guides users step-by-step to deploy Morpho Markets with API3 oracles. - Introduces a structured, interactive workflow divided into clear phases (setup, package installation, parameter collection, validation, testing, and deployment). - Requires user confirmation before running package installs or deploying transactions. - Validates user input against live data from API3 (data feeds) and supported chain lists. - Provides instructions and interactive checks to manually verify oracle addresses and feed activity. - Integrates with external tools via direct (non-markdown) URLs for oracle testing and payload generation.
Metadata
Slug morpho-market-creation
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Morpho Market Creation?

Deploys Morpho markets backed by API3 oracles. It is an AI Agent Skill for Claude Code / OpenClaw, with 40 downloads so far.

How do I install Morpho Market Creation?

Run "/install morpho-market-creation" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Morpho Market Creation free?

Yes, Morpho Market Creation is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Morpho Market Creation support?

Morpho Market Creation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Morpho Market Creation?

It is built and maintained by metobom (@metobom); the current version is v0.1.0.

💬 Comments