Skip to main content

Agent Vaults

Agent Vault is a new automated vault primitive built by Zyfai. It exposes a standard ERC-4626 interface to integrators while running ERC-7540 asynchronous operations under the hood, with the full curation lifecycle (NAV updates, withdrawal processing, rebalancing execution) automated by Zyfai's infrastructure.

The Problem with Vault Curation

Most production vaults use the ERC-7540 standard or similar async implementations. ERC-7540 solved a real technical constraint: synchronous ERC-4626 vaults cannot support complex multi-protocol strategies that need to unwind positions before settling. But in making operations asynchronous, it created a heavy manual operational loop that repeats daily:

  1. Request. Users call requestRedeem to signal withdrawal intent. Shares are transferred to the vault.
  2. Settlement. The curator manually reviews NAV from price oracles, unwinds positions across protocols, executes swaps, and approves all queued redemption requests at a single valuation point.
  3. Claim. Users must return (typically 24+ hours later) to claim their assets. The curator cannot claim on behalf of users.

This workload scales linearly with the number of strategies a vault runs. It creates a distribution bottleneck: fintechs, neobanks, and wallets that want to offer DeFi yield must either build an in-house curation team or not offer yield at all.

How Agent Vaults Work

Zyfai built a vault contract that automates the entire curation lifecycle. From the integrator's perspective, it behaves like a standard ERC-4626 vault: deposits go in, yield accrues, withdrawals come out. No async complexity exposed.

Setup is three steps:

  1. Deploy the vault (ships with built-in multisig control via a Nested Safe).
  2. Associate it with a Zyfai Smart Account.
  3. Done. The vault runs autonomously from this point.

The vault contract is open and permissionless. Anyone can deploy an instance and connect it to a Zyfai Smart Account. Source code is available on GitHub.

Architecture

The Agent Vault architecture consists of four components, each responsible for a single layer of the system: ownership, accounting, execution, and automation.

Safe Multisig (Owner) has full control over the vault: upgrades, asset reallocation, parameter changes. No timelock on upgrades; the multisig threshold is the security boundary. Users opt into this trust model.

SmartAccountWrapper (Vault) is the accounting layer. This is the contract that integrators deploy and users interact with. It handles share minting and redemptions, tracks the value of capital deployed into DeFi via allocatedAssets, and exposes both ERC-4626 (synchronous) and ERC-7540 (asynchronous) interfaces. It also supports ERC-1271 signature delegation, allowing aggregators, routers, and other ERC-7540 operators to act on behalf of depositors.

Zyfai Smart Account is where allocated capital lives and DeFi strategies execute. It reports value back to the Vault via transmitAllocatedAssets() (capital deployed out) and transmitDeallocatedAssets() (capital returned).

Indexer is the automation engine. In a standard ERC-7540 vault, NAV updates require manual curator review and approval. In an Agent Vault, every 60 seconds, it polls pendingWithdrawals(), fulfills them through the Smart Account, syncs the NAV, and reallocates idle capital. This single service replaces the curator's entire daily operational workflow.

Who This Is For

Integrators. A fintech, neobank, or wallet can plug in a single ERC-4626 vault and offer yield to their users without hiring a curation team, monitoring TVL, or processing settlements.

Curators. The operational burden that limits how many vaults a curator can manage disappears. Curators focus on strategy selection and risk parameters. Execution runs on its own.

Agents. The barrier to launching a vault drops from "build and operate a curation team" to "deploy a contract and configure."

Resources