Strategies
Strategies take an investment from the DegenBox and manage a yield generating operation. The DegenBox owner sets a strategy per token, the owner also determines how much of the token balance is going to be in the strategy (the strategy "target percentage") and how much remains in the DegenBox to enable withdrawals.
Because the funds should be able to be sent back to the DegenBox instantly, the harvest function, which can also rebalance to bring the invested amount to the defined target percentage, can be called by anyone.
Constructor
Constructor
nonpayable
nonpayable
Parameters
_strategyToken
address
_bentoBox
address
Functions
afterExitnonpayable
afterExitnonpayable
Parameters
to
address
value
uint256
data
bytes
Return values
success
bool
bentoBoxview
bentoBoxview
Parameters
No parameters for this function.
Return values
/
address
claimOwnershipnonpayable
claimOwnershipnonpayable
Parameters
No parameters for this function.
Return values
No return values for this function.
exitnonpayable
exitnonpayable
Parameters
balance
uint256
Return values
amountAdded
int256
exitedview
exitedview
Parameters
No parameters for this function.
Return values
/
bool
feeCollectorview
feeCollectorview
Parameters
No parameters for this function.
Return values
/
address
feePercentview
feePercentview
Parameters
No parameters for this function.
Return values
/
uint8
harvestnonpayable
harvestnonpayable
Parameters
balance
uint256
sender
address
Return values
/
int256
maxBentoBoxBalanceview
maxBentoBoxBalanceview
Parameters
No parameters for this function.
Return values
/
uint256
ownerview
ownerview
Parameters
No parameters for this function.
Return values
/
address
pendingOwnerview
pendingOwnerview
Parameters
No parameters for this function.
Return values
/
address
poolview
poolview
Parameters
No parameters for this function.
Return values
/
address
resetAllowancenonpayable
resetAllowancenonpayable
Parameters
No parameters for this function.
Return values
No return values for this function.
rewardTokenEnabledview
rewardTokenEnabledview
Parameters
/
address
Return values
/
bool
safeHarvestnonpayable
safeHarvestnonpayable
Parameters
maxBalance
uint256
rebalance
bool
maxChangeAmount
uint256
harvestRewards
bool
Return values
No return values for this function.
setFeeParametersnonpayable
setFeeParametersnonpayable
Parameters
_feeCollector
address
_feePercent
uint8
Return values
No return values for this function.
setRewardTokenEnablednonpayable
setRewardTokenEnablednonpayable
Parameters
token
address
enabled
bool
Return values
No return values for this function.
setStrategyExecutornonpayable
setStrategyExecutornonpayable
Parameters
executor
address
value
bool
Return values
No return values for this function.
setSwappernonpayable
setSwappernonpayable
Parameters
_swapper
address
Return values
No return values for this function.
skimnonpayable
skimnonpayable
Parameters
amount
uint256
Return values
No return values for this function.
strategyExecutorsview
strategyExecutorsview
Parameters
/
address
Return values
/
bool
strategyTokenview
strategyTokenview
Parameters
No parameters for this function.
Return values
/
address
swapRewardsnonpayable
swapRewardsnonpayable
Parameters
amountOutMin
uint256
rewardToken
address
data
bytes
Return values
amountOut
uint256
swapperview
swapperview
Parameters
No parameters for this function.
Return values
/
address
tagview
tagview
Parameters
No parameters for this function.
Return values
/
address
transferOwnershipnonpayable
transferOwnershipnonpayable
Parameters
newOwner
address
direct
bool
renounce
bool
Return values
No return values for this function.
withdrawnonpayable
withdrawnonpayable
Parameters
amount
uint256
Return values
actualAmount
uint256
Events (for EVM logging)
FeeChanged
FeeChanged
Parameters
previousFee
uint256
false
newFee
uint256
false
previousFeeCollector
address
false
newFeeCollector
address
false
LogSetStrategyExecutor
LogSetStrategyExecutor
Parameters
executor
address
true
allowed
bool
false
OwnershipTransferred
OwnershipTransferred
Parameters
previousOwner
address
true
newOwner
address
true
RewardSwapped
RewardSwapped
Parameters
token
address
false
total
uint256
false
amountOut
uint256
false
feeAmount
uint256
false
RewardTokenUpdated
RewardTokenUpdated
Parameters
token
address
false
enabled
bool
false
SwapperChanged
SwapperChanged
Parameters
oldSwapper
address
false
newSwapper
address
false
Last updated