AaveV3Adapter

The implementation of Aave.Finance MoneyMarket that integrates with AssetManager.

assetManager

address assetManager

the AssetManager contract address

market

contract AMarket3 market

Aave Market contract

lendingPool

contract LendingPool3 lendingPool

Aave Lending pool contract

tokenToAToken

mapping(address => address) tokenToAToken

Mapping of token to aToken

floorMap

mapping(address => uint256) floorMap

Mapping of token to floor amount

ceilingMap

Mapping of token to ceiling amount

LogSetAssetManager

LogSetFloor

LogSetCeiling

__AaveV3Adapter_init

TokenNotSupported

SenderNotAssetManager

checkTokenSupported

Check supplied token address is supported

onlyAssetManager

Check sender is the asset manager

setAssetManager

Set the asset manager contract address Only callable by the admin

Parameters

Name
Type
Description

_assetManager

address

AssetManager contract address

setFloor

Set floor amount Only callable by the admin

Parameters

Name
Type
Description

tokenAddress

address

Address of the token to set the floor for

floor

uint256

Floor amount

setCeiling

Set ceiling amount Only callable by the admin

Parameters

Name
Type
Description

tokenAddress

address

Address of the token to set the ceiling for

ceiling

uint256

ceiling amount

getRate

Get the underlying market rate

Parameters

Name
Type
Description

tokenAddress

address

The underlying token address

getSupply

Get total supply of this Contracts

Parameters

Name
Type
Description

tokenAddress

address

The token to check supply for

getSupplyView

Get total supply of this Contracts including any balance that has been deposited into the underlying market

Parameters

Name
Type
Description

tokenAddress

address

The token to check supply for

supportsToken

Check if this token is supported

Parameters

Name
Type
Description

tokenAddress

address

The token to check

mapTokenToAToken

Add aToken to the token mapping for a supported token

Parameters

Name
Type
Description

tokenAddress

address

Token address

deposit

Deposit tokens into the underlying Aave V3 lending pool

Parameters

Name
Type
Description

tokenAddress

address

Token address

withdraw

Withdraw tokens from this adapter Only callable by the AssetManager

Parameters

Name
Type
Description

tokenAddress

address

Token to withdraw

recipient

address

Recieved by

tokenAmount

uint256

Amount of tokens to withdraw

withdrawAll

Withdraw all tokens from this adapter Only callable by the AssetManager

Parameters

Name
Type
Description

tokenAddress

address

Token to withdraw

recipient

address

Recieved by

claimRewards

Claim rewards from the Aave rewards controller

Parameters

Name
Type
Description

tokenAddress

address

Token address

recipient

address

The recipient

_getSupply

_supportsToken

Last updated

Was this helpful?