BaseStrategy
harvestTrigger
harvestTrigger
Provides a signal to the keeper that harvest() should be called. The keeper will provide the estimated gas cost that they would pay to call harvest() and this function should use that estimate to make a determination if calling it is "worth it" for the keeper.
Parameters:
callCost
uint256
Amount of cost for calling harvest()
Return value:
bool
True if harvest() should be called, false if otherwise
harvest
harvest
Harvests the Strategy, recognizing any profits or losses and adjusting the Strategy's position.
Events emitted:
Harvested(profit, loss, debtPayment, debtOutstanding)
withdraw
withdraw
Withdraws _amountNeeded to vault
Parameters:
_amountNeeded
uint256
Amount of tokens to withdraw
Return value:
_loss
uint256
Any losses created while liquidating tokens
prepareMigration
prepareMigration
Do anything necessary to prepare this Strategy for migration, such as transferring any reserve or LP tokens, CDPs, or other tokens or stores of value.
Parameters:
_newStrategy
address
New strategy’s vault address
migrate
migrate
Transfers all want tokens from this strategy to a new strategy. Can only be called by the governance or the vault.
Parameters:
_newStrategy
address
New strategy’s vault address
sweep
sweep
Removes tokens from this Strategy that are not the type of tokens managed by this Strategy.
Parameters:
_token
address
Address of token to transfer out of this strategy’s vault
Events emitted:
IERC20Upgradeable(_token).safeTransfer(governance()
,IERC20Upgradeable(_token).balanceOf(address(this)))
Last updated