MAAT Finance
  • Introduction
  • Integration
    • Deposit
    • Withdraw
    • Supported Chains
    • Supported Tokens
    • Supported Protocols
    • Widget
  • Smart Contracts
    • Architecture Overview
    • MaatVaultV1
    • MaatOracleGlobalPPS
    • MaatAddressProviderV1
    • StargateAdapter
    • Strategy
    • IncentivesController
  • Additional Info
    • Resources
    • Vision
  • Legal
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page
  • EIP4626
  • Write methods
  • setPerformanceFee
  • setFeeTo
  • harvest
  • compound
  • View methods
  • getStrategyParams
  • getStrategyId
  • previewHarvest
  1. Smart Contracts

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:

  1. AAVE

  2. Harvest Finance

  3. Stargate Finance

  4. 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

function setPerformanceFee(uint fee) 

Only callable by the owner of the strategy. Set performance fee - fee that will be taken from profit.

Params

Param
Type
Description

fee

uint

Performance fee

setFeeTo

function setFeeTo(address _feeTo) 

Only callable by the owner of the strategy. Set address that will receive performance fee.

Params

Param
Type
Description

_feeTo

address

Address that will receive performance fee

harvest

function harvest()

Only callable by IncentivesController. Strategies with incentives implement this method. It's used to claim rewards of underlying protocol.

compound

function compound(uint256 amount)

Only callable by IncentivesController. Strategies with incentives implement this method. It's used to compound rewards of underlying protocol.

Params

Param
Type
Description

amount

uint256

Amount of tokens to compound

View methods

getStrategyParams

function 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

Type
Description

params

StrategyParams

getStrategyId

function getStrategyId()

Get strategy id. Every strategy has unique id, which created from strategy params.

Returns

Type
Description

bytes32

Strategy id

previewHarvest

function previewHarvest()

Only Strategies with incentives implement this method. It's used to preview rewards of underlying protocol.

Returns

Type
Description

address[]

Addresses of the reward tokens

uint256[]

Rewards

PreviousStargateAdapterNextIncentivesController

Last updated 6 months ago