Strategy

Strategy

This is an abstract contract that implements key functionality for all strategies. For example, the AaveLeverageStrategy contract inherits from Strategy and AaveCore.

collateralToken

contract IERC20 collateralToken

receiptToken

address receiptToken

pool

address pool

feeCollector

address feeCollector

swapManager

contract ISwapManager swapManager

oraclePeriod

oracleRouterIdx

swapSlippage

_keepers

UpdatedFeeCollector

UpdatedSwapManager

UpdatedSwapSlippage

UpdatedOracleConfig

addKeeper

Add given address in keepers list.

Name
Type
Description

_keeperAddress

address

keeper address to add.

keepers

Return list of keepers

migrate

Migrate all asset and vault ownership,if any, to new strategy

_beforeMigration hook can be implemented in child strategy to do extra steps.

Name
Type
Description

_newStrategy

address

Address of new strategy

removeKeeper

Remove given address from keepers list.

Name
Type
Description

_keeperAddress

address

keeper address to remove.

updateFeeCollector

Update fee collector

Name
Type
Description

_feeCollector

address

fee collector address

updateSwapManager

Update swap manager address

Name
Type
Description

_swapManager

address

swap manager address

updateSwapSlippage

updateOracleConfig

approveToken

Approve all required tokens

setupOracles

withdraw

Withdraw collateral token from lending pool.

Name
Type
Description

_amount

uint256

Amount of collateral token

rebalance

Rebalance profit, loss and investment of this strategy

sweepERC20

sweep given token to feeCollector of strategy

Name
Type
Description

_fromToken

address

token address to sweep

token

Returns address of token correspond to collateral token

totalValue

Calculate total value of asset under management

Report total value in collateral token

totalValueCurrent

Calculate total value of asset under management (in real-time)

Report total value in collateral token

isReservedToken

Check whether given token is reserved or not. Reserved tokens are not allowed to sweep.

Last updated

Was this helpful?