Skip to main content

SkyCompounderStrategyFactory

Git Source

Inherits: BaseStrategyFactory

Title: SkyCompounderStrategyFactory

Author: Golem Foundation

Factory for deploying Sky Compounder yield donating strategies

Inherits deterministic deployment from BaseStrategyFactory

Note: security-contact: [email protected]

State Variables

USDS_REWARD_ADDRESS

USDS staking/reward contract address on mainnet

address public constant USDS_REWARD_ADDRESS = 0x0650CAF159C5A49f711e8169D4336ECB9b950275

USDS

USDS token address on mainnet (staking token)

address public constant USDS = 0xdC035D45d973E3EC169d2276DDab16f1e407384F

Functions

createStrategy

Deploys a new SkyCompounder strategy for the Yield Donating Vault

Uses deterministic deployment based on strategy parameters to prevent duplicates

function createStrategy(
string memory _name,
string memory _symbol,
address _management,
address _keeper,
address _emergencyAdmin,
address _donationAddress,
bool _enableBurning,
address _tokenizedStrategyAddress
) external returns (address strategyAddress);

Parameters

NameTypeDescription
_namestringStrategy share token name
_symbolstringStrategy share token symbol
_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
strategyAddressaddressDeployed SkyCompounderStrategy 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 when a new SkyCompounderStrategy is deployed

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

Parameters

NameTypeDescription
deployeraddressAddress that deployed the strategy
donationAddressaddressDragon router address that receives profit shares
strategyAddressaddressDeployed strategy address
vaultTokenNamestringStrategy share token name