Skip to main content

Tutorial: Aave v2

For the purpose of this tutorial, delete the folder src/adapters/aave-v2.

Go to DefiLlama, search for "AAVE V2" and copy the id from the URL, in this case aave-v2.

To create the adapter, run this command with your DefiLlama ID:

pnpm run create-adapter aave-v2

This automatically exports your adapter defintions for different chains:

  • src/adapters/aave-v2/avax/index.ts
  • src/adapters/aave-v2/ethereum/index.ts
  • src/adapters/aave-v2/polygon/index.ts
  • src/adapters/aave-v2/index.ts

In the following sections we will only focus on Ethereum but the logic can be shared across the other chains.