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

nonpayable

Parameters

Name
Type

_strategyToken

address

_bentoBox

address

Functions


afterExitnonpayable

Parameters

Name
Type

to

address

value

uint256

data

bytes

Return values

Name
Type

success

bool

bentoBoxview

Parameters

No parameters for this function.

Return values

Name
Type

/

address

claimOwnershipnonpayable

Parameters

No parameters for this function.

Return values

No return values for this function.

exitnonpayable

Parameters

Name
Type

balance

uint256

Return values

Name
Type

amountAdded

int256

exitedview

Parameters

No parameters for this function.

Return values

Name
Type

/

bool

feeCollectorview

Parameters

No parameters for this function.

Return values

Name
Type

/

address

feePercentview

Parameters

No parameters for this function.

Return values

Name
Type

/

uint8

harvestnonpayable

Parameters

Name
Type

balance

uint256

sender

address

Return values

Name
Type

/

int256

maxBentoBoxBalanceview

Parameters

No parameters for this function.

Return values

Name
Type

/

uint256

ownerview

Parameters

No parameters for this function.

Return values

Name
Type

/

address

pendingOwnerview

Parameters

No parameters for this function.

Return values

Name
Type

/

address

poolview

Parameters

No parameters for this function.

Return values

Name
Type

/

address

resetAllowancenonpayable

Parameters

No parameters for this function.

Return values

No return values for this function.

rewardTokenEnabledview

Parameters

Name
Type

/

address

Return values

Name
Type

/

bool

safeHarvestnonpayable

Parameters

Name
Type

maxBalance

uint256

rebalance

bool

maxChangeAmount

uint256

harvestRewards

bool

Return values

No return values for this function.

setFeeParametersnonpayable

Parameters

Name
Type

_feeCollector

address

_feePercent

uint8

Return values

No return values for this function.

setRewardTokenEnablednonpayable

Parameters

Name
Type

token

address

enabled

bool

Return values

No return values for this function.

setStrategyExecutornonpayable

Parameters

Name
Type

executor

address

value

bool

Return values

No return values for this function.

setSwappernonpayable

Parameters

Name
Type

_swapper

address

Return values

No return values for this function.

skimnonpayable

Parameters

Name
Type

amount

uint256

Return values

No return values for this function.

strategyExecutorsview

Parameters

Name
Type

/

address

Return values

Name
Type

/

bool

strategyTokenview

Parameters

No parameters for this function.

Return values

Name
Type

/

address

swapRewardsnonpayable

Parameters

Name
Type

amountOutMin

uint256

rewardToken

address

data

bytes

Return values

Name
Type

amountOut

uint256

swapperview

Parameters

No parameters for this function.

Return values

Name
Type

/

address

tagview

Parameters

No parameters for this function.

Return values

Name
Type

/

address

transferOwnershipnonpayable

Parameters

Name
Type

newOwner

address

direct

bool

renounce

bool

Return values

No return values for this function.

withdrawnonpayable

Parameters

Name
Type

amount

uint256

Return values

Name
Type

actualAmount

uint256

Events (for EVM logging)


FeeChanged

Parameters

Name
Type
Indexed

previousFee

uint256

false

newFee

uint256

false

previousFeeCollector

address

false

newFeeCollector

address

false

LogSetStrategyExecutor

Parameters

Name
Type
Indexed

executor

address

true

allowed

bool

false

OwnershipTransferred

Parameters

Name
Type
Indexed

previousOwner

address

true

newOwner

address

true

RewardSwapped

Parameters

Name
Type
Indexed

token

address

false

total

uint256

false

amountOut

uint256

false

feeAmount

uint256

false

RewardTokenUpdated

Parameters

Name
Type
Indexed

token

address

false

enabled

bool

false

SwapperChanged

Parameters

Name
Type
Indexed

oldSwapper

address

false

newSwapper

address

false

Last updated