Skip to main content

Overview

MultiDepositorVault extends BaseVault to support multiple depositors with tokenized ERC-20 vault units. Depositors interact with the vault through the Provisioner contract, which manages minting, redeeming, and async order fulfillment. The vault itself holds assets and executes guardian operations, while the Provisioner handles the depositor-facing interface. Multi-depositor vaults use a more complex guardian model than single-depositor vaults. The guardian submits operations through the standard submit function inherited from BaseVault, but the vault also integrates with a PriceAndFeeCalculator for unit-based pricing and fee calculation. Price reporting uses managed accountant snapshots to prevent fee manipulation. Transfer hooks (IBeforeTransferHook) can be configured on the vault’s ERC-20 units to enforce compliance, blocklists, or transfer restrictions. See Hooks for hook interface details.

Functions

totalAssets

Returns the total value of assets held by the vault, denominated in the vault’s unit of account. Used for share price calculations. Signature:
function totalAssets() external view returns (uint256)

convertToShares

Converts an asset amount to the equivalent number of vault shares at the current exchange rate. Signature:
function convertToShares(uint256 assets) external view returns (uint256 shares)
ParameterTypeDescription
assetsuint256Amount of assets to convert

convertToAssets

Converts a share amount to the equivalent number of assets at the current exchange rate. Signature:
function convertToAssets(uint256 shares) external view returns (uint256 assets)
ParameterTypeDescription
sharesuint256Amount of shares to convert

balanceOf

Returns the vault unit balance for a given address. Signature:
function balanceOf(address account) external view returns (uint256)
ParameterTypeDescription
accountaddressAddress to query

totalSupply

Returns the total supply of vault units. Signature:
function totalSupply() external view returns (uint256)

transfer

Transfers vault units between addresses. Transfer hooks fire before the transfer if configured. Signature:
function transfer(address to, uint256 amount) external returns (bool)
ParameterTypeDescription
toaddressRecipient address
amountuint256Number of vault units to transfer

setTransferHook

Sets the before-transfer hook contract for vault unit transfers. Only callable by the vault owner. Signature:
function setTransferHook(address hook) external
ParameterTypeDescription
hookaddressContract implementing IBeforeTransferHook

setPriceCalculator

Sets the price and fee calculator contract. Only callable by the vault owner. Signature:
function setPriceCalculator(address calculator) external
ParameterTypeDescription
calculatoraddressAddress of the PriceAndFeeCalculator contract

Events

Transfer

Standard ERC-20 transfer event for vault units.
event Transfer(address indexed from, address indexed to, uint256 value)

TransferHookSet

Emitted when the transfer hook is configured.
event TransferHookSet(address indexed hook)

PriceCalculatorSet

Emitted when the price calculator is configured.
event PriceCalculatorSet(address indexed calculator)

Errors

MultiDepositorVault__TransferHookFailed

Thrown when the before-transfer hook reverts during a vault unit transfer.
error MultiDepositorVault__TransferHookFailed()

MultiDepositorVault__InsufficientBalance

Thrown when a transfer or redemption exceeds the sender’s vault unit balance.
error MultiDepositorVault__InsufficientBalance()

Inheritance

  • BaseVault — Core guardian operations, Merkle verification, hooks, pause
    • MultiDepositorVault — Adds multi-depositor ERC-20 units, pricing, transfer hooks
This page was manually created as a baseline. Run the contract reference generation pipeline to update with complete NatSpec documentation from the Solidity source.