Overview
Hooks are extension points in the Aera V3 protocol that allow custom logic to run at specific moments during vault operations. The vault owner configures hooks, and they execute automatically as part of the vault’s normal operation flow. Hooks can enforce constraints (slippage bounds, position limits), calculate fees, validate parameters, or perform any other custom logic without modifying core vault contracts. For a conceptual overview of how hooks work, see Aera V3 Hooks. This page documents the specific hook interfaces that contracts must implement.IBeforeTransferHook
Transfer hooks run before token transfers within MultiDepositorVault vaults. They enforce transfer restrictions, blocklists, compliance requirements, or lock-up periods on vault unit transfers between addresses.Functions
beforeTransfer
Called before every vault unit transfer. The hook can revert to prevent the transfer. Signature:ISubmitHooks
Submit hooks run before and after an entire guardian submission batch. They operate on the full batch of operations and are useful for batch-level accounting, aggregate position checks, or state snapshots. The vault owner configures submit hooks viasetSubmitHooks on the BaseVault.
IBeforeSubmitHook
beforeSubmit
Called once before the guardian’s operation batch executes. Can perform batch-level validation or pre-processing. Signature:IAfterSubmitHook
afterSubmit
Called once after all operations in the batch complete. Used for post-processing such as fee snapshots, position tracking, or state verification. Signature:IOperationHook
Operation hooks run during individual operations within a submission batch. They are encoded in the guardian’s Merkle tree alongside the operation.IBeforeOperationHook
beforeOperation
Called before an individual operation’s target call executes. Typically validates calldata parameters — for example, checking swap slippage against theOracleRegistry.
Signature:
IAfterOperationHook
afterOperation
Called after an individual operation completes. Verifies post-conditions such as no residual token approvals or expected balance changes. Signature:IBeforeClaimHook
Claim hooks run before fee claims or other claim operations. They can enforce additional validation on who can claim and under what conditions.Functions
beforeClaim
Called before a fee claim executes. Can revert to prevent the claim. Signature:Common Use Cases
This page was manually created as a baseline. Run the contract reference generation pipeline to update with complete NatSpec documentation from the Solidity source.