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
  • initPPS
  • updateGlobalPPS
  • Read methods
  • getPrevGlobalPPS
  • getGlobalPPS
  1. Smart Contracts

MaatOracleGlobalPPS

MAAT utilizes various strategies across multiple chains, making it challenging to ensure consistent exchange rate between yield bearing tokens and original assets. To solve this, we introduced a global price per share (PPS), which is calculated off-chain by aggregating assets and shares across all chains.

To prevent arbitrage opportunities, we use two types of PPS: the previous PPS and the current PPS. When minting shares, we use the current PPS, and when burning shares, we use the previous PPS.

Write methods

initPPS

function initPPS(address vault)

Initializes the PPS for a vault, call once after deploy new vault.

Params

Param
Type
Description

vault

address

Address of the vault

updateGlobalPPS

function updateGlobalPPS(
        address[] calldata vaults,
        uint112[] calldata newPricePerShare
    )

Set the PPS for vaults

Params

Param
Type
Description

vaults

address[]

Addresses of vaults

newPricePerShare

uint112[]

New PPS for vaults

Read methods

getPrevGlobalPPS

function getPrevGlobalPPS(address vault) 

Get the previous global PPS for a vault

Params

Param
Type
Description

vault

address

Address of the vault

Returns

Param
Type
Description

pps

uint

Previous global PPS for the vault

getGlobalPPS

function getGlobalPPS(address vault)

Get the current global PPS for a vault

Params

Param
Type
Description

vault

address

Address of the vault

Returns

Param
Type
Description

pps

uint

Current global PPS for the vault

PreviousMaatVaultV1NextMaatAddressProviderV1

Last updated 6 months ago