Skip to Content
docs

Aave V3 Periphery on Aptos

Aave V3 on Aptos is deprecated. Supplying and borrowing are disabled, but users can still repay debt and withdraw supplied assets. See the governance proposal.

Reference for the non-incentives modules in sources/aave-periphery of the aave-pool package: the fee collector, coin migration and the UI pool data provider.

Collector

The collector module manages the collection and distribution of protocol fees.

Key Functions

deposit

Move
public fun deposit(sender: &signer, fa: FungibleAsset)

Deposits fungible assets into the collector.

Input Parameters:

NameTypeDescription
sender&signerThe signer of the transaction
faFungibleAssetThe fungible asset to deposit

withdraw

Move
public fun withdraw(
    sender: &signer,
    asset_metadata: Object<Metadata>,
    receiver: address,
    amount: u64
)

Withdraws assets from the collector to a specified receiver.

Input Parameters:

NameTypeDescription
sender&signerThe signer of the transaction
asset_metadataObject<Metadata>The metadata object of the asset
receiveraddressThe address receiving the assets
amountu64The amount to withdraw

View Methods

get_collected_fees

Move
#[view]
public fun get_collected_fees(asset_metadata: Object<Metadata>): u64

Returns the amount of fees collected for a specific asset.

Input Parameters:

NameTypeDescription
asset_metadataObject<Metadata>The metadata object of the asset

Return Values:

TypeDescription
u64The fees collected for the asset

CoinMigrator

The coin_migrator module provides functionality to convert between Coin and FungibleAsset representations.

View Methods

get_fa_address

Move
public fun get_fa_address<CoinType>(): address

Returns the address of the fungible asset associated with a specific coin type.

Return Values:

TypeDescription
addressThe address of the fungible asset

get_fa_balance

Move
#[view]
public fun get_fa_balance<CoinType>(owner: address): u64

Returns the fungible asset balance for a specific coin type and owner.

Input Parameters:

NameTypeDescription
owneraddressThe address of the owner

Return Values:

TypeDescription
u64The fungible asset balance of the owner

UI Pool Data Provider

The ui_pool_data_provider_v3 module provides view functions to query pool data for UI display.

View Methods

get_reserves_list

Move
#[view]
public fun get_reserves_list(): vector<address>

Returns the list of all reserves in the protocol.

Return Values:

TypeDescription
vector<address>The addresses of all reserves

get_reserves_data

Move
#[view]
public fun get_reserves_data(): (vector<AggregatedReserveData>, BaseCurrencyInfo)

Returns detailed data about all reserves in the protocol, including configuration, rates, and other parameters.

Return Values:

TypeDescription
vector<AggregatedReserveData>The data of every reserve
BaseCurrencyInfoThe base currency information

get_user_reserves_data

Move
#[view]
public fun get_user_reserves_data(user: address): (vector<UserReserveData>, u8)

Returns data about a user’s positions in the protocol, including balances and configuration.