AaveV3StrategyFactory
Inherits: BaseStrategyFactory
Title: AaveV3StrategyFactory
Author: Golem Foundation
Factory for deploying Aave V3 yield donating strategies
Uses CREATE2 for deterministic deployments; records deployments via BaseStrategyFactory AAVE V3 INTEGRATION: This factory deploys strategies that deposit into Aave V3 lending pools to earn yield through interest accrual on supplied assets.
Note: security-contact: [email protected]
Constants
AAVE_ADDRESSES_PROVIDER
Aave V3 AddressesProvider on Ethereum mainnet
address public constant AAVE_ADDRESSES_PROVIDER = 0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e
AAVE_REWARDS_CONTROLLER
Aave V3 RewardsController on Ethereum mainnet.
Wired into every deployed strategy so liquidity-mining emissions can be claimed on demand. The controller is a stable, canonical Aave contract; we hardcode it here rather than making it a per-deploy parameter to keep the factory surface small and to prevent operator misconfiguration.
address public constant AAVE_REWARDS_CONTROLLER = 0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb
USDC
USDC token address on Ethereum mainnet
address public constant USDC = USDC_MAINNET
Functions
createStrategy
Deploy a new AaveV3 strategy
Deterministic salt derived from all parameters to avoid duplicates
function createStrategy(
string memory _name,
string memory _symbol,
address _management,
address _keeper,
address _emergencyAdmin,
address _donationAddress,
bool _enableBurning,
address _tokenizedStrategyAddress
) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
_name | string | Strategy share token name |
_symbol | string | Strategy share token symbol (e.g., "osAAVE") |
_management | address | Management address (can update params) |
_keeper | address | Keeper address (calls report) |
_emergencyAdmin | address | Emergency admin address |
_donationAddress | address | Dragon router address (receives profit shares) |
_enableBurning | bool | True to enable burning shares during loss protection |
_tokenizedStrategyAddress | address | TokenizedStrategy implementation address |
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | strategyAddress Deployed AaveV3Strategy address |
computeStrategyAddress
Compute the deterministic address where a strategy will be deployed
Must be implemented by child factories using their own bytecode
function computeStrategyAddress(
address _vault,
address _asset,
string memory _name,
string memory _symbol,
address _management,
address _keeper,
address _emergencyAdmin,
address _donationAddress,
bool _enableBurning,
address _tokenizedStrategyAddress,
address _deployer
) public view override returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
_vault | address | Vault address (e.g., Yearn vault, or factory constant for hardcoded vaults) |
_asset | address | Underlying asset address (or factory constant for hardcoded assets) |
_name | string | Strategy share token name |
_symbol | string | Strategy share token symbol |
_management | address | Management address |
_keeper | address | Keeper address |
_emergencyAdmin | address | Emergency admin address |
_donationAddress | address | Donation address |
_enableBurning | bool | Enable burning flag |
_tokenizedStrategyAddress | address | TokenizedStrategy implementation |
_deployer | address | Address that will deploy the strategy |
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | Predicted strategy address |
Events
StrategyDeploy
Emitted on successful strategy deployment
event StrategyDeploy(
address indexed deployer,
address indexed donationAddress,
address indexed strategyAddress,
string vaultTokenName
);
Parameters
| Name | Type | Description |
|---|---|---|
deployer | address | Transaction sender performing deployment |
donationAddress | address | Donation destination address for strategy |
strategyAddress | address | Deployed strategy address |
vaultTokenName | string | Vault token name associated with strategy |