AaveV3Lender
POOL
The AAVE pool retrieved from the pool provider.
ADDRESS_PROVIDER
The AAVE pool address provider.
constructor
contract's constructor
Parameters
addressesProvider
address
address of AAVE's address provider
_approveLender
allows this contract to approve the POOL to transfer some underlying asset on its behalf
this is a necessary step prior to supplying tokens to the POOL or to repay a debt
Parameters
token
contract IERC20
the underlying asset for which approval is required
amount
uint256
the approval amount
_exitMarket
prevents the POOL from using some underlying as collateral
this call will revert if removing the asset from collateral would put the account into a liquidation state
Parameters
underlying
contract IERC20
the token one wishes to remove collateral
_enterMarkets
allows the POOL to use some underlying tokens as collateral
when supplying a token for the first time, it is automatically set as possible collateral so there is no need to call this function for it.
Parameters
underlyings
contract IERC20[]
the token one wishes to add as collateral
overlying
convenience function to obtain the overlying of a given asset
Parameters
asset
contract IERC20
the underlying asset
Return Values
aToken
contract IERC20
the overlying asset
_redeem
redeems funds from the pool
Parameters
token
contract IERC20
the asset one is trying to redeem
amount
uint256
of assets one wishes to redeem
to
address
is the address where the redeemed assets should be transferred
Return Values
redeemed
uint256
the amount of asset that were transferred to to
_supply
supplies funds to the pool
Parameters
token
contract IERC20
the asset one is supplying
amount
uint256
of assets to be transferred to the pool
onBehalf
address
address of the account whose collateral is being supplied to and which will receive the overlying
noRevert
bool
does not revert if supplies throws
Return Values
[0]
bytes32
reason for revert from Aave.
_claimRewards
rewards claiming.
Parameters
assets
address[]
list of overlying for which one is claiming awards
to
address
whom the rewards should be sent
Return Values
rewardsList
address[]
the address of assets that have been claimed
claimedAmounts
uint256[]
the amount of assets that have been claimed
checkAsset
verifies whether an asset can be supplied on pool
Parameters
asset
contract IERC20
the asset one wants to lend
Return Values
[0]
bool
true if the asset can be supplied on pool