This repository brings together the core smart contracts of the Maple V2 protocol as dependencies in order to perform integration tests and simulations.
Submodules imported:
maple-labs/contract-test-utils(for testing)maple-labs/erc20maple-labs/globals-v2maple-labs/liquidationsmaple-labs/loanmaple-labs/pool-v2maple-labs/withdrawal-manager
Versions of dependencies can be checked with git submodule status.
This project was built using Foundry. Refer to installation instructions here.
git clone git@github.com:maple-labs/maple-core-v2.git
cd maple-core-v2
forge installTo make it easier to perform some tasks within the repo, a few commands are available through a makefile:
| Command | Action |
|---|---|
make build |
Compile all contracts in the repo, including submodules. |
make clean |
Delete cached files. |
| Command | Description |
|---|---|
make test |
Run all tests located in contracts/tests/. |
make e2e |
Run all end-to-end tests. |
make fuzz |
Run all fuzz tests. |
make integration |
Run all integration tests (Must have ETH_RPC_URL configured to mainnet). |
make invariant |
Run the invariant tests. |
Specific tests can be run using forge test conventions, specified in more detail in the Foundry Book.
For the following commands, a $ETH_RPC_URL environment value needs to be configured with a valid rpc url.
| Command | Description |
|---|---|
make upgrade |
Run the upgrade simulations against mainnet |
| Auditor | Report Link |
|---|---|
| Trail of Bits | 2022-08-24 - Trail of Bits Report |
| Spearbit | 2022-10-17 - Spearbit Report |
| Three Sigma | 2022-10-24 - Three Sigma Report |
| Auditor | Report Link |
|---|---|
| Spearbit Auditors via Cantina | 2023-06-05 - Cantina Report |
| Three Sigma | 2023-04-10 - Three Sigma Report |
For all information related to the ongoing bug bounty for these contracts run by Immunefi, please visit this site.
Maple Finance is a decentralized corporate credit market. Maple provides capital to institutional borrowers through globally accessible fixed-income yield opportunities.
