Skip to content

Create a Vault

This tutorial guides you through the process of creating and configuring a new vault in the Morpho ecosystem. Morpho Vaults can be created directly via etherscan (or any other explorer) or using scripts or using apps.

Using the Curator App

Refer to this section

Using Etherscan

Factory Address

Jump into the factory contract. You can find factory addresses on the Addresses section here.

Fill attributes

One will have to fill the following attributes:

  • initialOwner: The initial owner of the vault.
    This address will have the authority to manage the vault's settings and parameters after creation.

  • initialTimelock: The initial duration, in seconds, during which any critical operations (e.g. changing the curator or guardian roles, updating market parameters) are delayed for security reasons. Starting from v1.1, the initial timelock can be set to 0 during vault creation to facilitate the initial configuration. After setup, the timelock must be set within bounds (minimum = 1 day = 86,400 seconds and maximum = 2 weeks = 1,209,600 seconds).

  • asset: The address of the underlying asset (ERC20 token) for which the vault is being created. The vault will manage deposits and withdrawals of this asset.

  • name: The human-readable name of the vault.
    It is used primarily for display and identification purposes.

  • symbol: The abbreviation or ticker symbol of the vault.
    This symbol is a shorter way to represent the vault, typically used in interfaces and listings.

  • salt: A unique value used in conjunction with the vault's other parameters to deterministically generate its address through the CREATE2 opcode. This ensures the uniqueness of the vault's address even if other parameters are identical.

    Vault Creation

Approve

Approve the transaction, and retrieve the address of your vault.

Setup post creation

The vault curator can setup a few things, let's detail them one by one.

Attribute roles

Curator

Execute setCurator(0xNewCurator)

Allocator

Execute setIsAllocator(0xNewAllocator, true). One can set the second attribute to false to revoke the allocation capacity.

Guardian

Note that if no guardian is set, (which is the case at vault creation), submitting a new guardian sets it immediately as the guardian. Execute submitGuardian(0xNewGuardian)

Fee

If one wants to set the performance fees:
  1. Execute setFeeRecipient(0xNewFeeRecipient)
  2. Execute setFee(10000000000000000) // 1%, FEE variable has 18 decimals.

Skim recipient

The skim recipient will receive all rewards that may have been allocated to the vault, while the latter earned them by allocating liquidity on Morpho markets.

Execute setSkimRecipient(0xNewSkimRecipient)