Skip to content

morpho-org/morpho-v1-optimizers-vaults

Repository files navigation

Morpho Optimizers Vaults

Test


Morpho Optimizers vaults

Morpho Optimizers vaults represent tokenized supply positions on Morpho. Vaults are compliant with the ERC4626 standard and can be easily integrated. Please take a look at the vaults documentation for more information.


Audits

Vaults' audits are accessible in the audits' folder. All Morpho audits are accessible in the audits section of the Morpho documentation.


Deployment Addresses

Morpho-Compound Optimizer (Ethereum)

Supply Vaults

Morpho-AaveV2 Optimizer (Ethereum)

Supply Vaults

Common Contracts (Ethereum)


Testing with Foundry 🔨

Tests are run against a fork of real networks, allowing us to interact directly with Compound or Aave liquidity pools. Note that you need an RPC provider with access to Ethereum or Polygon.

For testing, make sure yarn and foundry are installed and install dependencies (node_modules, git submodules) with:

make install

Alternatively, if you only want to set up

Refer to the env.example for the required environment variable.

To run tests on different protocols, navigate a Unix terminal to the root folder of the project and run the command of your choice:

To run every test of a specific protocol (e.g. for Morpho-Compound):

make test PROTOCOL=compound

Or to run only a specific set of tests of a specific protocol (e.g. for Morpho-Aave V2):

make c-TestSupplyVault PROTOCOL=aave-v2

Or to run an individual test of a specific protocol (e.g. for Morpho-Aave V2):

make s-testShouldDepositAmount PROTOCOL=aave-v2

For the other commands, check the Makefile.


Test coverage

Test coverage is reported using foundry coverage with lcov report formatting (and optionally, genhtml transformer).

To generate the lcov report, run the following:

make coverage

The report is then usable either:


Questions & Feedback

For any question or feedback, email [email protected].


Licensing

The code is under the GNU AFFERO GENERAL PUBLIC LICENSE v3.0, see LICENSE.