Skip to content

AaveV3Strategy

Source: src/strategies/AaveV3Strategy.sol

This strategy wraps the Aave V3 lending pool to generate yield on idle assets.

Public And External Functions

Function Access Description
receiver() public view Returns vault address receiving divested assets.
asset() public view Returns underlying asset.
totalAssets() public view Calculates Aave aToken scaled balance multiplied by liquidity index.
invest(uint256 amount) Keeper Approves Aave pool and supplies asset.
divest(uint256 amount) Keeper Withdraws requested asset amount from Aave to receiver.
exit(bool ignore) Keeper Withdraws all from Aave; catches failure only when ignore = true.
harvest(IERC20 asset_) Keeper Sweeps non-aToken rewards or dust to receiver.
replenish(uint256 amount) Keeper Withdraws requested amount from Aave to receiver for liquidity waterfall.
claimRewards() Keeper Claims all Aave rewards to the strategy contract. Rewards can then be harvested.

Internal Functions

Function Description
_isActiveAssets(DataTypes.ReserveConfigurationMap) Verifies Aave reserve active bit before deployment.