Skip to main content

Overview

SingleDepositorVault extends BaseVault with direct deposit and withdraw functions for a single vault owner. It is designed for dedicated treasury management where one entity (the vault owner) deposits assets and a guardian executes strategy operations on their behalf. Unlike the multi-depositor model, SingleDepositorVault does not use tokenized vault units or a Provisioner. The vault owner interacts directly with the vault contract to deposit and withdraw assets. The guardian model, Merkle verification, hooks, and pause functionality are all inherited from BaseVault. Fee calculation for single-depositor vaults uses the DelayedFeeCalculator, which applies time-delayed fee accrual based on accountant-reported vault values. See FeeVault for fee distribution details.

Functions

deposit

Deposits assets into the vault. Only callable by the vault owner. Assets are held by the vault and managed by the guardian via submitted operations. Signature:
function deposit(address token, uint256 amount) external
ParameterTypeDescription
tokenaddressAddress of the ERC-20 token to deposit
amountuint256Amount of tokens to deposit

withdraw

Withdraws assets from the vault. Only callable by the vault owner. Signature:
function withdraw(address token, uint256 amount, address recipient) external
ParameterTypeDescription
tokenaddressAddress of the ERC-20 token to withdraw
amountuint256Amount of tokens to withdraw
recipientaddressAddress to receive the withdrawn tokens

execute

Executes an arbitrary call from the vault. Only callable by the vault owner. This provides a direct execution path outside the guardian model for owner-level administrative actions. Signature:
function execute(address target, bytes calldata data) external returns (bytes memory)
ParameterTypeDescription
targetaddressContract to call
databytesCalldata for the call

setFeeCalculator

Sets the fee calculator contract for this vault. Only callable by the vault owner. Signature:
function setFeeCalculator(address calculator) external
ParameterTypeDescription
calculatoraddressAddress of the DelayedFeeCalculator contract

Events

Deposited

Emitted when the vault owner deposits assets.
event Deposited(address indexed token, uint256 amount)

Withdrawn

Emitted when the vault owner withdraws assets.
event Withdrawn(address indexed token, uint256 amount, address indexed recipient)

Executed

Emitted when the vault owner executes a direct call.
event Executed(address indexed target, bytes data, bytes result)

Errors

SingleDepositorVault__NotOwner

Thrown when a non-owner address attempts a deposit, withdraw, or execute action.
error SingleDepositorVault__NotOwner()

Inheritance

  • BaseVault — Core guardian operations, Merkle verification, hooks, pause
    • SingleDepositorVault — Adds single-depositor deposit/withdraw/execute
This page was manually created as a baseline. Run the contract reference generation pipeline to update with complete NatSpec documentation from the Solidity source.