This repository holds the Liquidator
contract. Whenever a borrower is no longer able to meet their obligations and a loan goes into default, the liquidation process can be triggered by the pool delegate which issued the loan. The goal of this process is to recover as much liquidity as possible from any assets that are still recoverable and minimize the losses suffered by the pool.
Contracts in this repo inherit and import code from:
Contracts inherit and import code in the following ways:
Liquidator
usesERC20Helper
for token interactions.Liquidator
inheritsMapleProxiedInternals
for proxy logic.LiquidatorFactory
inheritsMapleProxyFactory
for proxy deployment and management.
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/liquidations.git
cd liquidations
forge install
- Set the enviroment variable
ETH_RPC_URL
to mainnet url - 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.
Auditor | Report Link |
---|---|
Trail of Bits - LoanV2 | 2021-12-28 - Trail of Bits Report |
Code 4rena - LoanV2 | 2022-01-05 - C4 Report |
Trail of Bits - LoanV3 | 2022-04-12 - Trail of Bits Report |
Code 4rena - LoanV3 | 2022-04-20 - C4 Report |
Trail of Bits | 2022-08-24 - Trail of Bits Report |
Spearbit | 2022-10-17 - Spearbit Report |
Three Sigma | 2022-10-24 - 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.