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
  • Write methods
  • initialize
  • addStrategy
  • removeStrategy
  • addVault
  • removeVault
  • changeOracle
  • changeIncentiveController
  • changeAdmin
  • Read methods
  • getVaults
  • getStrategies
  • oracle
  • stargateAdapter
  • incentiveController
  1. Smart Contracts

MaatAddressProviderV1

For managing roles and addresses, we have MaatAddressProviderV1 contract. All other contracts do not know each other, instead they use this contract to get each other addresses from registry. Also it uses upgradeability pattern by OpenZeppelin for possible future upgrades that require additional contracts.

Write methods

initialize

function initialize(address _admin)

Upgradeable contract must not use constructor, so we have this method for initializing contract with admin address.

Params

Param
Type
Description

_admin

address

Address of the admin

addStrategy

function addStrategy(address strategy)

Adds a new strategy to the list of supported strategies. Vaults can add only strategies from this list. Only callable by the admin.

Params

Param
Type
Description

strategy

address

Address of the strategy to add

removeStrategy

function removeStrategy(address strategy)

Removes a strategy from the list of supported strategies. Vaults not currently using this strategy won’t be able to add it, but vaults already using it can continue doing so. Only callable by the admin.

Params

Param
Type
Description

strategy

address

Address of the strategy to remove

addVault

function addVault(address vault)

Adds a new vault to the list of supported vaults. Oracle will use this data for initialization PPS and for updating global PPS. Only callable by the admin.

Params

Param
Type
Description

vault

address

Address of the vault to add

removeVault

function removeVault(address vault)

Removes a vault from the list of supported vaults. Only callable by the admin.

Params

Param
Type
Description

vault

address

Address of the vault to remove

changeOracle

function changeOracle(address newOracle)

Changes the oracle address. Only callable by the admin.

Params

Param
Type
Description

newOracle

address

Address of the new oracle

changeIncentiveController

function changeIncentiveController(address newIncentiveController)

Changes the incentive controller address. Only callable by the admin.

Params

Param
Type
Description

newIncentiveController

address

Address of the new incentive controller

changeAdmin

function changeAdmin(address newAdmin)

Changes the admin address. Only callable by the admin.

Params

Param
Type
Description

newAdmin

address

Address of the new admin

Read methods

getVaults

function getVaults()

Gets the list of vaults.

Returns

Type
Description

address[]

Array of vault addresses

getStrategies

function getStrategies()

Gets the list of currently supported strategies.

Returns

Type
Description

address[]

Array of strategy addresses

oracle

function oracle()

Gets the oracle address.

Returns

Type
Description

address

Address of the oracle

stargateAdapter

function stargateAdapter()

Gets the stargate adapter address.

Returns

Type
Description

address

Address of the stargate adapter

incentiveController

function incentiveController()

Gets the incentive controller address.

Returns

Type
Description

address

Address of the incentive controller

PreviousMaatOracleGlobalPPSNextStargateAdapter

Last updated 6 months ago