Skip to main content

Overview

BaseVault is the abstract base contract that all Aera V3 vault types inherit from. It provides the core infrastructure for guardian-based operation execution, Merkle proof verification, configurable hooks, and emergency pause functionality. Both SingleDepositorVault and MultiDepositorVault extend BaseVault to add depositor-specific logic. The vault accepts batches of operations submitted by an authorized guardian. Each operation is validated against a Merkle tree that whitelists specific contract targets and calldata patterns. Hooks can intercept operations at multiple lifecycle points to enforce constraints such as slippage bounds, position limits, and approval cleanup. For a conceptual overview of how BaseVault fits into the Aera V3 architecture, see Aera V3 Overview.

Functions

submit

Submits a batch of operations for the guardian to execute atomically. Each operation is validated against the guardian’s Merkle tree before execution. Submit hooks fire before and after the batch, and individual operations can have pre-hooks and post-hooks. Signature:
function submit(Operation[] calldata operations) external
ParameterTypeDescription
operationsOperation[]Array of operations to execute atomically

pause

Pauses all guardian operations on the vault. Can be called by the guardian or the vault owner as an emergency safety mechanism. Signature:
function pause() external

unpause

Resumes guardian operations after a pause. Can only be called by the vault owner. Signature:
function unpause() external

setGuardianRoot

Sets the Merkle root that defines the guardian’s allowed operations. Only callable by the vault owner. Signature:
function setGuardianRoot(bytes32 root) external
ParameterTypeDescription
rootbytes32New Merkle root encoding allowed operations

setSubmitHooks

Configures the before-submit and after-submit hook contracts for the vault. Only callable by the vault owner. Signature:
function setSubmitHooks(address beforeHook, address afterHook) external
ParameterTypeDescription
beforeHookaddressContract to call before each submission batch
afterHookaddressContract to call after each submission batch

checkGuardianWhitelist

Checks whether a guardian is still authorized on the vault’s whitelist. Can be called by anyone. Removes the guardian if it fails the whitelist check. Signature:
function checkGuardianWhitelist() external

guardian

Returns the address of the vault’s current guardian. Signature:
function guardian() external view returns (address)

owner

Returns the address of the vault owner. Signature:
function owner() external view returns (address)

paused

Returns whether the vault is currently paused. Signature:
function paused() external view returns (bool)

Events

Submitted

Emitted when a guardian successfully submits a batch of operations.
event Submitted(address indexed guardian, uint256 operationCount)

Paused

Emitted when the vault is paused.
event Paused(address indexed account)

Unpaused

Emitted when the vault is unpaused.
event Unpaused(address indexed account)

GuardianRootSet

Emitted when the guardian’s Merkle root is updated.
event GuardianRootSet(bytes32 indexed root)

SubmitHooksSet

Emitted when submit hooks are configured.
event SubmitHooksSet(address beforeHook, address afterHook)

Errors

Vault__Paused

Thrown when a guardian operation is attempted while the vault is paused.
error Vault__Paused()

Vault__InvalidProof

Thrown when an operation’s Merkle proof does not verify against the guardian root.
error Vault__InvalidProof()

Vault__NotGuardian

Thrown when a non-guardian address attempts a guardian-only action.
error Vault__NotGuardian()

Vault__NotOwner

Thrown when a non-owner address attempts an owner-only action.
error Vault__NotOwner()

Inheritance

BaseVault is the root of the Aera V3 vault hierarchy:
  • BaseVault — Core guardian operations, Merkle verification, hooks, pause
This page was manually created as a baseline. Run the contract reference generation pipeline to update with complete NatSpec documentation from the Solidity source.