Deployments
This section explains how to deploy the Aave Core V3 protocol contracts using the scripts and utilities provided in the repository. The deployment process is modular and designed to facilitate deployments on local development networks, testnets, and the mainnet.
5.1 Deployment Procedures and Scripts
The deployment scripts are located in the deployments/contracts/procedures directory. These scripts automate the deployment of different protocol components in the correct sequence. The main steps typically include:
-
Deploying Dependency Contracts:
Deploy third-party libraries and proxy contracts (from OpenZeppelin, for instance) that the protocol relies on. -
Deploying Core Protocol Contracts:
This includes the pool contracts, tokenization modules (aTokens, debt tokens), reward contracts, and configuration modules. Each component is deployed with the correct parameters to ensure the protocol works as expected. -
Initializing the Protocol:
After deployment, the scripts initialize the reserves and set up protocol parameters. This involves configuring access control, reserve settings (e.g., collateral factors, interest rate strategies), and integrating upgradeability proxies where applicable. -
Post-Deployment Configuration:
Some deployment scripts also include procedures to verify the deployment, emit relevant events, and prepare the contracts for interaction (e.g., setting up interfaces for oracles or incentive controllers).
Typically, you will run a deployment script via a command-line tool such as Hardhat. For example, to deploy locally, you might run:
bash ``npx hardhat run deployments/contracts/procedures/AaveV3SetupProcedure.sol --network localhost`
Adjust the command and network parameter as needed for testnet or mainnet deployments.
5.2 Utilities and Report Storage
Within the deployments/contracts/utilities directory, you’ll find several helper scripts that assist with deployment tasks:
-
Create2Utils.sol:
Provides utilities for deploying contracts using the CREATE2 opcode, enabling deterministic contract addresses. -
DeployUtils.sol:
Contains common functions for deploying and initializing contracts. -
MarketReportUtils.sol & MetadataReporter.sol:
These tools generate reports and metadata regarding the deployed contracts and the overall market configuration. They help document the state of the protocol immediately after deployment.
Additionally, the repository includes storage contracts such as LibraryReportStorage.sol and MarketReportStorage.sol that archive key deployment parameters and outcomes.
5.3 Input Files and Project-Specific Deployments
The deployments/inputs directory holds files with default parameters and market configurations. These input files define initial values for reserve parameters, asset configurations, and protocol settings.
Moreover, the deployments/projects directory organizes deployments that are tailored for specific strategies:
-
aave-v3-batched:
Contains scripts that deploy contracts in batches, making it easier to manage large-scale deployments. -
aave-v3-libraries:
Focuses on deploying and updating protocol libraries separately, which is useful for protocols that are planning upgrades or require modular library management.
By organizing deployments in this way, the repository provides flexibility for various network configurations and deployment strategies. Detailed instructions and examples are available within the deployment scripts and associated documentation comments, ensuring that each step of the deployment process is clear and repeatable.

