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
receiptToken
pool
feeCollector
swapManager
oraclePeriod
oracleRouterIdx
swapSlippage
_keepers
UpdatedFeeCollector
UpdatedSwapManager
UpdatedSwapSlippage
UpdatedOracleConfig
addKeeper
Add given address in keepers list.
_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.
_newStrategy
address
Address of new strategy
removeKeeper
Remove given address from keepers list.
_keeperAddress
address
keeper address to remove.
updateFeeCollector
Update fee collector
_feeCollector
address
fee collector address
updateSwapManager
Update swap manager address
_swapManager
address
swap manager address
updateSwapSlippage
updateOracleConfig
approveToken
Approve all required tokens
setupOracles
withdraw
Withdraw collateral token from lending pool.
_amount
uint256
Amount of collateral token
rebalance
Rebalance profit, loss and investment of this strategy
sweepERC20
sweep given token to feeCollector of strategy
_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