Deploying a Vault

This walkthrough shows how a strategist can launch a MORE Vault on any EVM network on which the MORE Vaults protocol is deployed using the Solidity scripts that ship with the core repo. To deploy on your target network, you can switch RPC endpoints and explorer links.

Scripts location: /scripts

  • Deploy.s.sol – builds a configuration struct from .env.

  • CreateVault.s.sol – signs a transaction to the permissionless Vault Factory.

These scripts run under Foundry using standard EVM byte‑code. A Python library is currently under development and will be made available soon.

What you’ll deploy

  • Diamond proxy – the vault contract.

  • Facet set – core + strategy modules you choose.

  • Registry entry – written automatically so frontends can find your vault.

All three happen inside one factory call.

Environment setup

# Install Foundry
curl -L https://foundry.paradigm.xyz | bash && foundryup

# Clone the repo
git clone https://github.com/deathwing00000/More-Vaults.git
cd More-Vaults

# Compile once
forge build

If forge build fails or the RPC later errors, hop onto Discord and open a #support-ticket for live help.

Create .env

Copy .env.example to .env and fill in:

# GENERAL PARAMS
PRIVATE_KEY=

# VAULT CREATION PARAMS
OWNER=
CURATOR=
GUARDIAN=
FEE_RECIPIENT=
UNDERLYING_ASSET=
FEE=
DEPOSIT_CAPACITY=
TIME_LOCK_PERIOD=

# PROTOCOL DEPLOYMENT PARAMS
WRAPPED_NATIVE=
USD_STABLE_TOKEN_ADDRESS=
AAVE_ORACLE=

# DEPLOYED PROTOCOL ADDRESSES
DIAMOND_CUT_FACET=
DIAMOND_LOUPE_FACET=
ACCESS_CONTROL_FACET=
CONFIGURATION_FACET=
VAULT_FACET=
MULTICALL_FACET=
UNISWAP_V2_FACET=
ORIGAMI_FACET=
MORE_MARKETS_FACET=
AGGRO_KITTY_SWAP_FACET=
CURVE_FACET=
UNISWAP_V3_FACET=
MULTI_REWARDS_FACET=
VAULT_REGISTRY=
VAULTS_FACTORY=

Need facet addresses? The Facet & Selector docs list every DAO‑approved facet. Experimental facets live in the permissionless registry.

Leaving FEE=0 means no performance fees will be taken.

Dry-run

forge script scripts/CreateVault.s.sol:CreateVaultScript \
  --rpc-url $RPC_URL --chain-id $CHAIN_ID \
  --broadcast --dry-run

Foundry prints the CreateVaultParams and the array of FacetCut entries it will submit. Check every field: roles, fee, capacity, facet list. Edit .env and repeat until correct.

What happens:

  1. Deploy.s.sol reads your env vars.

  2. getCuts() builds one FacetCut per facet (address, selector array).

  3. CreateVault signs with PRIVATE_KEY and calls deployVault() on the factory.

Broadcast

Remove --dry-run to send the transaction:

forge script scripts/CreateVault.s.sol:CreateVaultScript \
  --rpc-url $RPC_URL --chain-id $CHAIN_ID \
  --broadcast -vv

Save the transaction hash, and once mined, the vault address printed by Foundry.

Verify

  1. Facet table

cast call <VAULT_ADDRESS> "facets()" --rpc-url $RPC_URL
  1. Ensure the list matches your .env.

  2. Flowscan – paste the vault address into https://evm.flowscan.io. You should see the factory call and proxy creation.

  3. Subgraph – within 30 seconds the vault appears:

{
  vault(id: "<VAULT_ADDRESS>") { ID factory asset name symbol decimals totalSupply totalAssets totalAssetsUSD }
}

Post-deploy checklist

Task

Purpose

Whitelist (optional)

Call setDepositCapacity(depositors[], underlyingAssetCaps) for each investor to keep the pool private.

**Initial **``

Locks in the first share‑price snapshot.

Announce

Share the vault in #general-chat on Discord.

Troubleshooting

For the most common issues, you can refer to the following guide:

Symptom

Likely cause

Fix

Facet cut failed

Facet hash missing from both registries

Register the facet or use an approved one

Vault missing subgraph

Wrong network URL

Make sure you used the right EVM subgraph endpoint

Last updated