An open API service indexing awesome lists of open source software.

https://github.com/aave/aptos-aave-v3

Aave's V3 Protocol on Aptos
https://github.com/aave/aptos-aave-v3

Last synced: 5 months ago
JSON representation

Aave's V3 Protocol on Aptos

Awesome Lists containing this project

README

          



Logo

Aave's V3 Protocol on Aptos



This is the official Aptos version of the Aave V3 Protocol.




CI


Coverage


License



๐Ÿ“š Documentation
ย 
๐Ÿ› Report Bug
ย 
โœจ Request Feature


---

```bash=
โ”œโ”€โ”€ aave-acl // Access control list Package
โ”œโ”€โ”€ aave-config // Configurator Package
โ”œโ”€โ”€ aave-data // Data & Deployment Configurations
โ”œโ”€โ”€ aave-large-packages // Large Packages Package
โ”œโ”€โ”€ aave-math // Math library Package
โ”œโ”€โ”€ aave-mock-underlyings // Mock Underlyings Package
โ”œโ”€โ”€ aave-oracle // Oracle Package
โ”œโ”€โ”€ aave-core // Core Package
```

---

## ๐Ÿ“Š Inter-package Dependency Graph

```mermaid
flowchart TD

%% Level 1
aave-config
chainlink-data-feeds
aave-large-packages
aave-mock-underlyings

%% Level 2
aave-acl --> aave-config
aave-math --> aave-config

%% Level 3
aave-oracle --> aave-config
aave-oracle --> aave-acl
aave-oracle --> chainlink-data-feeds

%% Level 4
aave-pool --> aave-acl
aave-pool --> aave-config
aave-pool --> aave-math
aave-pool --> aave-oracle

%% Level 5
aave-data --> aave-acl
aave-data --> aave-config
aave-data --> aave-oracle
aave-data --> aave-data
aave-data --> aave-pool
```

---

## ๐Ÿš€ Getting Started

### 1. ๐Ÿงฉ Clone the Repository

```bash
git clone https://github.com/aave/aptos-aave-v3.git && cd aptos-aave-v3
```

---

### 2. ๐Ÿ› ๏ธ Prerequisites

Make sure the following tools are installed:

- [Aptos CLI](https://aptos.dev/tools/aptos-cli/)
- [yq](https://github.com/mikefarah/yq)
- [Node.js + pnpm](https://pnpm.io/installation)
- [codespell](https://pypi.org/project/codespell/)
- [pre-commit](https://pre-commit.com/#install)
- [Python 3](https://www.python.org/downloads/)
- [GNU Make](https://www.gnu.org/software/make/)

---

## ๐Ÿงช Running a Local Testnet

### ๐Ÿงฐ Option 1: Using Makefile

Start by copying `.env.template` to `.env` and editing any relevant values.

#### โœ… Start the testnet

```bash
make local-testnet
```

#### โœ… With indexer (e.g. for Petra Wallet support)

```bash
make local-testnet-with-indexer
```

#### ๐Ÿ”ง Configure workspace

```bash
make set-workspace-config \
&& make init-workspace-config \
&& make init-profiles \
&& make init-test-profiles \
&& make fund-profiles \
&& make fund-test-profiles
```

This will initialize, configure, and fund local accounts with APT.

#### ๐Ÿ› ๏ธ Compile & Deploy

```bash
make compile-all
make publish-all
```

#### ๐ŸŒ View your local testnet

[https://explorer.aptoslabs.com/?network=local](https://explorer.aptoslabs.com/?network=local)

---

### ๐Ÿณ Option 2: Using `aave-test-kit` (Docker)

[`aave-test-kit`](aave-test-kit/README.md) is a local simulation environment for Aave on Aptos, inspired by Tenderly.

โžก๏ธ See the linked README for Docker-based setup and usage.

---

## ๐Ÿงช Testing

### โœ… Run Unit Tests (Move)

These do **not require a local testnet**.

```bash
make test-all
```

---

### ๐Ÿ”ฌ Run TypeScript Integration Tests

These must be run **after successful contract deployment**:

```bash
make ts-test
```

---

## ๐Ÿ“ Generate Aptos Move Docs

Generate full module documentation across all packages:

```bash
make doc-all
```

Docs will be generated under each package's `doc/` directory.

---

## ๐Ÿงฐ TypeScript SDK

A TypeScript SDK is available for interacting with the Aave V3 Protocol on Aptos directly from your applications.

### ๐Ÿ“ฆ Install via npm

```bash
pnpm add @aave/aave-v3-aptos-ts-sdk
# or
npm install @aave/aave-v3-aptos-ts-sdk
```

### ๐Ÿ“˜ Explore the SDK

๐Ÿ‘‰ **[View on npm](https://www.npmjs.com/package/@aave/aave-v3-aptos-ts-sdk)**
Browse available functions, types, and usage examples.

๐Ÿ“– For full usage details, please refer to the [README documentation](https://www.npmjs.com/package/@aave/aave-v3-aptos-ts-sdk#readme) on the npm package page.

---

## ๐Ÿ” Security Audits

All audit reports related to Aave's Move implementation on Aptos are stored in the `/audits` directory at the root of this repository.

### ๐Ÿ“ Audit Directory Structure

```bash
/audits
โ”œโ”€โ”€ Certora Aave Aptos Core V3.0.2 Report.pdf
โ”œโ”€โ”€ Certora Aave Aptos Core V3.1-V3.3 Report.pdf
โ”œโ”€โ”€ Certora Aave Aptos Periphery V3.0.2 Report.pdf
โ”œโ”€โ”€ Ottersec Aave Aptos V3.1-V3.3 Report.pdf
โ”œโ”€โ”€ Spearbit Aave Aptos Core V3.0.2 Report.pdf
โ”œโ”€โ”€ Spearbit Aave Aptos Core V3.1-V3.3 Report.pdf
โ””โ”€โ”€ Spearbit Aave Aptos Periphery V3.0.2 Report.pdf
```

๐Ÿ“‚ [Browse Audit Reports](/audits)

---

## ๐Ÿ“š Aave Move Smart Contract Docs

Official documentation for Aave's Move-based smart contracts is now available via GitHub Pages.

The docs are auto-generated from each package and published using [MkDocs Material](https://squidfunk.github.io/mkdocs-material/), with clean navigation and search.

### ๐Ÿ“ฅ Explore the Docs

๐Ÿ‘‰ **[View Smart Contract Documentation](https://aave.github.io/aptos-aave-v3)**
Browse all modules, structs, functions, and events used across Aave's V3 Aptos packages.

---

## ๐Ÿ“œ Running Examples

In addition to Move unit tests and integration tests, this repository contains **example scripts** (such as flashloans) that demonstrate how to interact with the deployed protocol on Aptos. They are all located under the `./examples` packages at root level.

### ๐Ÿ› ๏ธ Compile Example Scripts

Example are compiled separately via calling the main commands listed under `./examples/Makefile`:

```bash
# For testnet
make compile-scripts-testnet

# For mainnet
make compile-scripts-mainnet
```

### ๐Ÿš€ Execute Example Scripts

Once compiled, scripts can be executed against the target network compiled above. For example:

```bash
# Simple flashloan example
make execute-flashloan-simple

# Complex flashloan example
make execute-flashloan-complex
```

Each script corresponds to a .mv compiled Move script under `./examples/build/AaveScripts/bytecode_scripts/`. They are executed via aptos move run-script, with arguments such as asset addresses and flashloan amounts passed in from the Makefile.

๐Ÿ” These scripts are primarily intended as examples and tests of protocol functionality, such as taking and repaying flashloans.

---