Skip to main content

AaveV3StrategyFactory

Git Source

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

NameTypeDescription
_namestringStrategy share token name
_symbolstringStrategy share token symbol (e.g., "osAAVE")
_managementaddressManagement address (can update params)
_keeperaddressKeeper address (calls report)
_emergencyAdminaddressEmergency admin address
_donationAddressaddressDragon router address (receives profit shares)
_enableBurningboolTrue to enable burning shares during loss protection
_tokenizedStrategyAddressaddressTokenizedStrategy implementation address

Returns

NameTypeDescription
<none>addressstrategyAddress 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

NameTypeDescription
_vaultaddressVault address (e.g., Yearn vault, or factory constant for hardcoded vaults)
_assetaddressUnderlying asset address (or factory constant for hardcoded assets)
_namestringStrategy share token name
_symbolstringStrategy share token symbol
_managementaddressManagement address
_keeperaddressKeeper address
_emergencyAdminaddressEmergency admin address
_donationAddressaddressDonation address
_enableBurningboolEnable burning flag
_tokenizedStrategyAddressaddressTokenizedStrategy implementation
_deployeraddressAddress that will deploy the strategy

Returns

NameTypeDescription
<none>addressPredicted strategy address

Events

StrategyDeploy

Emitted on successful strategy deployment

event StrategyDeploy(
address indexed deployer,
address indexed donationAddress,
address indexed strategyAddress,
string vaultTokenName
);

Parameters

NameTypeDescription
deployeraddressTransaction sender performing deployment
donationAddressaddressDonation destination address for strategy
strategyAddressaddressDeployed strategy address
vaultTokenNamestringVault token name associated with strategy