TokenVault
The TokenVault
contract is a core component of the MAAT system. It is responsible for holding funds and distributing them across various strategies. Additionally, the TokenVault
contract is an Omnichain Fungible Token (OFT) and is responsible for minting shares. The contract implements the ERC4626 interface, providing all the essential functions for a vault.
Key Features
Fund Management: The contract holds user funds and allocates them to different strategies to maximize returns.
OFT Implementation: The contract supports minting shares, making it an integral part of the cross-chain functionality.
ERC4626 Interface: As an implementation of the ERC4626 standard, the contract includes all primary vault functions.
Deployment
The TokenVault
contract is deployed as a single instance on the main network (Arbitrum). Other vault contracts on different networks are slightly different and are referred to as TokenVault Peripheral
, which will be discussed later.
Core Functions (ERC4626 Interface)
Since the TokenVault
contract implements the ERC4626 interface, it includes the following primary functions:
Deposit: Allows users to deposit tokens into the vault in exchange for shares.
Mint: Mints new shares to a receiver.
Withdraw: Enables users to withdraw tokens from the vault by burning shares.
Redeem: Burns shares and returns the equivalent amount of tokens to the user.
TokenVault Peripheral
Other vault contracts on different networks, referred to as TokenVault Peripheral
, have slight differences from the main TokenVault
contract. These peripheral contracts will be detailed in later documentation, focusing on their unique functionalities and interactions with the main TokenVault
contract.
Key Differences
Absence of Deposit Implementation: Unlike the main
TokenVault
contract, theTokenVault Peripheral
does not implement thedeposit()
function.Cross-Chain Withdraw Handling: When the
requestWithdraw()
function is called, the shares are bridged to the main chain and locked there for processing.
Supported Networks
The TokenVault Peripheral
contracts are deployed on all networks supported by MAAT, allowing seamless cross-chain interactions with the main TokenVault
contract.
Last updated