A
A
Aera
Search
⌃K

Lifecycle Model

Vault States

State transition model for a single vault
The vault goes through several main states in its operation:
  • Uninitialized – The vault is deployed but the underlying Balancer Managed Vault has not been funded yet. We distinguish the vault in this state because an unfunded Balancer fund needs to be funded with all assets (once it is live then, liquidity can be added per token)
  • Live – The vault has been funded with initial capital and is actively controlled by the Vault Guardian. We further distinguish the vault with trading enabled, which means that the underlying Balancer pool is accepting swap trades and not-trading which means that the underlying Balancer pool is not accepting trades
  • Finalizing – The notice period for finalization has been initiated. Final funds are held until finalizaiton. Note: initial deployments will have a negligible or 0 notice period
  • Finalized – The vault has returned all capital to the treasury owner and no further actions are available

Vault Functions

Lifecycle model for a single vault
The above chart describes what functions are available during the vault's operation. The functions are as follows:
  • initialDeposit, needs to be called by the owner to provide initial funding for the Aera vault,
  • deposit, allows owner to make additional deposits at any time while preserving existing pool spot price. Should generally not be called if trading is enabled,
  • depositIfBalanceUnchanged, a deposit operation that checks if the underlying Balancer pool balance hasn’t changed in the current block as a form of simple MEV protection,
  • withdraw, request by the owner to return a given amount of each token back to the protocol treasury (owner) while preserving existing pool spot price. Should generally not be called if trading is enabled,
  • withdrawIfBalanceUnchanged, similar to depositIfBalanceUnchanged,
  • enableTradingRiskingArbitrage, enable trading with current spot prices between pool assets. Vulnerable to arbitrage if spot prices do not agree with current market prices,
  • enableTradingWithWeights, enable trading with a specific set of weights to control spot prices and limit arbitrage,
  • initiateFinalization, request by the owner or Guardian to initiate notice period for vault termination,
  • finalize, confirms vault finalization after notice period has expired,
  • setGuardian, allows owner to change Guardian,
  • sweep, allows owner to recover tokens sent in error,
  • claimRewards, claim underlying Balancer pool rewards,
  • disableTrading, disable trading in an emergency or prior to a deposit/withdraw action,
  • updateWeightsGradually, controls the target Balancer weight by specifying the target weights of tokens, start and end time of weight transition schedule,
  • cancelWeightUpdates, cancels active weight update,
  • setSwapFee, allows Guardian to change current swap fee,
  • claimGuardianFees, allows Guardian to claim pool fees if enabled and earned.
See Operating the Vault for further guidance on when to use each function as a vault owner.