YearnGaugeStrategy
Inherits: BaseStrategy, CurveRouterSwapper, YearnGaugeStrategyBase
Strategy for interacting with Yearn Gauge
State Variables
_harvestSwapParams
Parameters for Curve swap used during harvest
CurveSwapParams internal _harvestSwapParams;
_dYfiRedeemer
Address of the contract that will be redeeming dYFI for YFI for this strategy
address private _dYfiRedeemer;
Functions
constructor
Initializes the YearnGaugeStrategy
constructor(
address asset_,
address yearnStakingDelegate_,
address curveRouter_
)
payable
BaseStrategy(asset_, "Wrapped YearnV3 Strategy")
CurveRouterSwapper(curveRouter_)
YearnGaugeStrategyBase(asset_, yearnStakingDelegate_);
Parameters
Name | Type | Description |
---|---|---|
asset_ | address | The address of the asset (gauge token) |
yearnStakingDelegate_ | address | The address of the YearnStakingDelegate |
curveRouter_ | address | The address of the Curve router |
setHarvestSwapParams
Sets the parameters for the Curve swap used in the harvest function
function setHarvestSwapParams(CurveSwapParams calldata curveSwapParams) external onlyManagement;
Parameters
Name | Type | Description |
---|---|---|
curveSwapParams | CurveSwapParams | The parameters for the Curve swap |
setDYfiRedeemer
Sets the address of the contract that will be redeeming dYFI
function setDYfiRedeemer(address newDYfiRedeemer) external onlyManagement;
Parameters
Name | Type | Description |
---|---|---|
newDYfiRedeemer | address | The address of the new dYFI redeemer contract |
dYfiRedeemer
Get the address of the contract that will be redeeming dYFI from this strategy
function dYfiRedeemer() external view returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | The address of the dYFI redeemer contract |
availableDepositLimit
Calculates the available deposit limit for the strategy
function availableDepositLimit(address) public view override returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The strategy's available deposit limit |
_deployFunds
Deploys funds into the YearnStakingDelegate by depositing the asset.
function _deployFunds(uint256 _amount) internal override;
Parameters
Name | Type | Description |
---|---|---|
_amount | uint256 | The amount of the asset to deposit. |
_freeFunds
Withdraws funds from the YearnStakingDelegate by withdrawing the asset.
function _freeFunds(uint256 _amount) internal override;
Parameters
Name | Type | Description |
---|---|---|
_amount | uint256 | The amount of the asset to withdraw. |
_emergencyWithdraw
Performs an emergency withdrawal from the YearnStakingDelegate, withdrawing the asset to the strategy.
function _emergencyWithdraw(uint256 amount) internal override;
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | The amount to withdraw in case of an emergency. |
_harvestAndReport
Harvests dYfi rewards, swaps YFI for the vault asset, and re-deposits or adds to idle balance
function _harvestAndReport() internal override returns (uint256 _totalAssets);
Returns
Name | Type | Description |
---|---|---|
_totalAssets | uint256 | The total assets after harvest and redeposit/idle balance update |
Events
DYfiRedeemerSet
event DYfiRedeemerSet(address oldDYfiRedeemer, address newDYfiRedeemer);