Create a Market

This tutorial guides you through the process of creating and configuring a market in your Morpho vault.

You have to carefully validate the oracle configuration you expect to use for the market you intend to deploy. Refer to the previous section to check how to validate an oracle configuration.

Make sure to implement protection against inflation front-running attacks. These attacks can allow malicious users to extract value from the market. For detailed explanation and protection measures, refer to the inflation front-running attack protection section.

For permanent protection, it consists in supplying at least 1e9 shares in the market on behalf of the address 0x000000000000000000000000000000000000dEaD , via the supply() function.

Deploying a Market via Etherscan

Fill all attributes

Jump on the createMarket function

  • loanToken: paste the address of the loan token,
  • collateralToken: paste the address of the collateral token,
  • oracle: paste the oracle address,
  • irm: paste the Interest Rate Model address,
  • lltv: the LLTV is defined with 18 decimals. 1e18 represents an LLTV of 100% (which is not enabled) and 945000000000000000 thus represents 94.5%.

Below is a short list of things to have in mind when creating a new market:

Market Creation Etherscan guide

Idle markets

Idle markets on Morpho are markets where assets can not be borrowed. This liquidity earns no yield from borrowers but can be used as an immediately available buffer for withdrawals. Idle markets are used by curators in liquidity curation for Morpho Vaults V1.

To create an idle market, one has to reproduce the same steps than for an any market, except that the only variable field is the loanToken one, all other fields are using the 0 address or 0.

Here is an example from the USDC idle market on Ethereum (0x54efdee08e272e929034a8f26f7ca34b1ebe364b275391169b28c6d7db24dbc8):

  • loanToken: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
  • collateralToken: 0x0000000000000000000000000000000000000000
  • oracle: 0x0000000000000000000000000000000000000000
  • irm: 0x0000000000000000000000000000000000000000
  • lltv: 0

Before creating an idle market for a specific asset on a specific chain, make sure the market does not exist already (see Market ID Generator below).

Important Note

Market Id Retrieval

When creating a market, a CreateMarket event is emitted with the market id:

CreateMarket event showing the market ID

To retrieve the market parameters from this id:

Resource: Market ID Generator

Use this tool to generate the unique market ID from your market parameters:

On this page