Strategy
A strategy acts as a connector to a specific protocol. Every strategy implements the EIP4626 interface. Some strategies may also include functions for handling incentives, in which case they implement the IStrategyWithIncentives.sol
interface.
At this moment, MAAT has connected strategies for the following protocols:
AAVE
Harvest Finance
Stargate Finance
Yearn Finance
EIP4626
All standard EIP4626 functions are implemented.
To improve security of MAAT only vault can call deposit
and mint
functions.
Write methods
setPerformanceFee
Only callable by the owner of the strategy. Set performance fee - fee that will be taken from profit.
Params
fee
uint
Performance fee
setFeeTo
Only callable by the owner of the strategy. Set address that will receive performance fee.
Params
_feeTo
address
Address that will receive performance fee
harvest
Only callable by IncentivesController. Strategies with incentives implement this method. It's used to claim rewards of underlying protocol.
compound
Only callable by IncentivesController. Strategies with incentives implement this method. It's used to compound rewards of underlying protocol.
Params
amount
uint256
Amount of tokens to compound
View methods
getStrategyParams
Get strategy params. Params includes:
chainId - chain id of the strategy
protocol - underlying protocol name
protocolVersion - underlying protocol version
token - underlying token address
protocolVault - underlying protocol vault address
Returns
params
StrategyParams
getStrategyId
Get strategy id. Every strategy has unique id, which created from strategy params.
Returns
bytes32
Strategy id
previewHarvest
Only Strategies with incentives implement this method. It's used to preview rewards of underlying protocol.
Returns
address[]
Addresses of the reward tokens
uint256[]
Rewards
Last updated