Aave Protocol V2
Go to file
2020-11-16 16:08:07 +01:00
config Added initial README. Digging into Tenderly. Added initial mainnet fork with buidler. 2020-11-16 16:08:07 +01:00
contracts - Removed not needed receive() on LendingPool 2020-11-11 16:05:44 +01:00
helpers Added initial README. Digging into Tenderly. Added initial mainnet fork with buidler. 2020-11-16 16:08:07 +01:00
modules/tenderly Initial implementation of Tenderly plugin 2020-11-12 14:12:26 +01:00
specs Fixed certora harness 2020-11-05 14:43:39 +01:00
tasks Added initial README. Digging into Tenderly. Added initial mainnet fork with buidler. 2020-11-16 16:08:07 +01:00
test Rename AaveProtocolTestHelpers to AaveProtocolDataProvider. Add task to deploy AaveProtocolDataProvider. 2020-11-10 15:19:47 +01:00
.editorconfig - Added mocha __setup script with snapshotting 2020-06-08 14:03:40 +02:00
.gitignore Updated gitignore 2020-10-28 10:54:20 +01:00
.gitlab-ci.yml fix ci -5 2020-08-21 15:19:07 +03:00
.prettierignore pretty print 2020-07-13 11:54:08 +03:00
.prettierrc Merged master 2020-09-04 10:27:32 +02:00
.solcover.js Fixed coverage random failing tests. Added coverage network and minimal config. 2020-09-09 21:24:20 +02:00
buidler.config.ts Remove buidler gas estimation to fix conflict with hardhat estimation plugin 2020-11-09 09:51:44 +01:00
coverage.json Rename AaveProtocolTestHelpers to AaveProtocolDataProvider. Add task to deploy AaveProtocolDataProvider. 2020-11-10 15:19:47 +01:00
deployed-contracts.json Added initial README. Digging into Tenderly. Added initial mainnet fork with buidler. 2020-11-16 16:08:07 +01:00
docker-compose.test.yml Fix conflicts 2020-08-21 17:19:25 +02:00
docker-compose.yml Initial implementation of Tenderly plugin 2020-11-12 14:12:26 +01:00
Dockerfile Added migration scripts for Uniswap and Aave with configuration and common tasks 2020-08-31 12:10:40 +02:00
Dockerfile_test add test step to CI 2020-08-21 15:11:01 +03:00
hardhat.config.ts Added initial README. Digging into Tenderly. Added initial mainnet fork with buidler. 2020-11-16 16:08:07 +01:00
LICENSE.md pretty print 2020-07-13 11:54:08 +03:00
package-lock.json Added latest update from Tenderly 2020-11-16 10:19:14 +01:00
package.json Added initial README. Digging into Tenderly. Added initial mainnet fork with buidler. 2020-11-16 16:08:07 +01:00
README.md Added initial README. Digging into Tenderly. Added initial mainnet fork with buidler. 2020-11-16 16:08:07 +01:00
runStableTokenCLI.sh Updates in the specification of StableDebtToken 2020-10-29 23:19:11 +02:00
runUserConfigCLI.sh Aave integration - first step 2020-10-15 00:59:12 +03:00
runVariableTokenCLI.sh Updated spec harness and run.sh for VariableDebtToken contract 2020-10-29 01:20:38 +02:00
test-wallets.js Initial fix 2020-08-19 16:10:08 +02:00
test.log Rolled back PVE002, added further optimization 2020-10-22 18:59:15 +02:00
tsconfig.json Initial implementation of Tenderly plugin 2020-11-12 14:12:26 +01:00
tslint.json pretty print 2020-07-13 11:54:08 +03:00

Aave Protocol v2

This repository contains the smart contracts source code and markets configuration for Aave Protocol V2. The repository uses Docker Compose and Hardhat as development enviroment for compilation, testing and deployment tasks.

What is Aave?

Aave is a decentralized non-custodial liqudity markets protocol where users can participate as depositors or borrowers. Depositors provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralized (perpetually) or undercollateralized (one-block liquidity) fashion.

Documentation

The documentation of Aave V2 is in the following Aave V2 documentation link. At the documentation you can learn more about the protocol, see the contract interfaces, integration guides and audits.

For getting the latest contracts addresses, please check the Deployed contracts page at the documentation to stay up to date.

Connect with the community

You can join at the Discord channel or at the Governance Forum for asking questions about the protocol or talk about Aave with other peers.

Setup

The repository uses Docker Compose to manage sensitive keys and load the configuration. Prior any action like test or deploy, you must run docker-compose up to start the contracts-env container, and then connect to the container console via docker-compose exec contracts-env bash.

Follow the next steps to setup the repository:

  • Install docker and docker-compose
  • Create an enviroment file named .env and fill the next enviroment variables
# Mnemonic, only first address will be used
MNEMONIC=""

# Add Alchemy or Infura provider keys, alchemy takes preference at the config level
ALCHEMY_KEY=""
INFURA_KEY=""


# Optional Etherscan key, for automatize the verification of the contracts at Etherscan
ETHERSCAN_KEY=""

# Optional, if you plan to use Tenderly scripts
TENDERLY_PROJECT=""
TENDERLY_USERNAME=""

Markets configuration

The configurations related with the Aave Markets are located at config directory. You can follow the IAaveConfiguration interface to create new Markets configuration or extend the current configuration.

Each market should have his own Market configuration file, and their own set of deployment tasks, using the Aave market config and tasks as a reference.

Test

You can run the full test suite with the following commands:

# In one terminal
docker-compose up

# Open another tab or terminal
docker-compose exec contracts-env bash

# A new Bash terminal is prompted, connected to the container
npm run test

Deployments

For deploying Aave Protocol V2, you can use the available scripts located at package.json. For a complete list, run npm run to see all the tasks.

Kovan deployment

# In one terminal
docker-compose up

# Open another tab or terminal
docker-compose exec contracts-env bash

# A new Bash terminal is prompted, connected to the container
npm run aave:kovan:full:migration

Mainnet fork deployment

# In one terminal, run a hardhat note with mainnet fork enabled
MAINNET_FORK=true npx hardhat node

# In another terminal, run docker-compose
docker-compose up

# Open another tab or terminal
docker-compose exec contracts-env bash

# A new Bash terminal is prompted, connected to the container
npm run aave:fork:main