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/forge-std
(for testing)maple-labs/address-registry
maple-labs/erc20
maple-labs/erc20-helper
maple-labs/globals-v2
maple-labs/liquidations
maple-labs/fixed-term-loan
maple-labs/fixed-term-loan-manager
maple-labs/open-term-loan
maple-labs/open-term-loan-manager
maple-labs/pool-v2
maple-labs/pool-permission-manager
maple-labs/withdrawal-manager-cyclical
maple-labs/withdrawal-manager-queue
maple-labs/strategies
maple-labs/syrup-utils
Versions of dependencies can be checked with git submodule status
.
This project was built using Foundry. Refer to installation instructions here.
git clone [email protected]:maple-labs/maple-core-v2.git
cd maple-core-v2
forge install
To 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.
Command | Description |
---|---|
make scenario |
Run the scenarios found in ./scenarios/data/csv/ |
All audit reports can be found at https://github.com/maple-labs/maple-core-v2/tree/main/audits
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.