Skip to main content

Getting Started

This guide helps you integrate MetaMorpho into your project.

The onchain scripts are written in Solidity, and based on the Foundry toolkit. The offchain version is written in Typescript, and based on ethers-v6 library.


forge install morpho-org/metamorpho


An educational repository has been released for integrators and users:

MetaMorpho Snippets Repository

It shows how to properly call the different MetaMorpho functions from your own smart contract according to the operations you want to perform.


/// @notice Returns the total assets deposited into a MetaMorpho `vault`.
/// @param vault The address of the MetaMorpho vault.
function totalDepositVault(address vault) public view returns (uint256 totalAssets) {
totalAssets = IMetaMorpho(vault).totalAssets();