StratFeeManager Contract
Last Update: February 2023
The StratFeeManager Contract is collection of important dependencies which are imported and used in every Beefy Strategy Contract.
Originally, these dependencies were split into two contracts - StratManager.sol and FeeManager.sol. After the move to Solidity V0.8, the two were combined into a single contract - StratFeeManager.sol. The current verison - StratFeeManagerInitializable.sol - facilitated a move to proxy clone strategies (which must be initialized with the relevant arguments for the strategy and its dependencies), to avoid the need to deploy every single strategy individually.
Dependencies
The StratFeeManager contracts also introduce addition dependencies themselves, specifically Ownable.sol - which introduces functionality to set a contract's owner and restrict functionality to them alone - and Pausable.sol - which introduces functionality to freeze functionality in a contract by putting the contract on pause. Both dependencies are ultimately included in every Beefy Strategy Contract.
Modifiers
Introduces an onlyManager() modifier to constrain functions to use by the strategy manager only.
View Functions
getFees()
Returns the value of all fees from the fee configuration contract.
getAllFees()
Returns the value of all fees from the fee configuration contract, as well the dynamic deposit and withdrawal fees.
getStratFeeId()
Returns the integer value of the strategy fee ID from the fee configuration contract.
Write Functions
setStratFeeId()
Sets a new integer value for the strategy's fee ID, which indicates the relevant fee for the strategy.
setWithdrawalFee()
Sets a new integer value for the contract's withdrawal fee which is charged on each harvest.
setVault()
Sets a new address for the contract's vault, which manages user funds.
setUnirouter()
Sets a new address for the contract's router which processes swaps within the contract.
setKeeper()
Sets a new address for the contract's keeper, who can "panic" the strategy.
setStrategist()
Sets a new address for the contract's strategist who receives the strategist fee.
setBeefyFeeRecipient()
Sets a new address for the recipient of Beefy's fee on harvests, typically a Beefy treasury contract.
setBeefyFeeConfig()
Sets a new address for the fee configuration contract used by the strategy to fetch fees.
Last updated