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

NameType

_strategyToken

address

_bentoBox

address

Functions


afterExitnonpayable

Parameters

NameType

to

address

value

uint256

data

bytes

Return values

NameType

success

bool

bentoBoxview

Parameters

No parameters for this function.

Return values

NameType

/

address

claimOwnershipnonpayable

Parameters

No parameters for this function.

Return values

No return values for this function.

exitnonpayable

Parameters

NameType

balance

uint256

Return values

NameType

amountAdded

int256

exitedview

Parameters

No parameters for this function.

Return values

NameType

/

bool

feeCollectorview

Parameters

No parameters for this function.

Return values

NameType

/

address

feePercentview

Parameters

No parameters for this function.

Return values

NameType

/

uint8

harvestnonpayable

Parameters

NameType

balance

uint256

sender

address

Return values

NameType

/

int256

maxBentoBoxBalanceview

Parameters

No parameters for this function.

Return values

NameType

/

uint256

ownerview

Parameters

No parameters for this function.

Return values

NameType

/

address

pendingOwnerview

Parameters

No parameters for this function.

Return values

NameType

/

address

poolview

Parameters

No parameters for this function.

Return values

NameType

/

address

resetAllowancenonpayable

Parameters

No parameters for this function.

Return values

No return values for this function.

rewardTokenEnabledview

Parameters

NameType

/

address

Return values

NameType

/

bool

safeHarvestnonpayable

Parameters

NameType

maxBalance

uint256

rebalance

bool

maxChangeAmount

uint256

harvestRewards

bool

Return values

No return values for this function.

setFeeParametersnonpayable

Parameters

NameType

_feeCollector

address

_feePercent

uint8

Return values

No return values for this function.

setRewardTokenEnablednonpayable

Parameters

NameType

token

address

enabled

bool

Return values

No return values for this function.

setStrategyExecutornonpayable

Parameters

NameType

executor

address

value

bool

Return values

No return values for this function.

setSwappernonpayable

Parameters

NameType

_swapper

address

Return values

No return values for this function.

skimnonpayable

Parameters

NameType

amount

uint256

Return values

No return values for this function.

strategyExecutorsview

Parameters

NameType

/

address

Return values

NameType

/

bool

strategyTokenview

Parameters

No parameters for this function.

Return values

NameType

/

address

swapRewardsnonpayable

Parameters

NameType

amountOutMin

uint256

rewardToken

address

data

bytes

Return values

NameType

amountOut

uint256

swapperview

Parameters

No parameters for this function.

Return values

NameType

/

address

tagview

Parameters

No parameters for this function.

Return values

NameType

/

address

transferOwnershipnonpayable

Parameters

NameType

newOwner

address

direct

bool

renounce

bool

Return values

No return values for this function.

withdrawnonpayable

Parameters

NameType

amount

uint256

Return values

NameType

actualAmount

uint256

Events (for EVM logging)


FeeChanged

Parameters

NameTypeIndexed

previousFee

uint256

false

newFee

uint256

false

previousFeeCollector

address

false

newFeeCollector

address

false

LogSetStrategyExecutor

Parameters

NameTypeIndexed

executor

address

true

allowed

bool

false

OwnershipTransferred

Parameters

NameTypeIndexed

previousOwner

address

true

newOwner

address

true

RewardSwapped

Parameters

NameTypeIndexed

token

address

false

total

uint256

false

amountOut

uint256

false

feeAmount

uint256

false

RewardTokenUpdated

Parameters

NameTypeIndexed

token

address

false

enabled

bool

false

SwapperChanged

Parameters

NameTypeIndexed

oldSwapper

address

false

newSwapper

address

false

Last updated