0xGabi / pool-v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pool V2

Foundry CI GitBook - Documentation Foundry License: BUSL 1.1

Overview

This repository contains the core contracts of the Maple V2 protocol that are responsible for the deployment and management of Maple Pools:

Contract Description
Pool Each pool represents a different lending pool with a unique strategy and pool delegate that issues loans on behalf of the liquidity providers. The Pool contract is compatible with the ERC-4626 Tokenized Vault standard.
PoolManager Used by the pool delegate to manage pool level parameters and to issue loans to borrowers.
LoanManager Owns and keeps track of value of all outstanding loans.
PoolDelegateCover Holds first-loss capital in escrow on behalf of the pool delegate.
PoolDeployer Used to deploy new pools with all the required dependencies.

Dependencies/Inheritance

Contracts in this repo inherit and import code from:

Contracts inherit and import code in the following ways:

  • Pool inherits ERC20 for fungible token functionality.
  • PoolDelegateCover, PoolDeployer and PoolManager use ERC20Helper for token interactions.
  • LoanManager, PoolManager, and TransitionLoanManager inherit MapleProxiedInternals for proxy logic.
  • LoanManagerFactory and PoolManagerFactory inherit MapleProxyFactory for proxy deployment and management.

Versions of dependencies can be checked with git submodule status.

Setup

This project was built using Foundry. Refer to installation instructions here.

git clone git@github.com:maple-labs/pool-v2.git
cd pool-v2
forge install

Running Tests

  • To run all tests: forge test
  • To run specific tests: forge test --match <test_name>

./scripts/test.sh is used to enable Foundry profile usage with the -p flag. Profiles are used to specify the number of fuzz runs.

Audit Reports

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

Bug Bounty

For all information related to the ongoing bug bounty for these contracts run by Immunefi, please visit this site.

About Maple

Maple Finance is a decentralized corporate credit market. Maple provides capital to institutional borrowers through globally accessible fixed-income yield opportunities.


About

License:Other


Languages

Language:Solidity 99.7%Language:Shell 0.3%Language:Makefile 0.0%