This repository contains various proposals targeting the Aave governance. In addition to the actual proposals this repository also contains tooling to standardize certain protocol tasks. The tooling documentation is co-located with the relevant smart contracts.
The AaveV3ConfigEngine (Docs) is a helper smart contract to abstract good practices when doing "admin" interactions with the Aave v3 protocol, but built on top, without touching the core contracts.
A less comprehensive version of the engine also exists for protocol v2.
This project uses Foundry. See the book for detailed instructions on how to install and use Foundry.
The template ships with sensible default so you can use default foundry
commands without resorting to MakeFile
.
cp .env.example .env
forge install
npm i
This repository includes a generator to help you bootstrap the required files for an AIP
.
To generate a proposal you need to run: npm run generate
To get a full list of available commands run npm run generate -- --help
npm run generate -- --help
$ tsx generator/cli --help
Usage: proposal-generator [options]
CLI to generate aave proposals
Options:
-V, --version output the version number
-f, --force force creation (might overwrite existing files)
-p, --pools <pools...> (choices: "AaveV2Ethereum", "AaveV2EthereumAMM", "AaveV2Polygon", "AaveV2Avalanche",
"AaveV3Ethereum", "AaveV3Polygon", "AaveV3Avalanche", "AaveV3Optimism",
"AaveV3Arbitrum", "AaveV3Metis", "AaveV3Base")
-t, --title <string> aip title
-a, --author <string> author
-d, --discussion <string> forum link
-s, --snapshot <string> snapshot link
-c, --configFile <string> path to config file
-h, --help display help for command
If you have any feedback regarding the generator (bugs, improvements, features), don't hesitate to create an issue. We'd <3
to see contributions.
# You can use vanilla forge to customize your test
# https://book.getfoundry.sh/reference/forge/forge-test
forge test
# We also provide a script with sensible defaults to just test a single contract matching a filter
make test-contract filter=ENS
The makefile contains some generic templates for proposal deployments.
To deploy a contract you can run make deploy-ledger contract=pathToContract:Contract chain=chainAlias
.
The generator will inline exact instructions on the generated scripts.
To create a proposal you have to do three things:
- deploy the payload & register it on the payloadsController
- create an aip
- create the mainnet proposal
While the first two steps can be performed in parallel, the final proposal creation relies on (1) and (2). Every step can in theory be performed by a different entity.
The address creating the mainnet proposal(3) requires 80k AAVE of proposition power.
The payload is always deployed on the chain it affects. Therefore you need to adjust the relevant script accordingly. The generated scripts include exact instrauctions on what to execute.
The aip can be co-located with the proposal code as a markdown file.
This repository will manage the upload to ipfs automatically once a pr is merged to main
.
The proposal requires at least one payload
and the encodedHash
.
🎉
If for whatever reason verification fails, there's a good chance the error is on the foundry side, not in our tooling. To retry a specific verification you can follow the following steps:
- copy verify.example.json to verify.json
- enter an
ETHERSCAN_API_KEY
in your.env
- replace the
chain
with the appropriate chainId - replace the
hash
with the transaction hash of the deployment transaction (make sure it's the deployment transaction, not the one registering the payload on the payloadscontroller) - run
FOUNDRY_PROFILE=<chainAlias> forge build --force
- run
FOUNDRY_PROFILE=<chainAlias> npx catapulta-verify -b verify.json