MaatVaultV1
MaatVaultV1
MaatVaultV1 makes it simple and intuitive for users to manage their assets. You can easily deposit and withdraw your funds, knowing that they’re being actively managed across multiple chains through the Stargate Adapter. The vault is designed to maximize returns by investing in different strategies and ensuring your assets are always in the right place.
Actions:
User: Deposit and withdraw assets.
Commander: Execute actions to distribute deposits and fulfill withdraw requests.
Watcher: Trigger rebalance when needed.
EIP4626
All standard EIP4626 functions are implemented.
Due to MAAT's architecture you should avoid using withdraw
and redeem
. These functions will cause the transaction to fail because all assets are deposited into strategies across multiple chains. Instead, please use requestWithdraw
.
EIP20
All standard EIP20 functions are implemented.
View functions like totalSupply
only show the total amount of shares on the current chain, not the shares across all chains.
Write methods
requestWithdraw
Creates a request to withdraw by locking the shares in the contract, which will then be fulfilled by an off-chain service
Params
shares
uint
Amount of shares to withdraw
dstEid
uint32
LayerZero endpoint ID for the chain where user want to get tokens
_owner
address
Address of the owner of the shares
receiver
address
Address of the receiver of the assets
Returns
intentionId
bytes32
ID of the intention
requestRebalance
Creates a request to rebalance assets across strategies. Only callable by the admin or watcher.
Returns
intentionId
bytes32
ID of the intention
cancelWithdrawal
Cancels a withdrawal request and returns the locked shares to the owner if withdrawCancellationDelay()
has passed.
Params
intentionId
bytes32
ID of the withdrawal request
Returns
owner
address
Address of the owner of the shares
shares
uint
Amount of shares which returns to owner
setWithdrawCancellationDelay
Only callable by the admin. It sets the delay for the withdraw cancellation.
Params
timer
uint
Delay for the withdraw cancellation.
addRelatedVaults
Only callable by the admin. It adds related vaults that are deployed on other chains. MAAT has only one Stargate Adapter on each chain and multiple policies that may not be available on some chains, so we can only bridge assets to a chain where we have a corresponding vault.
Params
_dstEid
uint32[]
LayerZero endpoint ID for the destination chains.
_vault
address[]
Addresses of the related vaults on the destination chains.
removeRelatedVault
Only callable by the admin. It removes a related vault.
Params
_dstEid
uint32
LayerZero endpoint ID for the chain.
finishBridge
Only callable by the Stargate Adapter. It is used to receive tokens from the Stargate Adapter.
Params
amountBridged
uint256
Amount of tokens to receive.
originEid
uint32
LayerZero endpoint ID for the chain where the tokens are coming from.
intentionId
bytes32
ID of the intention.
setCommander
Only callable by the admin.
Params
_commander
address
New commander address.
setWatcher
Only callable by the admin.
Params
_watcher
address
New watcher address.
Executes actions: withdraw from strategy, deposit to strategy, bridge, fulfill withdrawal. Only callable by the commander or admin.
Params
actionType
ActionType[]
Array of action types.
inputs
ActionInput[]
Array of action inputs.
addStrategy
Only callable by the admin. Adds a new strategy which can be used to invest the assets.
Params
strategy
address
Address of the strategy to add.
removeStrategy
Only callable by the admin. Removes a strategy.
Params
strategyId
bytes32
ID of the strategy to remove.
disableStrategy
Only callable by the admin. Disables a strategy. Vault can't deposit into disabled strategies, but can withdraw from them.
Params
strategyId
bytes32
ID of the strategy to disable.
enableStrategy
Only callable by the admin. Enables a strategy.
Params
strategyId
bytes32
ID of the strategy to enable.
Read methods
addressProvider
Returns the AddressProvider.
Returns
address
Address of the address provider.
getRelatedVault
Returns the address of the related vault for a given destination chain.
Params
_dstEid
uint32
LayerZero endpoint ID for the destination chain.
Returns
_vault
address
Address of the related vault.
idle
Returns the idle assets. Idle Assets: Assets that are not currently invested. They are either waiting to be deposited into strategies or withdrawn by a user.
Returns
uint
Idle assets.
getStrategyByAddress
Returns the strategy ID and the status of the strategy.
Params
strategy
address
Address of the strategy.
Returns
bytes32
ID of the strategy.
bool
Status of the strategy, true if enabled, false if not.
getStrategyById
Returns the address and the status of the strategy.
Params
strategyId
bytes32
ID of the strategy.
Returns
address
Address of the strategy.
bool
Status of the strategy, true if enabled, false if not.
getWithdrawRequest
Returns the withdraw request info.
Params
intentionId
bytes32
ID of the withdraw intention.
Returns
WithdrawRequestInfo
Withdraw request info.
withdrawCancellationDelay
Returns the withdrawal cancellation delay, after which the user can cancel their withdrawal request.
Returns
uint
Withdraw cancellation delay.
Last updated